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_nameis the region such asEMEAorAPAC, andtenant_nameis 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 entitywith the name of the entity you want to interact with, such asPeopleorApplications. 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 New POST request
-
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_typeType of authorisation used to request a token. This must be set to password.usernameUsername of the account, such as hessle.tde.passwordPassword of the account, such as //++\7T$tw3gQL,u.audienceAuthentication audience, this must be set to all_resources.client_idClient identification, this must be set to apiclient.client_secretClient secret, this must be set to apisecret.The image POST request for token shows the POST request body with the key-value pairs highlighted.
POST request for token
-
Send the POST and wait for a response.
If successful, the API returns a
200 OKstatus and an access token as shown in the image Access token obtained.If the request is unsuccessful, the API returns a
400 Bad Requeststatus and a message indicating the specific error. For example,The resolved tenant is invalidindicates that the POST URL is incorrect.Access token obtained
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
Peopleentity 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
PeriodFromandPeriodToparameters are mandatory and must be in the format,YYYY-MM-DDTHH:mm:ss. Also,PeriodFromdate 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 OKstatus, 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 Unauthorisedwhich indicates that authorization was not successful.Successful OData API request