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

  1. Locate the token that you copied in the previous task.
  2. On a new line, write the following command using your token as indicated below:
    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
  3. 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: