Query the system agent GitHub project according to the new configuration

Submit a GitHub channel configuration and query the projects available for system agent configuration; the request does not save the configuration.

POST https://moi.matrixorigin.cn/newmoi/workspaces/{workspace_id}/system-agent-setups/{agent_id}/github-projects

Before you call

The examples below use $AI_STUDIO_API_KEY, $WORKSPACE_ID, and $AGENT_ID.

Request example

curl -X POST "https://moi.matrixorigin.cn/newmoi/workspaces/$WORKSPACE_ID/system-agent-setups/$AGENT_ID/github-projects" -H "X-API-Key: $AI_STUDIO_API_KEY" -H "X-Workspace-ID: $WORKSPACE_ID" -H 'Content-Type: application/json' -d '{"config":{"owner":"matrixorigin","repository":"matrixflow"},"secrets":{"access_token":"$GITHUB_ACCESS_TOKEN"}}'

Request body

Parameters

Type

Is it required

Description

name

string

No

Channel name. This query does not save the value.

description

string

No

Channel description. This query does not save the value.

config

object

No

GitHub channel configuration, such as the organization to which the warehouse belongs and the name of the warehouse.

secrets

object

No

Key configuration required for the GitHub channel. This query is only used to read the item, the key will not be saved.

Successful response

Returns 200 and optional items on success.

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

The response fields are as follows.

Field

Type

Description

data.items

array

Items matching the submitted configuration.

Error response

{"code":2,"message":"invalid request"}
Last updated on