Communication with IDM

Consumption API data is returned in JSON format. Legacy API data can be returned in either XML or JSON format. You must set the HTTP headers Content-Type:application/xml or application/json, and accept:application/xml or accept:application/json as appropriate for the call you are making.

API to Generate the X-auth Token

Consumption API calls require an IdM authentication token. An authentication token is retrieved from the Identity Management component as demonstrated below. The Basic Authorization header as described in Communication with IDM will be used to retrieve this token. The token.id value returned in the response body is the token you need to include in the X-Auth-Token HTTP header.

HTTP method POST
Header See header information that follows.
REST URL https://<CSAFQDN>:<port>/idm-service/v2.0/tokens
Payload

{
"passwordCredentials" : {
"username" : "admin",
"password" : "Cloud_123+"
},
"tenantName" : "PROVIDER"
}

Parameters None
Request body See example that follows
Response body See example that follows
Returns

200 - success

400 - improperly formatted request body (most common cause is missing Content-Type header)

401 - missing or incorrect basic authentication information

403 - authentication failure
415 - missing Accept or Content-Type header, or one of these headers is not set to application/json

Listing Configuration Items in IDM

GET CALL: https://<HOSTNAME_OF_CSA>:<PORT_NUMBER>/idm-service/api/system/configurations/items/

API to Enable the Nested Groups

REST Call URL (Issue a PATCH CALL): https://<hostname:Port>/idm-service/api/system/configurations/items/idm.ldap.nested_group_level

If you want to modify the nested groups, use the JSON file below:

Input JSON:

{
"name": "idm.ldap.nested_group_level",
"displayName": "idm.ldap.nested_group_level",
"resourceType": "ldap",
"value": "3",
"defaultValue": "0",
"id": "2ccde4865fe319bc015fe319cd970019",
"description": "IDM ldap netsted group level.",
"deprecated": false,
"modifiable": true,
"needRestart": true
},

where, "value": "3" represents the number of nested groups.

API to Enable Auditing

REST Call URL (Patch method): https://<HOSTNAME_OF_CSA>:<PORT_NUMBER>/idm-service/api/system/configurations/items/idm.csa.audit.enabled

Use the below format to enable auditing:

{
"name": "idm.csa.audit.enabled",
"displayName": "idm.csa.audit.enabled",
"resourceType": "csa",
"value": "true",
"defaultValue": "false",
"id": "2ccde4865fe319bc015fe319cc250008",
"description": "Properties for CSA Auditing Server.",
"deprecated": false,
"modifiable": true,
"needRestart": true
}

REST Call URL (Patch method): https://<HOSTNAME_OF_CSA>:<PORT_NUMBER>/idm-service/api/system/configurations/items/idm.csa.audit.hostname

{
"name": "idm.csa.audit.hostname",
"displayName": "idm.csa.audit.hostname",
"resourceType": "csa",
"value": " CSA_HOSTNAME",
"defaultValue": "localhost",
"id": "2ccde4865fe319bc015fe319cc7e000d",
"description": "Properties for CSA Auditing Server.",
"deprecated": false,
"modifiable": true,
"needRestart": true
}

REST Call URL (Patch method): https://<HOSTNAME_OF_CSA>:<PORT_NUMBER>/idm-service/api/system/configurations/items/idm.csa.audit.port

{
"name": "idm.csa.audit.port",
"displayName": "idm.csa.audit.port",
"resourceType": "csa",
"value": "CSA_PORT",
"defaultValue": "PORT_NUMBER",
"id": "2ccde4865fe319bc015fe319cc8c000e",
"description": "Properties for CSA Auditing Server.",
"deprecated": false,
"modifiable": true,
"needRestart": true
}

REST Call URL (Patch method): https://<HOSTNAME_OF_CSA>:<PORT_NUMBER>/idm-service/api/system/configurations/items/idm.csa.audit.passUserName

{
"name": "idm.csa.audit.passUserName",
"displayName": "idm.csa.audit.passUserName",
"resourceType": "csa",
"value": "X-Auth-Name",
"defaultValue": "PASSING_USER_NAME",
"id": "2ccde4865fe319bc015fe319ccd10012",
"description": "Header name for getting the user info to replace the user info in audit result.",
"deprecated": false,
"modifiable": true,
"needRestart": true
}