Query the system agent GitHub project

Query the GitHub projects that the system agent can use.

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

Shell
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

workspace_id

string

Yes

The workspace ID to which it belongs.

agent_id

string

Yes

agent ID.

Query parameters

Parameter

Type

Required

Description

channel_instance_id

string

Yes

Channel instance ID.

Successful response

JSON
{
  "code": 0,
  "data": {
    "items": []
  }
}

Field

Type

Description

data.items

array of object

Optional GitHub projects.

data.items[].project_id

string

GitHub project ID.

data.items[].owner

string

owner.

data.items[].owner_type

string

Owner type.

data.items[].number

integer

number.

data.items[].title

string

title.

data.items[].url

string

address.

data.items[].host

string

host.

Error response

JSON
{
  "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.

Last updated on