[ZBXNEXT-3459] Create/Retrieve/Update/Delete Trigger Tags via API Created: 2016 Sep 26  Updated: 2016 Sep 27  Resolved: 2016 Sep 27

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: API (A)
Affects Version/s: 3.2.0
Fix Version/s: None

Type: Change Request Priority: Trivial
Reporter: David Angelovich Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: api, tags, trigger
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates ZBXNEXT-2087 Custom fields to use and show in dash... Closed

 Description   

Trigger Tags aren't retrievable via the API unless its done through an event. There doesn't appear to be an allowance to create/retrieve the tags themselves without an event though.

I'd like to be able to add/create/delete/update trigger tags individually and/or via the existing trigger.* methods.



 Comments   
Comment by Oleg Egorov (Inactive) [ 2016 Sep 27 ]

Hello, David!
Via API possible get/create/update/delete trigger tags.
For example:
trigger.update

Create new tag:

{
    "triggerid": 16149,
    "tags": [
        {
            "tag": "a",
            "value": "b"
        }
    ]
}

Tag update:

{
    "triggerid": 16149,
    "tags": [
        {
            "triggertagid": 16149,
            "tag": "a",
            "value": "b2"
        }
    ]
}

Tags removing:

{
    "triggerid": 16149,
    "tags": []
}
Comment by Aleksandrs Saveljevs [ 2016 Sep 27 ]

Seems like the functionality is there, but is simply not documented yet. Therefore, closing as a duplicate of (25) in ZBXNEXT-2087.

Comment by David Angelovich [ 2016 Sep 27 ]

This doesn't appear to be covered in the API documentation.

How does one retrieve all tags for a trigger? I'm unable to do so with my testing, though the code does seem to have a selectTags parameter for the trigger.get method.

Comment by Oleg Egorov (Inactive) [ 2016 Sep 27 ]

trigger.get

{
    "triggerids": [
        16149
    ],
    "selectTags": [
        "tag",
        "value"
    ],
    "output": [
        "triggerid"
    ]
}

Zabbix version 3.2

Generated at Fri Apr 26 07:53:45 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.