Accessing the IDM REST APIs

Overview

You can use many, but not all, of the Identity Management APIs with Identity Cloud.

Before you can authenticate to the IDM API server, must first obtain an access token. The access token must include:

  • IDM admin privileges

  • The fr:idm:* scope

Getting a user access token

There are many different ways to get a user access token. One way is to use the Identity Cloud Postman collection.

  1. Follow the instructions for getting started with the Postman collection:

  2. In the Postman collection, click Prerequisites.

  3. To create an admin user and set the scope, complete Steps 1 through 3.

    Show me where

    postman admin user

  4. To generate a token, complete any one of flows in the OAuth 2.0 directory.

    Show me where

    postman oauth2 flows

Authenticate to the IDM API server

  1. Set a shell environment variable with your access token value.

    Example:
    export TOKEN="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkNWE4NDVjMy03MjFh
    LTQzN2QtYjIyZi04ZjNlNzUyNDExNWIiLCJjdHMiOiJPQVVUSDJfR1JBTlRfU0VUIiwiYXV0aF9sZXZ
    lbCI6MCwiYXVkaXRUcmFja2luZ0lkIjoiYjU4M2Q2NGUtM2VlYi00M2Y5LWI5ZTctZDM4MDI4MDQyYW
    JmLTY0MyIsImlzcyI6Imh0dHBzOi8vb3BlbmFtLWNhcmlhZ2EtMDUuZm9yZ2VibG9ja3MuY29tL2FtL"
  2. Run a command like this example, replacing <tenant> with your tenant name:

    curl \
      -H 'authorization: Bearer '"$TOKEN" \
      --header "Accept-API-Version: resource=1.0" \
      --request POST \
      'https://<tenant-name>.forgeblocks.com/openidm/system?_action=availableConnectors'

    For a comprehensive list of IDM APIs, see the IDM REST API Explorer.

More information