Product Features
...
Access Control
Tokens
Test REST API using Postman or Curl
5min
this set of instructions explains how to access the litmus edge apis using an external tool curl command or postman api tokens are unique authentication credentials assigned to individual users you can create api tokens to use the litmus edge rest apis the back end apis communicate with the front end interface through http rest if you want to use a custom interface or some other custom application to access the underlying apis, the litmus edge api keys management allows you to create an api token when accessing an exposed api, you can use the same api token for any of the exposed apis to access api documentation, contact your litmus representative for the example below, we will test the devicehub version of your litmus edge instance before you begin create api credentials docid\ dxgpm5ir bz wk3iv s9q validate the api token from the action menu of the api token see manage api credentials docid 7 o3n hxk7c 7hxeuw5qe to learn more copy the api token (click the copy icon next to the api token value) see manage api credentials docid 7 o3n hxk7c 7hxeuw5qe to learn more option 1 access rest apis with postman you can manually test a rest api with the postman application you will need to install and open postman https //www postman com/downloads/ to use postman to view the component version open postman or access the web version of postman make sure that get is selected from action drop down list enter the api endpoint t o verify the component version \[litmus edge ip address]/\[component name]/version for example, https //192 168 0 148/devicehub/version click the authorization tab from the type drop down list, select basic auth paste the litmus edge api token in the username field leave the password field blank click send review the version number in the response see the verify response section below to cross reference the component version in litmus edge option 2 access rest apis with curl command you can use a command prompt window to manually test a rest api in a command prompt window, enter the following command curl k u d7izh3c4w1nwow0yvz1ypjq6h2soaoxm request get https //192 168 0 147/devicehub/version in the command above replace d7izh3c4w1nwow0yvz1ypjq6h2soaoxm with your own litmus edge api token the format username\ password is used, but because we aren't entering a password, no characters are needed after the colon ( ) replace 192 168 0 147 with your own litmus edge ip address the k parameter allows you to use basic authorization to access the api the u parameter defines the user for the command, which is the litmus edge api token the response should display something like the following {"version" "2 18 4","git" "0d44345d94e9"} complete the steps below to cross reference the component version in litmus edge verify the response to verify the response copy the version number in the api response from the previous step in litmus edge, navigate to system > support and refer to the status section cross reference the version number from the api response and the version number for devicehub api the version numbers should match