Hi,
I'm trying to update the list of action operations for an existing Action object via API. Unfortunately, I get an error when trying to do it, and the error message nor the API documentation have been of much help so far.
Here are the messages exchanged on the update operation:
Request:
Response:
To give some more context, I have Zabbix 1.8.4, and I'm using the Admin user, who has enough permissions (I created the action in the same session). Finally I paste the API operation with which I created that action object:
Request:
Response:
Thank you very much.
I'm trying to update the list of action operations for an existing Action object via API. Unfortunately, I get an error when trying to do it, and the error message nor the API documentation have been of much help so far.
Here are the messages exchanged on the update operation:
Request:
Code:
{
"id":0,
"auth":"ffc03bf437cd01dc334125872ea952d3",
"jsonrpc":"2.0",
"method":"action.update",
"params":{
"actionid":"21",
"operations":[{
"operationtype":0,
"objectid":7,
"object":1
}]
}
}
Code:
{
"jsonrpc":"2.0",
"error":{
"code":-32602,
"message":"Invalid params.",
"data":"[ CAction::update ] Action [ ] already exists"
},
"id":0
}
To give some more context, I have Zabbix 1.8.4, and I'm using the Admin user, who has enough permissions (I created the action in the same session). Finally I paste the API operation with which I created that action object:
Request:
Code:
{
"id":0,
"auth":"ffc03bf437cd01dc334125872ea952d3",
"jsonrpc":"2.0",
"method":"action.create",
"params":{
"name":"\\n\\t\\t\\tAlerta 001\\n\\t\\t",
"eventsource":"0",
"evaltype":"0",
"status":"0",
"esc_period":"0",
"def_shortdata":"{TRIGGER.NAME}: {TRIGGER.STATUS}",
"def_longdata":"{TRIGGER.NAME}: {TRIGGER.STATUS}\\r\\nLast value: {ITEM.LASTVALUE}\\r\\n\\r\\n{TRIGGER.URL}",
"recovery_msg":"0",
"r_shortdata":"{TRIGGER.NAME}: {TRIGGER.STATUS}",
"r_longdata":"{TRIGGER.NAME}: {TRIGGER.STATUS}\\r\\nLast value: {ITEM.LASTVALUE}\\r\\n\\r\\n{TRIGGER.URL}",
"conditions":[{"conditiontype":"2","operator":"0","value":"16041"}],
"operations":[{"operationtype":0,"objectid":1,"object":0}]
}
}
Code:
{
"jsonrpc":"2.0",
"result":{"actionids":["21"]},
"id":0
}
.
Comment