User Group Report (v1)

REST Resource

POST /interop/rest/security/<api_version>/usergroupreport

Table 2-75 Tasks for User Group Report

Task Request REST Resource
User Group Report POST
/interop/rest/security/v1/usergroupreport
User Group Report Status GET
/interop/rest/security/v1/jobs/<jobId>

Request

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

Table 2-76 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 2-77 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'