Jump to content
Sign in to follow this  
iacopo

Explore Domotz API with Postman

Recommended Posts

iacopo

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...