Roles
The following are Autonomous Identity filtering by roles endpoints (New APIs introduced in this release are marked with ):
POST /api/roles
- GET /api/roles
-
Create draft roles and make udpates to roles.
Endpoint
/api/roles
Authorization
<Bearer Token JWT-value>
Body
{ "action": “create” | “save” | “publish” | “unpublish”, "updateAllMetadata": false, "role": { "role_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "status": "draft", "custom_role": false, "member_count": 0, "assignment_count": 0, "entitlements": [ "string" ], "entitlements_metadata": [ { "ent_id": "string", "ent_name": "string", "application": { "app_id": "string", "app_name": "string", "application_owner": { "usr_id": "string", "usr_name": "string", "usr_manager_id": "string" } }, "entitlement_owner": { "usr_id": "string", "usr_name": "string", "usr_manager_id": "string" } } ], "justifications": [ "string" ], "role_metadata": { "role_name": "string", "description": "string", "role_owner": { "usr_display_name": "string", "usr_id": "string" } } } }
Example Request
curl --location --request POST 'https://autoid-api.forgerock.com/api/roles' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data-raw '{ "action": “create” | “save” | “publish” | “unpublish”, "updateAllMetadata": false, "role": { "role_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "status": "draft", "custom_role": false, "member_count": 0, "assignment_count": 0, "entitlements": [ "string" ], "entitlements_metadata": [ { "ent_id": "string", "ent_name": "string", "application": { "app_id": "string", "app_name": "string", "application_owner": { "usr_id": "string", "usr_name": "string", "usr_manager_id": "string" } }, "entitlement_owner": { "usr_id": "string", "usr_name": "string", "usr_manager_id": "string" } } ], "justifications": [ "string" ], "role_metadata": { "role_name": "string", "description": "string", "role_owner": { "usr_display_name": "string", "usr_id": "string" } } } }’
Example Response
204 (No Content)
POST /api/roles/delete
- POST /api/roles/delete
-
Delete roles.
Endpoint
/api/roles/delete
Authorization
<Bearer Token JWT-value>
Body
{ "role_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "status": "draft" | “active” }
Example Request
curl --location --request POST 'https://autoid-api.forgerock.com/api/admin/updateSelf' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data-raw '{ "role_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "status": "draft" | “active” }'
Example Response
204 (No content)
POST /api/roles/export
- POST /api/roles/export
-
Export role data to json.
Endpoint
/api/roles/export
Authorization
<Bearer Token JWT-value>
Body
{ "timestampThresholds": { "gte": "2021-06-02T12:00:00.000Z", “lt”: “2021-08-02T12:00:00.000Z” }, "usrId": "roy.heavey", “entId”: “Cognos Reporting”, “status”: “draft” | “active” | “candidate” }
Example Request
curl --location --request POST 'https://autoid-api.forgerock.com/api/roles/export' \ --header 'Content-type: application/json' \ --header 'Authorization: Bearer <token>' \ --data-raw '{ "timestampThresholds": { "gte": "2021-06-02T12:00:00.000Z", “lt”: “2021-08-02T12:00:00.000Z” }, "usrId": "roy.heavey", "status": "draft" }'
Example Response
{ roles: [ { "role_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "status": "draft", "custom_role": false, "member_count": 0, "assignment_count": 0, "entitlements": [ "string" ], "entitlements_metadata": [ { "ent_id": "string", "ent_name": "string", "application": { "app_id": "string", "app_name": "string", "application_owner": { "usr_id": "string", "usr_name": "string", "usr_manager_id": "string" } }, "entitlement_owner": { "usr_id": "string", "usr_name": "string", "usr_manager_id": "string" } } ], "justifications": [ "string" ], "role_metadata": { "role_name": "string", "description": "string", "role_owner": { "usr_display_name": "string", "usr_id": "string" } } } ] }