Delete Grafana tool connection

Delete the Grafana tool connection and associated credentials saved in the current workspace. The interface returns a disconnected status even if there is no current connection.

HTTP
DELETE $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/tools/grafana/connect

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 -X DELETE "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/tools/grafana/connect" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

The request body must be empty.

Path parameters

Parameter

Type

Required

Description

workspace_id

string

Yes

Current workspace ID.

Successful response

JSON
{
  "code": 0,
  "data": {
    "tool_id": "moi.grafana.tools",
    "status": "disconnected",
    "requires_reconnect": false
  }
}

Returns 200 on success. After disconnecting, subsequent Grafana tool calls cannot continue to use the deleted connection credentials.

Field

Type

Description

code

integer

0 on success.

data.tool_id

string

Grafana built-in tool identifier.

data.status

string

After disconnection, it is disconnected.

data.requires_reconnect

boolean

After disconnection, it is false.

Error response

JSON
{
  "code": 2,
  "message": "<错误信息>"
}

Common HTTP errors

HTTP status code

error code

Description

400

2(INVALID_ARGUMENT)

Common reasons: The workspace ID is invalid. Recommended Action: Check the path parameters.

401

6(UNAUTHENTICATED)

Common Cause: Valid identity credentials are missing. Recommended Action: Check the API Key.

403

5(PERMISSION_DENIED)

Common reasons: The current identity does not have the permission to manage tool connections. Recommended Action: Check the workspace authorization.

503

15(UNAVAILABLE)

Common reasons: The Grafana tool connection service or authorization dependency is temporarily unavailable. Recommended Action: Try again later.

Last updated on