Ad Widget

Collapse

event.acknowledge: No permissions to referred object or it does not exist!

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Towermoni
    Junior Member
    • Oct 2024
    • 3

    #1

    event.acknowledge: No permissions to referred object or it does not exist!


    I'm creating a script to acknowledge a trigger and send a message to Zabbix's API. Below is my section that handles the data:

    PHP Code:
    $data json_encode([
    'jsonrpc' => '2.0',
    'method' => 'event.acknowledge',
    'params' => [
    "eventids" => $trigger_id// ID of the event you want to acknowledge
    "action" => 6,
    "message" => $message // Custom message for acknowledgment
    ],
    'auth' => $auth_token,
    'id' => 1
    ]); 
    I verified the trigger ID, API key, and the URL to be correct though when I run the php script I get:

    PHP Code:
    {"code":-32500,"message":"Application error.","data":"No permissions to referred object or it does not exist!"
    What should I modify to solve the issue? Does the trigger in question need to be triggered in order for me to acknowledge it? I've included a photo of the test trigger i'm attempting to acknowledge and send a message to:

    Click image for larger version

Name:	trigger.png
Views:	294
Size:	32.7 KB
ID:	492827
  • Answer selected by Towermoni at 16-10-2024, 17:52.
    Towermoni
    Junior Member
    • Oct 2024
    • 3

    Update: I found I was referencing the wrong ID (I.E I was referencing the 'triggerid' when I should have been referencing the 'eventid'. The script now works as intended

    Comment

    • Towermoni
      Junior Member
      • Oct 2024
      • 3

      #2
      Update: I found I was referencing the wrong ID (I.E I was referencing the 'triggerid' when I should have been referencing the 'eventid'. The script now works as intended

      Comment

      Working...