Access/acls/{userGroup}: POST
Copies the REST API ACL entries from an existing user group.
Availability
Available on all IBM Storage Scale editions.
Description
The POST access/acls/{userGroup} request copies all REST API ACL entries from an existing user group and overwrites the ones that are defined for the specified group.
Request URL
https://<IP address or host name of API server>:port/scalemgmt/v2/access/acls/userGroup
where:- acls/ userGroup
- Specifies the user group name where the copied ACL entries are added. Required.
Request headers
Accept: application/json
Request parameters
The following parameters can be used in the request URL to customize the
request:
Parameter name | Description and applicable keywords | Required/optional |
---|---|---|
userGroup | The name of the user group where the copied entries are added. | Required. |
copyFrom | The name of the user group from where the ACL entries are copied. | Optional. |
Request data
No request data.
Response data
{
"status": {
"code":ReturnCode",
"message":"ReturnMessage"
},
"jobs": [
{
"result":"",
{
"commands":"String",
"progress":"String,
"exitCode":"Exit code",
"stderr":"Error",
"stdout":"String",
},
"request":" ",
{
"type":"{GET | POST | PUT | DELETE}",
"url":"URL",
"data":""",
}
"jobId":"ID",
"submitted":"Time",
"completed":Time",
"status":"Job status",
"pids":"Process IDs
}
],
}
The details of the parameters are provided in the following list:
- "jobs":
- An array of elements that describe jobs. Each element describes one job.
- "status":
- Return status.
- "message": "ReturnMessage",
- The return message.
- "code": ReturnCode
- The return code.
- "result"
-
- "commands":"String'
- Array of commands that are run in this job.
- "progress":"String'
- Progress information for the request.
- "exitCode":"Exit code"
- Exit code of command. Zero is success and nonzero denotes failure.
- "stderr":"Error"
- CLI messages from stderr.
- "stdout":"String"
- CLI messages from stdout.
- "request"
-
- "type":"{GET | POST | PUT | DELETE}"
- HTTP request type.
- "url":"URL"
- The URL through which the job is submitted.
- "data":" "
- Optional.
- "jobId":"ID",
- The unique ID of the job.
- "submitted":"Time"
- The time at which the job was submitted.
- "completed":Time"
- The time at which the job was completed.
- "status":"RUNNING | COMPLETED | FAILED"
- Status of the job.
- "pids":"Process ID"
- The process IDs of all the active sub processes that manage the job.
Examples
The following example shows how to copy ACL entries from the user group
Administrator
to the user group CsiAdmin
.
Request data:
curl -k -u admin:admin001 -X POST --header 'content-type:application/json' --header 'accept:application/json'
'https://198.51.100.1:443/scalemgmt/v2/access/acls/CsiAdmin?copyFrom=Administrator'
Response data:
Note: In the JSON data that is returned, the return code indicates whether the
command is successful. The response code 200 indicates that the command successfully retrieved the
information. Error code 400 represents an
invalid request and 500 represents internal server error.
{
"jobs" : [ {
"jobId" : 1000000000003,
"status" : "COMPLETED",
"submitted" : "2021-01-30 18:01:45,173",
"completed" : "2021-01-30 18:01:45,737",
"runtime" : 564,
"request" : {
"type" : "POST",
"url" : "/scalemgmt/v2/access/acls/CsiAdmin"
},
"result" : {
"progress" : [ ],
"commands" : [ "mv --force '/var/lib/mmfs/gui/settings.json.33cc0d46-d623-43ca-86a9-508623c85b5c' '/var/lib/mmfs/gui/settings.json' " ],
"stdout" : [ "info: chrestacl CsiAdmin copy --from Administrator --force --verbose " ],
"stderr" : [ ],
"exitCode" : 0
},
"pids" : [ ]
} ],
"status" : {
"code" : 200,
"message" : "The request finished successfully."
}
}