search

Using Postman

Postman is not a Zenoss utility and is not officially supported. It's a powerful third-party tool that can make API development and testing easier, though, so we've documented what you need to do to use it.

Postman is a third-party utility available at https://www.getpostman.com/

  • It's a web client that is great for testing API calls and looking at response data

Key considerations

  • Set the request type to POST
  • Set the URI to the URI of the router you're leveraging
  • Authorization varies:
    • For Collection Zone: use your API key
    • For Resource Manager: use Basic Authentication and your username and password
  • Headers should be set to Content-type: application/json
  • Body should contain a JSON object to POST to the router


Recommendations

  • Create a Postman Environment
    • This will let you build a single set of API calls that can use different environments if you have multiple Zenoss Instances.
    • Zenoss Core, Zenoss Resource Manager, and ZaaS will be slightly different than Zenoss Cloud



Zenoss Core, Zenoss Resource Manager, or ZaaS Environment Example

This is what your environment should look like. Your password will be clear text here but it would be visible other places in Postman if you set it elsewhere, even if you share your repository. Setting it here it won't be visible if you share.

This is where you set your authorization and what it looks like using the environment variables. 


Finally, this is what your request will look like. You will use your {{url}} variable and will just need to add the appropriate router.

Zenoss Cloud Environment Example


Zenoss Cloud is a little simpler. Since you will use an API Key for authentication you just set that as a variable along with your Zenoss Cloud URL


Your requests will look like this. The {{url}} is used the same as Zenoss Core or Zenoss Resource Manager where you only need to add your router. You will include a new header with z-api-key as the key and the {{api_key}} variable as the value.