Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Children Display
alltrue
styleh3
pageSuperb Cloud API

POST /recipes/:recipe_id/run 

Runs recipe on specified virtual machines

Sections:

Table of Contents
maxLevel4
minLevel2
includeResponse.*|JSON.*|XML.*

Request Parameters

vm1_identifier - replace this with the identifier of a virtual server you want to run the recipe on.

Note

When applying one recipe to several servers via API, there is possibility to run the recipe incompatible with the server type (Unix recipe on Windows server or vice versa). In this case the transaction will be scheduled and completed, but the recipe will not do anything.

Response Parameters

Info

207 Multi-status is returned along with an array indicating the status of the individual requests

JSON Request example

Code Block
languagebash
themeRDark
 curl -i -X POST -H 'Accept: application/json' -H 'Content-type: application/json' -u user:password -d '{"virtual_machines":[":vm1_identifier",":vm2_identifier"]}' --url <api_url>/recipes/:recipe_id/run.json

JSON Response

Code Block
themeRDark
 [{"virtual_machine":{"identifier":"x7fn5k7i5bhxn","run_recipe_status":"scheduled"}},{"virtual_machine":{"identifier":"yu6rqyii0p5u9","run_recipe_status":"failed"}}]

XML Request example

Code Block
languagebash
themeRDark
 curl -i -X POST -H 'Accept: application/xml' -H 'Content-type:application/xml' -u user:userpass -d '<virtual_machines type="array"><virtual_machine>vm1_identifier</virtual_machine><virtual_machine>vm2_identifier</virtual_machine></virtual_machines>'  --url <api_url>/recipes/:recipe_id/run.xml