Updates an instruction with given parameters

Params

Param name Description
instruction
required

Object containing information about the instruction to be updated


Value: Must be a Hash
pretty
optional

Return a pretty formatted response if true, Default is false


Value: Must be a Boolean
is_oem
optional

Update instruction in child account by oem user if is_oem flag is true.


Value: Must be a Boolean

Examples

Request - update parameters - name, definition and description
  curl -X PUT -H "Content-Type:application/json" -H "X-Auth-Token:olezAZXGQn9MutnfNerKDQ"  -d '{"instruction":{"name":"Increase Pressure 10 PSI","definition":{"add_pressure":10},"description":"Increases pressure by 10 PSI"}}' https://api.datonis.io/api/v3/instructions/2ab8dfe1b4

Response (containing details of the instruction updated )
{
  "instruction": {
    "definition": {
      "add_pressure": 10
    },
    "description": "Increases pressure by 10 PSI",
    "instruction_key": "2ab8dfe1b4",
    "max_retries": 0,
    "name": "Increase Pressure 10 PSI",
    "timeout": 15,
    "created_at": 1448430636,
    "updated_at": 1448430747
  }
}
Request - update  parameters - name, definition, description, max_retries (execution retries) and timeout (timeout in seconds for instruction acknowledgement)
  curl -X PUT -H "Content-Type:application/json" -H "X-Auth-Token:olezAZXGQn9MutnfNerKDQ"  -d '{"instruction":{"name":"Increase Pressure 10 PSI","definition":{"add_pressure":10},"description":"Increases pressure by 10 PSI","max_retries":2,"timeout":10}}' https://api.datonis.io/api/v3/instructions

Response (containing details of the instruction updated)
{
  "instruction": {
    "definition": {
      "add_pressure": 10
    },
    "description": "Increases pressure by 10 PSI",
    "instruction_key": "2ab8dfe1b4",
    "max_retries": 2,
    "name": "Increase Pressure 10 PSI",
    "timeout": 10,
    "created_at": 1448430636,
    "updated_at": 1448430636
  }
}