Query available resources for agent construction¶
Read the resource collection that can be used to build the agent in the current workspace.
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.
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 |
|---|---|---|---|
|
string |
Yes |
workspace ID. |
Successful response¶
{
"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 |
|---|---|---|
|
array of object |
The current workspace can be used to build models, tools, skills and knowledge base. |
|
string |
logo. |
|
string |
The workspace ID to which it belongs. |
|
string |
Name. |
|
string |
Model items can return the model configuration, model name, and display name. |
|
string |
Model items can return the model configuration, model name, and display name. |
|
string |
Model items can return the model configuration, model name, and display name. |
|
array of object |
The current workspace can be used to build models, tools, skills and knowledge base. |
|
string |
logo. |
|
string |
The workspace ID to which it belongs. |
|
string |
Name. |
|
string |
Model name. |
|
string |
Display name. |
|
string |
Model configuration reference. |
|
array of object |
The current workspace can be used to build models, tools, skills and knowledge base. |
|
string |
Skill resource ID. |
|
string |
The workspace ID to which it belongs. |
|
string |
Skill name. |
|
string |
Model name. |
|
string |
Skill name for interface display. Returned if there is a value. |
|
string |
Model configuration reference. |
|
array of object |
The current workspace can be used to build models, tools, skills and knowledge base. |
|
string |
logo. |
|
string |
The workspace ID to which it belongs. |
|
string |
Name. |
|
string |
Model name. |
|
string |
Display name. |
|
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.
{
"code": 5,
"message": "<错误信息>"
}
Common HTTP errors
HTTP status code |
error code |
Description |
|---|---|---|
|
|
Valid identity credentials are missing. Recommendation: Check the API Key. |
|
|
The current identity does not have the authority to build an agent. Suggestion: Check workspace authorization. |
|
|
The list of available resources exceeds the allowed size of the interface. Suggestion: Narrow down the resource scope and try again. |
|
|
Failed to read resource list. Suggestion: Try again later. Contact support if it continues to fail. |
|
|
The authoring resource service or licensing dependency is unavailable. Suggestion: Try again later. |