Filesystems/{filesystemName}/filesets/{filesetName}/quotas: POST

Sets quota limits or default quota limit for a fileset.

Availability

Available on all IBM Storage Scale editions.

Description

The POST filesystems/filesystemName/filesets/filesetName/quotas request define quota limits for a fileset, which is part of the specified file system. For more information about the fields in the data structures that are returned, see the topics mmsetquota command and mmrepquota command.

The quota definition at the file system level must be perfileset to successfully run this API command.

Request URL

https://<API server>:<port>/scalemgmt/v2/filesystems/FileSystemName/filesets/filesetName/quotas
where
filesystems/filesystemName
The file system that contains the fileset. Required.
filesets/filesetName
The fileset for which you need to set the quota information. Required.
quotas
Specifies that you need to set the quota details. Required.

Request headers


Accept: application/json

Request data

{ 
   "operationType":"Type",
   "quotaType":"Type",
   "blockSoftLimit":"Soft limit",
   "blockHardLimit":"Hard limit",
   "filesSoftLimit":"Soft limit",
   "filesHardLimit":"Hard limit",
   "filesGracePeriod":"Grace period",
   "blockGracePeriod":"Default",
}
For more information about the fields in the following data structures, see the links at the end of this topic.
"operationType":"Operation type"
In this case, set quota.
"quotaType":"USR | GRP | FILESET"
The quota type.
"objectName":"Name"
Name of the fileset, user, or user group for which the quota is applicable.
"blockSoftLimit":"Soft limit"
The soft limit set for the fileset, user, or user group.
"blockHardLimit":"Hard limit"
The hard limit set for the capacity quota usage. A grace period starts when the hard limit is reached.
"filesSoftLimit":"Soft limit"
The soft limit set for the inode quota.
"filesHardLimit":"Hard limit"
The hard limit set for the inode quota.
"filesGracePeriod":"Grace period"
The grace period set for the inode usage.
"blockGracePeriod":"Grace period"
The grace period set for the capacity quota.

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 sets quota for the fileset myFset1, which is part of the file system gpfs0:

Request data:
curl -k -u admin:admin001 -X POST --header 'content-type:application/json' --header 'accept:application/json' 
-d '{
  "operationType": "setQuota",
  "quotaType": "user",
  "objectName": "adam",
  "blockSoftLimit": "1M",
  "blockHardLimit": "2M",
  "filesSoftLimit": "1K",
  "filesHardLimit": "2K",
  "filesGracePeriod": "null",
  "blockGracePeriod": "null"
}' "https://198.51.100.1:443/scalemgmt/v2/filesystems/gpfs0/filesets/myFset1/quotas"
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" : 1000000000008,
    "status" : "RUNNING",
    "submitted" : "2017-03-14 16:07:43,474",
    "completed" : "N/A",
    "request" : {
      "data" : {
        "operationType": "setQuota",
        "quotaType": "user",
        "objectName": "adam",
        "blockSoftLimit": "1M",
        "blockHardLimit": "2M",
        "filesSoftLimit": "1K",
        "filesHardLimit": "2K",
        "filesGracePeriod": "null",
        "blockGracePeriod": "null"
      },
      "type" : "POST",
      "url" : "/scalemgmt/v2/filesystems/gpfs0/quotas"
    },
    "result" : { }
  } ],
  "status" : {
    "code" : 202,
    "message" : "The request was accepted for processing"
  }
}