Query calculation specification management permissions

Query whether the current identity can create, update, or enable or disable the computing specifications of the current workspace.

HTTP
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

Shell
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.

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "can_manage_specs": false
  }
}

The response fields are as follows.

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data

object

Permission query results.

data.can_manage_specs

boolean

true means that the computing specifications can be managed; false means that it does not have this permission.

Error response

JSON
{
  "code": "ErrApiKeyInvalid",
  "msg": "API key is invalid or expired",
  "data": null
}

Common HTTP errors

HTTP status code

error code

Common causes

Recommended actions

401

—

Missing or invalid access credentials.

Check the regional endpoint, API key, and workspace ID.

500

GET_SPEC_MANAGEMENT_PERMISSION_FAILED

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.

Last updated on