Introduction to the Autonomous Identity API

Autonomous Identity provides a RESTful application programming interface (API) that lets you use HTTP request methods ( GET, PUT, and POST ) to interact with the system and its components. The API lets a developer make requests to send or receive data to an Autonomous Identity endpoint, a point where the API communicates with the system. The data that is sent or returned is in JavaScript Object Notation (JSON) format.

Autonomous Identity provides easy integration with popular API clients, such as Swagger and Postman. Autonomous Identity also provides easy integration with Swagger by providing a swagger.yml file with the deployment. You can download and install the Autonomous Identity Postman Collection from ForgeRock Google Cloud Repository (gcr.io).

The next two sections show you how to set up Swagger and Postman.

Swagger

The Autonomous Identity API supports Swagger, a popular API design tool that allows you to interact with the API and the Configuration Service API. You can access the API using the Swagger client at https://<autoid-ui>/swagger. For example, https://autoid-ui.forgerock.com/swagger.

The API microservice serves a swagger.yml file, accessible at https://<autoid-ui>/api/swagger. For example, https://autoid-ui.forgerock.com/api/swagger.

The Configuration services also serves the swagger.yml file, accessible at https://<autoid-ui>/conf/swagger. For example, https://autoid-ui.forgerock.com/conf/swagger.

Access the Autonomous Identity API on Swagger
  1. Open a browser and point it to https://<autoid-ui>/swagger.

  2. To view the Autonomous Identity API, enter <autoid-ui>/api/swagger. For example, enter <autoid-ui>.forgerock.com/api/swagger, and then click Explore.

  3. First, obtain a bearer token by accessing the /api/authentication/login endpoint. You provide your username and password on Autonomous Identity in the request body.

  4. Upon a successful authentication, the response returns a bearer token.

  5. Use the bearer token in the Authorize section of the Swagger client.

  6. Once you are authorized, access the API endpoints to see or add data. For example, access the Autonomous Identity Company View endpoint to get information on the company dataset.

Access the Autonomous Identity Configuration Service API on Swagger
  1. On the Swagger client, click Authorize and then log in using the Configuration Service admin username and password.

  2. Once you are authorized, access the API endpoints to see or add data. For example, access the Autonomous Identity configuration endpoint to get information.

Postman Collections

ForgeRock provides a Postman Collection that lets you use saved requests to access the Autonomous Identity API endpoints.

You need to authenticate first by calling the Authentication/Login request before doing any other requests as the token is required to access the endpoints. By default, there is a post request runner that will pull the token out and set it into the environment variable {{token}}, and it will then be passed into the subsequent API calls to the other sections of the API as a Bearer token.

When creating new requests, if they are created in an existing folder, they will inherit the Bearer Auth settings from the folder itself. New folders will need to have these authorization settings set into them with Bearer auth and {{token}} as the value.

The format of the API variable should follow ${domain}/api/. It should always have the suffix of api/ no matter the domain.

Set Up the Autonomous Identity Postman Collection
  1. Download the Autonomous Identity Postman Collections from the BackStage.

  2. Open Postman.

  3. Click Import, click the box, and select API.postman_collection.json.

  4. To set the environment, click Import, click the box, and select postman_environment.json.

Read a different version of :