Query calculation specification management permissions¶
Query whether the current identity can create, update, or enable or disable the computing specifications of the current workspace.
GET $CLOUDSIGMA_API_BASE/compute-resource-specs/management-permission
Before you call this API¶
Configure the regional API endpoint and authentication, and select the target workspace.
Returning false means that the current identity does not have specification management rights; do not call create, update, enable, or deactivate interfaces at this time.
Request¶
curl "$CLOUDSIGMA_API_BASE/compute-resource-specs/management-permission" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Successful response¶
Returns 200 on success. data.can_manage_specs indicates whether the current identity has specification management permissions.
{
"code": "OK",
"msg": "OK",
"data": {
"can_manage_specs": false
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
object |
Permission query results. |
|
boolean |
|
Error response¶
{
"code": "ErrApiKeyInvalid",
"msg": "API key is invalid or expired",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
— |
Missing or invalid access credentials. |
Check the regional endpoint, API key, and workspace ID. |
|
|
The server cannot read the permission result. |
Try again later; if it continues to fail, contact support. |
Follow-up operations¶
When data.can_manage_specs is true, you can Create calculation specification; when it is false, contact the workspace administrator to apply for permission.