User Group Report (v1)
Generates a User Group Report of users in the system and writes the report to the filename provided. This report lists the direct or indirect membership of users assigned to the group. It can be downloaded using the Download API.
The report indicates whether the user assignment to group is direct (as member of a group) or indirect (as member of a group that is a child of a nested group). The report identifies the user's login name, first name, last name, email address, assigned group, and type of assignment in the following format. It is identical to the CSV version of the report created from the User Group Report tab in Access Control.
For example, assume that user jdoe is a member of group Test1, which is a child of nested group Test2. In this scenario, the report will display the following information for jdoe:
User, First Name, Last Name, Email, Direct, Group
jdoe, John, Doe, jdoe@example.com, Yes, test1
jdoe, John, Doe, jdoe@example.com, No, test2
This is an asynchronous job and returns the Job ID.
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/<api_version>/usergroupreport
Table 13-74 Tasks for User Group Report
| Task | Request | REST Resource |
|---|---|---|
| User Group Report | POST |
|
| User Group Report Status | GET |
|
Request
Supported Media Types: application/x-www-form-urlencoded
Table 13-75 Parameters
| Name | Description | Type | Required | Default |
|---|---|---|---|---|
filename |
The name of the file where the report is to be populated, such as
userGroupReport.csv.
|
Form | Yes | None |
Response
Supported Media Types: application/json
Table 13-76 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
{
"details": null,
"links": [
{
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/usergroupreport",
"rel": "self",
"data": {
"jobType": "GENERATE_USER_GROUP_REPORT",
"filename": "<filename>"
},
"action": "POST"
},
{
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/<jobId>",
"rel": "Job Status",
"data": null,
"action": "GET"
}
],
"status": -1,
"items": null
}
Example 2: Job Completes with Errors
{
"details": "Failed to generate User Group Report. File <filename> already exists. Please provide different file name. ",
"links": [
{
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/<jobId>",
"rel": "self",
"data": null,
"action": "GET"
}
],
"status": 1,
"items": null
}
Example 3: Job Completes without Errors
{
"details": null,
"links": [
{
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/<jobid>",
"rel": "self",
"data": null,
"action": "GET"
}
],
"status": 0,
"items": null
}
Sample cURL Command Basic Auth
curl -X POST -s -u '<USERNAME>:<PASSWORD>' -H'Content-Type: application/x-www-form-urlencoded' -d 'filename=usergroupreportnew.csv' 'https://<BASE-URL>/interop/rest/security/v1/usergroupreport'
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=usergroupreportnew.csv' 'https://<BASE-URL>/interop/rest/security/v1/usergroupreport'