Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

The below document details the steps to use x-api to get the user information.

Prerequisites

  1. Postman application.

  2. The x-api collection.

  3. Base64 encode application.

  4. https://orbita.atlassian.net/wiki/spaces/OCS/pages/7733431/How+do+I+use+Rest+APIs#Using-Postman-to-access-the-REST-APIs

  File Modified
No files shared here yet.

Steps to follow

Login-AdminUser

  1. Log in to the environment using Login API.

  2. Use the admin’s username and password in the body of the request and click “Send”.

    {
                "username":"example@orbita.com",
                "password":"Password@123"
    }
  3. You will receive a token in the response.

  4. Copy the token to the environment variables.

GetAPIKey

  1. Open the GetAPIKey API and click Send.

  2. You will get an apiKey as a response from this API.

  3. Copy the apiKey to the environment variables.

GetUser To Update APIKey

  1. Get the user information using the userId in the GetUser To Update APIKey API Url.

  2. Copy the response body.

Update User with APIToken

  1. Use the Update User with APIToken API and copy the user information into the body of this API.

  2. Replace the apiKey in the body with the apiKey stored in the environment variables.

  3. Click on Send to update the user’s apiKey.

Encode apiKey

Use base64 encoding to encode the apiKey and copy the encoded key to x-api in environment variables.

GetUser ByAPIKeyOnHeader

  1. Now you can get the user information using the x-api key in the header.

  • No labels