Querying a Workspace Quota
Function
This API is used to obtain workspace quotas.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
GET /v1/{project_id}/workspaces/{workspace_id}/quotas
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID and Name. |
workspace_id |
Yes |
String |
Workspace ID For details about how to obtain the value, see Querying the Workspace List. If no workspace is created, the default value is 0. If a workspace is created and used, the actual value prevails. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API that is used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
quotas |
Array of WorkspaceQuotasResponse objects |
Workspace quota |
Parameter |
Type |
Description |
---|---|---|
max_quota |
Integer |
Maximum quota |
update_time |
Integer |
Last modification time, in UTC format If the resource quota has not been modified, the default value is the time when a workspace was created. |
resource |
String |
Unique resource ID |
quota |
Integer |
Existing quota. Value -1 indicates that the quota is not limited. |
min_quota |
Integer |
Minimum quota |
name_cn |
String |
Quota name (Chinese) |
unit_cn |
String |
Quantity unit (Chinese) |
name_en |
String |
Name of a quota, in English. |
unit_en |
String |
Quota unit, in English |
used_quota |
Integer |
Used quota. If the value of quota is -1 (indicating that the quota is not limited), the used_quota value is null. |
Example Requests
GET https://{endpoint}/v1/{project_id}/workspaces/ccd05d1a553b4e188ea878e7dcb85e47/quotas
Example Responses
Status code: 200
Response parameter indicating that a workspace quota is queried
{ "quotas" : [ { "max_quota" : 60000, "update_time" : 1470000020000, "resource" : "exemlProject.gpu_duration", "used_quota" : 5, "quota" : 10, "min_quota" : -1, "name_cn" : "ExeML Training Duration (Image Classification, Object Detection, and Sound Classification)", "unit_cn" : "Minute", "name_en" : "ExeMLtraining duration (image classification, object detection, and soundclassification)", "unit_en" : "minute" } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Response parameter indicating that a workspace quota is queried |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot