Remove Groups (v2)

REST Resource

POST /interop/rest/security/v2/groups/remove

Table 2-72 Tasks for Remove Groups

Task Request REST Resource
Remove groups POST /interop/rest/security/v2/groups/remove

Request

Supported Media Types: application/json

Table 2-73 Parameters

Name Description Type Required Default
groups List of groups to remove. Payload Yes None

Example URL and Payload

https://<BASE-URL>/interop/rest/security/v2/groups/remove
{
	       "groups": 
              [
              {
		        "groupname": "GroupA"
    	    },
   	     {
		        "groupname": "GroupB"
              }
              ]
}

Response

Supported Media Types: application/json

Table 2-74 Parameters

Name Description
links Detailed information about the link and HTTP call type
status

Identifies the status of the operation

  • 0 - Operation succeeded

  • 1 - Operation failed

error Detailed information about the error
details Detailed status of the operation performed. Total number of records processed, succeeded, and failed, and the reason for why they failed.

Examples of Response Body

Example 1: Job Completes without Errors

{
	"links": {
    		"href": "https://<BASE-URL>/interop/rest/security/v2/groups/remove",
    		"action": "POST"
	},
	"status": 0,
	"error": null,
	"details": {
		"processed": 2,
		"succeeded": 2,
		"failed": 0,
		"faileditems": null
	}
}

Example 2: Job Completes with Errors

{
	"links": {
    		"href": "https://<BASE-URL>/interop/rest/security/v2/groups/remove",
    		"action": "POST"
	},
	"status": 1,
	"error": {
        		"errorcode": "EPMCSS-21120",
        		"errormessage": "Failed to remove groups. Invalid or insufficient parameters specified. Provide all required parameters for the REST API."
    	},
	"details": null
}

Example 3: Job Completes with Partial Errors

{
	"links": {
    		"href": "https://<BASE-URL>/interop/rest/security/v2/groups/remove",
    		"action": "POST"
	},
	"status": 0,
	"error": null,
	"details": {
		"processed": 5,
		"succeeded": 3,
		"failed": 2,
		"faileditems": 
		[
		{
               	 	"groupname": "GroupA",
               	 	"errorcode": "EPMCSS-21125",
                		"errormessage": "Failed to remove group. Group GroupA does not exist. Provide a valid groupname."
            	},
           	 {
               		"groupname": "GroupB",
                		"errorcode": "EPMCSS-21125",
                		"errormessage": "Failed to remove group. Group GroupB does not exist. Provide a valid groupname."
            	}
		]
	}
}

Sample cURL Command Basic Auth

curl -X POST -s -u '<USERNAME>:<PASSWORD>' -H 'Content-Type: application/json' -d '{"groups":[{"groupname":"GroupA"},{"groupname":"GroupB"}]}' 'https://<BASE-URL>/interop/rest/security/v2/groups/remove'

Sample cURL Command OAuth 2.0

curl -X POST --header "Authorization: Bearer <OAUTH_ACCESS_TOKEN>" -H 'Content-Type: application/json' -d '{"groups":[{"groupname":"GroupA"},{"groupname":"GroupB"}]}' 'https://<BASE-URL>/interop/rest/security/v2/groups/remove'