Query calculation specification management permissions

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

HTTP
GET $CLOUDSIGMA_API_BASE/compute-resource-specs/management-permission

Before you call

Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. Prepare a personal access token and target workspace ID that can access the target workspace.

Request parameters

Shell
curl "$CLOUDSIGMA_API_BASE/compute-resource-specs/management-permission" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

This request does not contain path parameters, query parameters, or request body.

Successful response

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

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data

object

Permission query results.

data.can_manage_specs

boolean

true indicates that computing specifications can be managed. false means there is no such permission.

Error response

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

Field

Type

Description

code

string

error code.

msg

string

Error description.

data

null

Empty on error.

Common HTTP errors

HTTP status

Error code

Common cause

Recommended action

400

INVALID_PARAMS, ErrWorkspaceRequired

Invalid request field, workspace, or operation precondition.

Fix the request parameters and submit again.

401

ErrUnauthenticated

Missing or invalid authentication credentials.

Check the credential type, expiration, and authentication header.

403

ErrForbidden

The current identity or active role does not have permission for this operation.

Use an authorized identity or contact an administrator to grant access.

404

COMPUTE_RESOURCE_SPEC_NOT_FOUND

The target object or required reference was not found.

Verify the object identifier, workspace, and current status.

409

COMPUTE_RESOURCE_SPEC_ALREADY_EXISTS

Conflict in resource state, request payload, or concurrent modification.

Re-read the current state and version, then handle according to the latest result.

500

LIST_SPECS_FAILED, CREATE_SPEC_FAILED, UPDATE_SPEC_FAILED, SET_SPEC_ENABLED_FAILED, ErrServer

Internal processing failed; write operations may have been partially applied.

Retain request and trace details, and verify the current state before retrying.

503

ErrServiceUnavailable

A business, runtime, or authorization dependency is temporarily unavailable.

After the dependency recovers, check existing results first instead of blindly repeating writes.

Last updated on