1. Info
  2. Global Oil Storage

Authentication

Login Endpoint: POST /api/pas/login

Part 1: Login Endpoint

Part 2: Aggregate Endpoint

Part 3: Detailed Endpoint


 

To utilize the login endpoint, make a POST call including the username and password. A valid token will be returned. The login endpoint general request form is: 

https://platform.ursaspace.com/api/pas/login 


The body should contain Key value pairs for user and password as well as setting the grant_type to password 

username    <your user name>

password    <your password>

grant_type  password


Here is an example HTTP Request: 

POST /api/pas/login HTTP/1.1

Host: platform.ursaspace.com

cache-control: no-cache

username=<your username>password=<your password>grant_type=password 


Here is an example cURL: 

curl -X POST \

  https://platform.ursaspace.com/api/pas/login \

   -H ‘cache-control: no-cache’ \

   -d ‘username=<your username>&password=<your password>&grant_type=password’ 


Note: Postman can help you figure out which special characters need encoding for a variety of languages when making REST calls (see the Generating client code | Postman Learning Center


The login response includes your valid JWT:

{

    “access_token”: “<your JWT is here>” “token_type”: “Bearer”,

    “expires_in”: <expiration time in seconds> 

}