Tokens

Configure API (GraphQL) using Postman

4min

This set of instructions explains how to access the Litmus UNS APIs using an external tool: Postman.

API tokens are unique authentication credentials assigned to individual users. You can create API tokens to use the Litmus UNS APIs. The back-end APIs communicate with the front-end interface.

This section allows users to create, edit, remove and validate API keys. An API token is a unique identifier of an application requesting access to a service and is utilized when you use REST API endpoints for sending requests and retrieving data.

You need an authorization token to make requests from API endpoints. See your administrator for access to full API.

Before You Begin

Open GraphQL APIs with Postman

Similar to REST APIs, GraphQL APIs often require authentication to ensure that users have the proper access rights to the data. This document outlines the steps to obtain a token for a GraphQL API using the OAuth 2.0 authentication method.

You will need to install and open Postman.

To use Postman to view the component version:

  1. Open Postman or access the web version of Postman.
  2. Make sure that GET is selected from Action drop-down list.

    The GET command
    The GET command
    
  3. Enter the API endpoint to verify the component version: [Litmus Edge IP address]/[component name]/version.
  4. Click the Authorization tab.

    Authorization tab
    Authorization tab
    
  5. Enter the following parameters:
  • Auto-refresh Token: Turn to ONposition
  • Grant Type: Password Credentials
  • Access Token URL: https://<IP_Address_of_LUNS>/auth/realms/standalone/protocol/openid-connect/token
  • Client ID: ide-ui
  • Username/Password: Litmus UNS username/password
  • Scope: openid
  • Client Authentication: Send as Basic Auth header
  • Refresh Token URL: https://<IP_Address_of_LUNS>/auth/realms/standalone/protocol/openid-connect/token
Document image


6. Postman will return with a response that the authentication is complete.