How to use x-api
The below document details the steps to use x-api to get the user information.
Prerequisites
Postman application.
The x-api collection. (included)
Base64 encode application.
How do I use Rest APIs? | Using Postman to access the REST APIs
Steps to follow
Login-AdminUser
Log in to the environment using Login API.
Use the admin’s username and password in the body of the request and click “Send”.
{ "username":"example@orbita.com", "password":"Password@123" }
You will receive a
token
in the response.Copy the token to the environment variables.
GetAPIKey
Open the GetAPIKey API and click Send.
You will get an
apiKey
as a response from this API.Copy the
apiKey
to the environment variables.
GetUser To Update APIKey
Get the user information using the userId in the GetUser To Update APIKey API Url.
Copy the response body.
Update User with APIToken
Use the Update User with APIToken API and copy the user information into the body of this API.
Replace the
apiKey
in the body with theapiKey
stored in the environment variables.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
Now you can get the user information using the x-api key in the header.