Authenticate to Identity Cloud REST API with API Key and Secret

Overview

You will need an API key and secret to authenticate to the following Identity Cloud REST API endpoints:

  • /monitoring

  • /logs

Get an API key and secret

  1. In the Identity Cloud Admin UI, click the user icon, and then click Tenant Settings.

    Show me where

    tenant menu

  2. On the Global Settings tab, click Log API Keys.

  3. Click New Log API Key, provide a name for the key, and then click Create Key.

    A dialog box appears containing the new keys:

    log api key

  4. Store the api_key_id and api_key_secret values securely.

    You cannot view the api_key_secret value again once you click Done.
  5. Click Done.

Use an API key and secret

To use the API credentials, set them as x-api-key and x-api-secret HTTP headers:

Show request
$ curl \
  --request GET 'https://<tenant-name>.forgeblocks.com/monitoring/logs/sources?_prettyPrint=true' \
  --header 'x-api-key: <api-key>' \
  --header 'x-api-secret: <api-secret>'
Show response
{
    "result": [
        "am-access",
        "am-activity",
        "am-authentication",
        "am-config",
        "am-core",
        "am-everything",
        "ctsstore",
        "ctsstore-access",
        "ctsstore-config-audit",
        "ctsstore-upgrade",
        "idm-access",
        "idm-activity",
        "idm-authentication",
        "idm-config",
        "idm-core",
        "idm-everything",
        "idm-sync",
        "userstore",
        "userstore-access",
        "userstore-config-audit",
        "userstore-ldif-importer",
        "userstore-upgrade"
    ],
    "resultCount": 22,
    "pagedResultsCookie": null,
    "totalPagedResultsPolicy": "NONE",
    "totalPagedResults": 1,
    "remainingPagedResults": 0
}