User Access Report (v2)

The User Access Report (v2) REST API generates an access report of users provisioned in the environment and writes the report to the filename provided. This report can then be downloaded using the download command.

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

This API is version v2.

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/v2/reports/useraccess

Table 13-83 Tasks for User Access Report

Task Request REST Resource
User Access Report POST

/interop/rest/v2/reports/useraccess

Request

Supported Media Types: application/json

Table 13-84 Parameters

Name Description Type Required Default
fileName File where report is to be populated Payload Yes None
format The format of the csv file, classic or simplified Payload No classic
usertype Wheter to generate the report only for Identity Domain Administrators, IDAdmins or ServiceUsers Payload No ServiceUsers

Example URL and Payload

https://<BASE-URL>/interop/rest/v2/reports/useraccess
{   
    "fileName": "provisionreport.csv",
    "parameters": {
        "format": "simplified",
        "usertype": "IDAdmins"
    }
}

Response

Supported Media Types: application/json

Table 13-85 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 null

Example of Response Body

{
    "details": null,
    "status": -1,
    "links": [
        {
            "href": "https://<BASE-URL>/interop/rest/v2/reports/useraccess",
            "action": "POST",
            "rel": "self",
            "data": null
        },
        {
            "href": "https://<BASE-URL>/interop/rest/v2/status/jobs/22747066997747363",
            "action": "GET",
            "rel": "Job Status",
            "data": null
        }
    ]
}

Sample cURL Commands Basic Auth

curl -X POST -s -u '<USERNAME>:<PASSWORD>' -H 'Content-Type: application/json' -d '{"fileName":"provisionreport.csv","parameters":{"format":"simplified","usertype":"ServiceUsers"}}' 'https://<BASE-URL>/interop/rest/v2/reports/useraccess'
curl -X POST -s -u '<USERNAME>:<PASSWORD>' -H 'Content-Type: application/json' -d '{"fileName":"provisionreportID.csv","parameters":{"format":"simplified","usertype":"IDAdmins"}}' 'https://<BASE-URL>/interop/rest/v2/reports/useraccess'

Sample cURL Commands OAuth 2.0

curl -X POST --header "Authorization: Bearer <OAUTH_ACCESS_TOKEN>" -H 'Content-Type: application/json' -d '{"fileName":"provisionreport.csv","parameters":{"format":"simplified","usertype":"ServiceUsers"}}' 'https://<BASE-URL>/interop/rest/v2/reports/useraccess'
curl -X POST --header "Authorization: Bearer <OAUTH_ACCESS_TOKEN>" -H 'Content-Type: application/json' -d '{"fileName":"provisionreportID.csv","parameters":{"format":"simplified","usertype":"IDAdmins"}}' 'https://<BASE-URL>/interop/rest/v2/reports/useraccess'