SMB/shares/{shareName}/acl/{name}: PUT
Adds an entry to the ACL of a SMB share. If an entry for the specified name already exists, it gets replaced.
Note: The share name and the user name are part of both the URL and in the JSON payload. In JSON,
both are optional, but if it is specified, they must match those in the URL.
Availability
Available on all IBM Storage Scale editions.
Description
The PUT smb/shares/shareName/acl/name request adds an entry to the ACL of a SMB share. For more information about the fields in the data structures that are returned, see mmsmb command.
Request URL
https://<IP address or host name of API server>:<port>/scalemgmt/v2/smb/shares/shareName/acl/name
where- smb/shares
- Specifies SMB share as the resource. Required.
- shareName/acl/name
- Specifies the ACL entry to be modified. Required.
Request headers
Accept: application/json
Request data
The following list of attributes are available in the response data:
{
"shareName": "Share name"
"name": "ACL name"
"access": "Allowed | Denied"
"permissions": "Access permissions",
"type": "User | Group | System | UID",
)
The
details of the parameters are given in the following list: - "sharename": "String"
- Name of the SMB share.
- "name": "ACL name"
- The name of the ACL.
- "access": "Allowed | Denied"
- Specifies whether the user is allowed or denied to access the resource.
- "permissions": "Access permissions"
- The permissions set for the ACL. Possible values are: FULL, CHANGE, READ or any combination of RWXDPO.
- "type": "User | Group | System | UID"
- Specifies the ACL type. The value selected is used only when creating an access control entry.
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",
}
],
}
For
more information about the fields in the following data structures, see the links at the end of this
topic.- "status":
- Return status.
- "message": "ReturnMessage",
- The return message.
- "code": ReturnCode
- The return code.
- "jobs":
- An array of elements that describe jobs. Each element describes one job.
- "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, 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.
Examples
The following example modifies the SMB share smbShare1.
Request data:
curl -k -u admin:admin001 -X PUT --header 'content-type:application/json' --header 'accept:application/json'
-d '{
"shareName": "myshare",
"name": "Domain1\\User3",
"access": "ALLOWED",
"permissions": "FULL",
"type": "USER" 'https://198.51.100.1:443/scalemgmt/v2/smb/shares/smbShare1/acl/Domain1%5C%5CUser3'
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.
{
"status": {
"code": "200",
"message": "..."
},
"job": [
{
"result": {},
"request": {
"type": "PUT",
"url": "/scalemgmt/v2/smb/shares/smbShare1/Domain1\\User3",
"data": "{
"shareName": "myshare",
"name": "Domain1\\User3",
"access": "ALLOWED",
"permissions": "FULL",
"type": "USER"
}",
"jobId": "12345",
"submitted": "2016-11-14 10.35.56",
"completed": "2016-11-14 10.35.56",
"status": "COMPLETED"
}
]
}