OData APIs enable data to be retrieved from Data Engine. Full reader OData APIs enable you to query current data. Temporal OData APIs enable you to query historical data from the past three months.
Get started with the OData APIs by obtaining an access token and then using the access token to interact with the OData APIs in Postman.
Before getting started you require the following:
-
Username and password of an account that has data access permissions for Data Engine.
-
Tenant name for the institution. If you do not know the tenant name, contact Tribal support.
-
The identity server URL for the institution, such as
https://identity.tribaledge.com/
, whereregion_name/ids/ tenant_name/connect/token region_name
is the region such asEMEA
orAPAC
, andtenant_name
is the tenant name such ashessle
. For example,https://identity.tribaledge.com/
.emea/ids/hessle/connect/token -
The endpoint URLs to interact with after obtaining an access token. For example,
https://api.tribaledge.com/
. You must replaceemea/odsservice/hessle/odata/entity entity
with the name of the entity you want to interact with, such asPeople
orApplications
. For example,https://api.tribaledge.com/
oremea/odsservice/hessle/odata/People https://api.tribaledge.com/
. For more information, go to Data Engine message types.emea/odsservice/hessle/odata/temporal/People -
Postman to obtain the access token from Identity server and then interact with the OData APIs. The latest version of Postman can be downloaded from the website: Postman download.
Then, get started as follows:
Obtain an access token from Identity server
Obtain an access token from Identity server as follows:
-
In Postman, create a new POST request for a token. Select New and then select HTTP request.
Then, select POST from the drop-down list and add the identity server URL in Enter request URL, as shown in the image New POST request.
For example,
https://identity.tribaledge.com/
.emea/ids/hessle/connect/token -
Go to the POST request body and select x-www-form-urlencoded. Then, add the key-value pairs as defined in the table POST request body.
POST request body Key Notes grant_type
Type of authorisation used to request a token. This must be set to password
.username
Username of the Edge account, such as hessle.tde
.password
Password of the Edge account, such as //++\7T$tw3gQL,u
.audience
Authentication audience, this must be set to all_resources
.client_id
Client identification, this must be set to apiclient
.client_secret
Client secret, this must be set to apisecret
.The image POST request for token shows the POST request body with the key-value pairs highlighted.
-
Send the POST and wait for a response.
If successful, the API returns a
200 OK
status and an access token as shown in the image Access token obtained.If the request is unsuccessful, the API returns a
400 Bad Request
status and a message indicating the specific error. For example,The resolved tenant is invalid
indicates that the POST URL is incorrect.
Interact with the OData APIs in Postman
Use the access token to interact with the OData APIs in Postman as follows:
-
In Postman, copy the access token from the response pane.
You must copy the access token without the quotation marks as these are not part of the access token.
-
In Postman, create a new GET request to retrieve the application. Select New and then select HTTP request.
Then, select GET from the drop-down list and add the endpoint URL in Enter request URL. For example, retrieve the current or historical data for the
People
entity as follows:- Full reader OData endpoint URL for current data
https://api.tribaledge.com/
emea/odsservice/hessle/odata/People - Temporal OData endpoint URL for historical data
https://api.tribaledge.com/
.emea/odsservice/hessle/odata/temporal/ People?PeriodFrom=2023-03-01T10:00:00&PeriodTo=2023-04-01T17:00:00 -
The
PeriodFrom
andPeriodTo
parameters are mandatory and must be in the format,YYYY-MM-DDTHH:mm:ss
. Also,PeriodFrom
date cannot be more than three months in the past.
-
Go to the GET request Authorisation and select Bearer token. Then, paste the bearer token from step 1.
-
Send the GET and wait for a response.
If the request is successful, Postman displays a
200 OK
status, as shown in the image Successful API request.If the request is unsuccessful, the API returns a status and a message indicating the specific error. For example,
401 Unauthorised
which indicates that authorization was not successful.