Quick Start

Make your First API Call

5min

To make your first API call, you will need an access token.. Follow the steps below to get an access token using the Postman:

Prerequisite:

Step 1: Create an account with Postman if you don't already have one.

Step 2: Download & Import OS1 Postman Collection to your Postman account by following the below steps:

  1. Download the latest Postman Collection to your system. 

2. Save it on your system.

3. Go back to Postman application > Collections> Click on the Import button.

4. Import the recently downloaded OS1 Postman Collection v3.9.1 file from your system.

Import
Import


Step 3: Import the Environment File to Postman Account

1. Download the latest environment file to your system.

2. Go back to your Postman account and select the Environments tab.

3. Import the recently downloaded OS1 Environment file from your system.

4. Click Continue. This imports the environment variables that you'll use for the collection.



Document image


5. Next, add the values of the variables to the environment file table. Before that, make sure the correct OSI Environment File is selected.

6. Navigate to the Environments tab > OSI Environment File.

7. Add the variables listed in the below table.

Request Parameters

Description

Values

clientID

Get clientID generated from your registered apps credentails page on OS1 platform.

{{clientID}}:app::developerplatform

clientSecret

Get clientSecret generated from your registered apps credentials page on OS1 platfrom.

<clientSecret>

baseURL/tenantURL

The root URL for API requests or service endpoints.



Specify the path to the sandbox environment you're using. https://api.os1.dev

tenantID

An identifier for a specific tenant within an organization.

Get tenantID generated from your registered apps credentials page on OS1 platform.

requestID

A unique identifier for a specific request, often used for tracking.

Get requestID generated from your registered apps credentials page on OS1 platform. a random identifier, for example, request123

teamID

An identifier for a specific team within an organization.

Get teamID generated from your registered apps credentials page on OS1 platform

orgID

An identifier for the organization in the system. .

Get orgID from the Organization page URL-the last part of the URL is your orgID. It looks similar to this value. 833bc3a2-9ccc-424a-8ba3-9d5e9f157e74

appID

An identifier for the application within the system.

Get appID generated from your registered apps credentials page on OS1 platform.

Note: You will get the Client ID, Secret, Tenant URL, and Tenant ID after registering an app on OS1 Platform Developer Portal. For more information about registering an App, see Getting started with Apps and Solutions.

Ensure that the variable values used in the above screenshot are made up and will not work if used to make a request.

Step 4: Generate Access Token

  1. Select CoreOS Services.
  2. Go to Token.
  3. Click Send to make a POST request to receive the token. See the sample access token in the screenshot below.
Document image


4. Add this access token to the environment file.

Note:️ The access token has an expiry of upto 24 hours. If after running an API, it says the token is expired, you can simply generate a new one by following the same steps mentioned in step 3.

Step 4: Make first API call with any of the services listed in your Postman Collection,

  1. Navigate to CoreOS Services.
  2. Choose Location service > Countries > Get All Countries.
  3. Double-check that the token and tenantID variables match the values you entered in the Collection.
  4. Click Send to make your first API call.