Use the token to make an API request
- Work with your customer delegated administrator (CDA) to make sure that you're properly provisioned in Oracle Life Sciences IDCS and Oracle Safety One Intake to work with REST APIs.
- Get the token generated in Get a token for authentication. To generate this token, you need a client ID and secret provided to you by your CDA.
- For this example, we continue using cURL as an example, but you can use any other REST client. For more details, see Install and configure cURL.
Note:
The authentication token expires after five minutes. Once your token expires, generate a new one.Steps
- Locate the token that you copied in the previous task.
- On a new line, write the following command using your token as indicated below:
Note:
When calling Oracle Safety One Intake APIs, you need to use the full tenant ID and not the abbreviated tenant ID, whereas when generating the authentication token, you use the abbreviated tenant ID.API usage cURL command Notes Intake Integration API curl --location 'https://api.<tenant-id>.safetyone.ocs.oraclecloud.com/s1-intake-svc/rest/v1.0/some-specific-endpoint' \ --header 'Authorization: Bearer <paste your token here generated by Client Credential type>'
This is an example of how the URL in your cURL command should look like:https://api.<tenant-id>.safetyone.ocs.oraclecloud.com/s1-intake-svc/rest/v1.0/some-specific-endpoint
Recipe Configuration, Recipes and Prediction Models curl --location 'https://<tenant-id>.safetyone.ocs.oraclecloud.com/s1-recipe-svc/rest/v1.0/some-specific-endpoint'\ --header 'Authorization: Bearer <paste your token here generated by password client type>'
This is an example of how the URL in your cURL command should look like:https://<tenant-id>.safetyone.ocs.oraclecloud.com/s1-recipe-svc/rest/v1.0/some-specific-endpoint
- Press Enter on your keyboard.
You can now start making API calls.
If you want to learn more about your API work or troubleshoot any issues you may encounter, see: