Skip to main content
Skip table of contents

Authentication

You use the Lucidum API to authentication API access. This chapter explains the authentication endpoint.

Authentication: /v1/access_token

The endpoint to authenticate for API access is /v1/access_token.

Endpoint

Method

Parameters in Request Body

/v1/access_token.

POST

  • clientID. The Client ID for your Lucidum account. See the section on Authorization Tokens to generate this value.

  • secret. The Secret for your Lucidum account. See the section on Authorization Tokens to generate this value.

Example

Using cURL and the URL and endpoint “https://demo.lucidum.cloud/CMDB/v1/access_token”, we could use something like this to authorize:

CODE
curl -X 'POST' \
 'https://demo.lucidum.cloud/CMDB/v1/access_token' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json' \
  -d '{
  "clientId": "eVLZvAgzsSEyQjxOXrdX",
  "secret": "XdwQpiwXNWlAYjmYwOimycgaOKYbxEvTvsdAFRZv",
}'
  • curl -X ‘POST. Use the POST method instead of the default GET method.

  • https://172.22.140.107/CMDB/v1/access_token. The URL and endpoint for the API request.

  • -H ‘accept: */*'. This argument includes data in the header of the request. The argument tells cURL to accept all media types for a return.

  • -H ‘Content-Type: application/json’. This argument includes data in the header of the request. This argument specifies that the request body will be in JSON format. Lucidum recommends you use this format.

  • -d. This argument specifies that the text within the single quotation marks and curly brackets is the request body.

  • clientId. In this name: value pair, specify the Client ID for your Lucidum account that you retrieved from the Lucidum UI.

  • secret. In this name: value pair, specify the Secret for your Lucidum account that you retrieved from the Lucidum UI.

The response would look like this:

CODE
{
  "code": 200,
  "data": {
    "token": "*******************************"
  },
  "message": "success"
}
  • code: 200. This name value pair specifies the status of the request. In our example, the request was successful.

  • token: value pair. The value is the bearer token for the Lucidum API. Copy this value and store it safely. You can then include this token value in the header for other API calls to Lucidum.

  • “message”: “success”. This name value pair specifies the status of the request. In our example, the request was successful.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.