Ad Widget

Collapse

Zabbix REST API auth parameter support in request body.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ab123
    Junior Member
    • May 2025
    • 3

    #1

    Zabbix REST API auth parameter support in request body.

    Hi,

    I am working on Zabbix REST API for some automation. The below request body works fine for API calls for Zabbix Server 7.0 with 'auth' parameter.
    {

    "jsonrpc": "2.0",

    "method": "host.get",

    "params": {

    "output": ["hostid", "host", "name", "interfaces"],

    "filter": {

    "status": "0"

    },

    "selectInterfaces": ["interfaceid", "ip"]

    },

    "auth": auth_token,

    "id": 2

    }
    However in Zabbix Server 7.4 REST API calls throws an error-: {"jsonrpc":"2.0","error":{"code":-32600,"message":"Invalid request.","data":"Invalid parameter "/": unexpected parameter "auth"."},"id":2}
    Is this parameter not supported in newer versions? or is it OS support issue as Zabbix Server version 7.0 is running on Ubuntu OS and 7.4 on RHEL 9
  • mariusl
    Junior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Aug 2024
    • 25

    #2
    Hello,

    The auth property is indeed deprecated. You should use a bearer token in the Authorization header. If you need to retrieve one, use the user.login method. See https://www.zabbix.com/documentation.../en/manual/api for more details.

    Comment

    • markfree
      Senior Member
      • Apr 2019
      • 868

      #3
      You can create an API token through the web interface.
      The API documentation provides some examples.

      Comment

      • Wikz47v
        Junior Member
        • Sep 2025
        • 1

        #4
        Thank you markfree

        Comment

        Working...