Query the system agent GitHub project¶
Query the GitHub projects that the system agent can use.
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/system-agent-setups/{agent_id}/github-projects
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 personal access token, target workspace ID and system agent ID. Also prepare the GitHub channel instance ID.
Request parameters¶
Replace $WORKSPACE_ID, $AGENT_ID, $CHANNEL_INSTANCE_ID, $CLOUDSIGMA_API_KEY in the example with actual values.
curl "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/system-agent-setups/$AGENT_ID/github-projects?channel_instance_id=$CHANNEL_INSTANCE_ID" -H "X-API-Key: $CLOUDSIGMA_API_KEY" -H "X-Workspace-ID: $WORKSPACE_ID"
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
The workspace ID to which it belongs. |
|
string |
Yes |
agent ID. |
Query parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Channel instance ID. |
Successful response¶
{
"code": 0,
"data": {
"items": []
}
}
Field |
Type |
Description |
|---|---|---|
|
array of object |
Optional GitHub projects. |
|
string |
GitHub project ID. |
|
string |
owner. |
|
string |
Owner type. |
|
integer |
number. |
|
string |
title. |
|
string |
address. |
|
string |
host. |
Error response¶
{
"code": 2,
"message": "invalid channel instance"
}
The list of items in the response corresponds to the specified channel_instance_id. Re-pass this parameter when changing the channel instance.