Query GitHub tool connection¶
Query the GitHub tool connection status of the current workspace. This interface only returns the credential reference and status, not the access token.
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/tools/github/connect
Before you call this API¶
Configure the regional API endpoint and authentication, and select the target workspace.
Request¶
curl "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/tools/github/connect" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Path parameters
Parameters |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
Yes |
The current workspace ID. |
Successful response¶
Returns 200 on success. When the connection is not saved, the interface still returns the disconnected status successfully.
{
"code": 0,
"data": {
"tool_id": "moi.github.tools",
"status": "disconnected",
"requires_reconnect": false
}
}
{
"code": 0,
"data": {
"tool_id": "moi.github.tools",
"credential_ref": "cred_01",
"status": "connected",
"connected_at": "2026-01-02T15:04:05Z",
"requires_reconnect": false
}
}
When a connection is available, the response contains a credential reference and establishment time:
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
integer |
|
|
string |
GitHub built-in tool identifier. |
|
string |
|
|
string |
Credential reference when the connection is available or needs to be reconnected; not returned when not connected. |
|
string |
Original connection establishment time; does not return when not connected. |
|
boolean |
|
Error response¶
{
"code": 2,
"message": "<错误信息>"
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
Invalid workspace ID. |
Check path parameters. |
|
|
Lack of valid identity credentials. |
Check API Key. |
|
|
The current identity does not have permission to read the tool connection. |
Check workspace authorization. |
|
|
The GitHub tool connection service or authorization dependency is temporarily unavailable. |
Try again later. |
Follow-up operations¶
When modifications are needed Update tool. When returning the list Query tool tag.