Role Assignment Report (v1)

Generates a Role Assignment Report (.CSV). This report lists the predefined roles (for example, Service Administrator) and granular roles (for example, Approvals Ownership Assigner, Approvals Supervisor, Approvals Administrator, and Approvals Process Designer, which are Planning granular roles) assigned to users. This report matches the CSV version of the Role Assignment Report generated from Access Control. Additionally, it can generate reports containing Identity Domain Administrator on the system by specifying the user type. The API writes the report to the filename provided, and the report can then be downloaded using the Download REST API.

This is an asynchronous job and uses the job status URI to determine if the operation is complete.

The presence of status -1 in the response indicates that the generation of Role Assignment Report is in progress. Use the job status URI to determine whether the generation of Role Assignment Report is complete. Any non-zero status except -1 indicates failure of generating Role Assignment Report.

Required Roles

  • Service Administrator

  • Any predefined role and the Access Control - Manage granular role

  • Any predefined role and the Access Control - View granular role

REST Resource

POST /interop/rest/security/v1/roleassignmentreport

Table 13-94 Tasks for User Assignment Report

Task Request REST Resource
Role Assignment Report POST

/interop/rest/security/v1/roleassignmentreport/

Role Assignment Report Status GET

/interop/rest/security/v1/jobs/{jobId}

Request

Supported Media Types: application/x-www-form-urlencoded

Table 13-95 Parameters

Name Description Type Required Default
filename File name for the file where the report is to be populated, such as roleAssignmentReport.csv Form Yes None
usertype User type for which to generate the report. This paramenter is optional. If provided values can be either ServiceUsers or IDAdmins. Form No ServiceUsers

Response

Supported Media Types: application/json

Table 13-96 Parameters

Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Can be self and/or Job Status. If set to Job Status, you can use the href to get the status of the import operation
data Parameters as key value pairs passed in the request

Examples of Response Body

Example 1: Job is in Progress

{
    "links": [
        {
            "data": {
                "jobType": "GENERATE_ROLE_ASSIGNMENT_REPORT",
                "filename": "<filename>"
                "usertype": "<USER_TYPE>"
            },
            "action": "POST",
            "href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/<jobId>",
            "rel": "Job Status"
        }
    ],
    "status": -1,
    "details": null,
    "items": null
}

Example 2: Job Completes with Errors

{
    "links": [
        {
            "data": {
                "jobType": "GENERATE_ROLE_ASSIGNMENT_REPORT",
                "filename": "<filename>"
                "usertype": "<USER_TYPE>"
            },
            "action": "POST",
            "href": "https://<BASE-URL>/interop/rest/security/{api_version}/roleassignmentreport",
            "rel": "self"
        }
    ],
    "status": 1,
    "details": "EPMCSS-20665: Failed to generate Role Assignment Report. Invalid or insufficient parameters are specified. Provide all required parameters for the REST API. ",
    "items": null
}

Example 3: Job Completes without Errors

{
    "links": [
        {
            "data": null,
            "action": "GET",
            "href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/<jobID>",
            "rel": "self"
        }
    ],
    "status": 0,
    "details": null,
    "items": null
}

Sample cURL Command Basic Auth

curl -X POST -s -u '<USERNAME>:<PASSWORD>' -H'Content-Type: application/x-www-form-urlencoded' -d 'filename=roleAssignmentReportUsers.csv&usertype=ServiceUsers' 'https://<BASE-URL>/interop/rest/security/v1/roleassignmentreport'

Sample cURL Command OAuth 2.0

curl -X POST --header "Authorization: Bearer <OAUTH_ACCESS_TOKEN>" -H 'Content-Type: application/x-www-form-urlencoded' -d 'filename=roleAssignmentReportUsers.csv&usertype=ServiceUsers' 'https://<BASE-URL>/interop/rest/security/v1/roleassignmentreport'