This section explains how to delete a group and then check that it was deleted properly.
Note: It is necessary to use a global token when executing this API.
-
Set the environment variable below as follows:
$ TEMP_GROUP_ID=<groupIdToBeDeleted>
-
Execute the following API:
$ curl -i -X DELETE -Ss $IDENTITY/v3/groups/$TEMP_GROUP_ID \
-H "X-Auth-Token:$OS_AUTH_TOKEN" -H "Content-Type:application/json"
The following response is output:
HTTP/1.1 204 No Content
X-Fcx-Endpoint-Request: EXECUTED_REQ<nineDigitNum>_204
Vary: X-Auth-Token
Date: Tue, 17 Nov 2015 07:00:02 GMT
-
List the groups to confirm that the group has been successfully deleted.
$ curl -X GET -Ss $IDENTITY/v3/groups?domain_id=$DOMAIN_ID \
-H "X-Auth-Token:$OS_AUTH_TOKEN" -H "Content-Type:application/json" | \
jq .
With a format such as the following, a list of groups in the same domain is displayed, and if the group targeted for deletion is not in the list, this indicates that deletion was successful.
{
"links": {
"self": "http://identity.cloud.global.fujitsu.com/v3/groups",
"previous": null,
"next": null
},
"groups": [
...
{
"domain_id": "<domainId>",
"description": "<groupDesc>",
"id": "<groupId>",
"links": {
"self": "http://identity.cloud.global.fujitsu.com/v3/groups/<groupId>"
},
"name": "<groupName>"
},
...
]
}