Query available resources for agent construction

Read the resource collection that can be used to build the agent in the current workspace.

HTTP
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/agent-builder/resources

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

Replace $WORKSPACE_ID, $CLOUDSIGMA_API_KEY in the example with actual values.

Shell
curl "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/agent-builder/resources" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Parameter

Type

Required

Description

workspace_id

string

Yes

workspace ID.

Successful response

JSON
{
  "code": 0,
  "data": {
    "models": [
      {
        "name": "<MODEL_NAME>",
        "model_config_ref": "mc_01"
      }
    ],
    "tools": [
      {
        "name": "<TOOL_NAME>"
      }
    ],
    "skills": [
      {
        "name": "<SKILL_NAME>"
      }
    ],
    "knowledge_bases": [
      {
        "name": "<KNOWLEDGE_BASE_NAME>"
      }
    ]
  }
}

Field

Type

Description

data.models

array of object

The current workspace can be used to build models, tools, skills and knowledge base.

data.models[].id

string

logo.

data.models[].workspace_id

string

The workspace ID to which it belongs.

data.models[].name

string

Name.

data.models[].model_name

string

Model items can return the model configuration, model name, and display name.

data.models[].display_name

string

Model items can return the model configuration, model name, and display name.

data.models[].model_config_ref

string

Model items can return the model configuration, model name, and display name.

data.tools

array of object

The current workspace can be used to build models, tools, skills and knowledge base.

data.tools[].id

string

logo.

data.tools[].workspace_id

string

The workspace ID to which it belongs.

data.tools[].name

string

Name.

data.tools[].model_name

string

Model name.

data.tools[].display_name

string

Display name.

data.tools[].model_config_ref

string

Model configuration reference.

data.skills

array of object

The current workspace can be used to build models, tools, skills and knowledge base.

data.skills[].id

string

Skill resource ID.

data.skills[].workspace_id

string

The workspace ID to which it belongs.

data.skills[].name

string

Skill name.

data.skills[].model_name

string

Model name.

data.skills[].display_name

string

Skill name for interface display. Returned if there is a value.

data.skills[].model_config_ref

string

Model configuration reference.

data.knowledge_bases

array of object

The current workspace can be used to build models, tools, skills and knowledge base.

data.knowledge_bases[].id

string

logo.

data.knowledge_bases[].workspace_id

string

The workspace ID to which it belongs.

data.knowledge_bases[].name

string

Name.

data.knowledge_bases[].model_name

string

Model name.

data.knowledge_bases[].display_name

string

Display name.

data.knowledge_bases[].model_config_ref

string

Model configuration reference.

Error response

HTTP 413 is returned when the resource list is too large. This interface does not support paging, nor does it accept limit, offset, and the results cannot be narrowed by these parameters. The number of resources needs to be reduced first.

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

Common HTTP errors

HTTP status code

error code

Description

401

6(UNAUTHENTICATED)

Valid identity credentials are missing. Recommendation: Check the API Key.

403

5(PERMISSION_DENIED)

The current identity does not have the authority to build an agent. Suggestion: Check workspace authorization.

413

14(RESOURCE_EXHAUSTED)

The list of available resources exceeds the allowed size of the interface. Suggestion: Narrow down the resource scope and try again.

500

1(INTERNAL)

Failed to read resource list. Suggestion: Try again later. Contact support if it continues to fail.

503

15(UNAVAILABLE)

The authoring resource service or licensing dependency is unavailable. Suggestion: Try again later.

Last updated on