Access and authentication

Content Intelligence Content Monitor Help

Version
2.2.x
2.1.x
2.0.x
Audience
anonymous
Part Number
MK-HCI006-00

To use the REST API, you need a user account that has permission to perform the actions you want. Contact your HCM administrator for assistance.

After you have a user account, you need to request an authentication token from the system. To do this, you send an HTTP POST request to the /auth/oauth endpoint. Here's an example using the cURL command-line tool:

curl -ik -X POST https://<system-hostname>:8000/auth/oauth/ \
-d grant_type=password \
-d username=<your-username> \
-d password=<your-password> \
-d client_secret=hci-client \
-d client_id=hci-client \
-d realm=<security-realm-name-for-an-identity-provider-added-to-Hitachi Content Intelligence>

In response to this request, you receive a JSON response body containing an access_token field. The value for this field is your token. For example:

{"access_token" : "eyJr287bjle..."

Note:
  • To get a list of security realms for the system, send an HTTP GET request to the /setup endpoint. For example, to do this with cURL:

    curl -X GET --header 'Accept: application/json' 'https://cluster110f-vm1.lab.archivas.com:<admin-app-port>/api/admin/setup'

  • To get an access token for the local admin user account, you can omit the realm option for the request, or specify a realm value of Local.

You need to specify your access token as part of all REST API requests that you make. You do this by submitting an Authorization header along with your request. Here's an example that uses cURL:

curl -X GET --header "Accept:application/json" https://<system-hostname>:<monitor-app-port>/api/map/dashboards --header "Authorization: Bearer <your-token>"