Skip to content

Use Postman for API requests

Postman is platform for API development and testing that offers a free version. This section describes how to use it with the Zenoss API for Collection Zone and Resource Manager.

Key considerations

  • Set the request type to POST
  • Set the URI to the URI of the router you're targeting
  • 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

Zenoss recommends that you 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.
  • Resource Manager is slightly different from Collection Zone.

Resource Manager 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.

Collection Zone 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 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.