Jump to content

Explore Domotz API with Postman


iacopo
 Share

Recommended Posts

Postman can be used to test any REST API, it is an easy-to-use client with powerful features.

 

You can use it to create a collection of methods for calling the Domotz API.

 

Once started, just click into the 'Import' button and choose 'Link' then insert the following URL:

https://api-us-east-1-cell-1.domotz.com/public-api/v1/meta/open-api-definition (or https://api-eu-west-1-cell-1.domotz.com/public-api/v1/meta/open-api-definition if you are not located in North America).

 

A new 'Domotz Public API' collection will be created: for using it you need your API key.

 

My suggestion is to create a new variable (right-click on 'Domotz Public API'->Edit->Variables), let's call it 'api_key', and use a reference to it - ${{api_key}} - in the rest of the collection.

 

You'll need to copy ${{api_key}} as the value of the header 'X-API-Key' in all the methods you want to use: once finished you can save your collection so that you can test it with different API keys by just change the variable value.

 

Import_OpenAPI_definitions.png

Create Variable.png

reference variable.png

  • Like 1
Link to comment
Share on other sites

  • 5 months later...

@iacopo Thanks for this - Postman has been working out well thus far for testing.  Curious about creating multiple SNMP eyes to a single device from Postman.

 

I can currently post a single eye without issue but wondering if creating multiple eyes on a single devices can be done with something like this in the Body of the POST?

 
{
  "category": "OTHER",
  "name": "snmptest",
  "oid": "1.1.1.1.1",
  "value_type": "STRING"
},
{
  "category": "OTHER",
  "name": "snmptest2",
  "oid": "1.1.1.1.2",
  "value_type": "STRING"
}
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...