Ad Widget

Collapse

Hot to uptade a group via API using host.uptade?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Murilo Scarpa Sitonio
    Junior Member
    • Feb 2019
    • 4

    #1

    Hot to uptade a group via API using host.uptade?

    I'm trying to uptade the groups of a host via API but I'm getting an error ("code": -32602, "message": "Invalid params.","data": "Incorrect method "host.uptade".") even though my request is (seemingly) correct.

    Request:
    Code:
    {
        "jsonrpc": "2.0",
        "method": "host.uptade",
        "params": {
            "hostid":"10829",
            "groups":[
                {
                    "groupid": "112"
    
                }, 
                {
                    "groupid": "11"
                }
            ]
        },
        "auth": "86a4c40265bf314e43b0c2de2be3bbe1",
        "id": 1
    }
    What am I missing? Any help is appreciated!

    Thank you.
  • brunohl
    Senior Member
    Zabbix Certified Specialist
    • Mar 2019
    • 215

    #2
    To me it seems correct. Are you sure that those ids are correct?

    Comment

    • Murilo Scarpa Sitonio
      Junior Member
      • Feb 2019
      • 4

      #3
      Yes, absolutely.

      I actually accomplished this task using host.massadd method. I don't understand why host.update nor host.add doesn't work...

      Comment

      Working...