Query the agent that references this tool¶
Lists the agents in the current workspace that are effectively bound to the specified tool. This interface returns the display summary of the agent, but does not return the complete definition of the agent.
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/tools/{tool_id}/referencing-agents
Before you call this API¶
Configure the regional API endpoint and authentication, and select the target workspace.
First query the tool list to obtain the tool ID.
Set the operation-specific values used in the request:
$TOOL_ID: Referenced tool ID.
Request¶
curl "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/tools/$TOOL_ID/referencing-agents?limit=20" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Path parameters
Parameters |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
Yes |
Query the current workspace ID of the reference relationship. |
|
string |
Yes |
The tool ID being referenced. |
Query parameters
Parameters |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
No |
The workspace the tool belongs to; can only be the current workspace or |
|
integer |
No |
Quantity per page. Default |
|
string |
No |
|
Successful response¶
Returns 200 on success. If there is still data later, use next_cursor to query the next page.
{
"code": 0,
"data": {
"items": [
{
"id": "agent_01",
"workspace_id": "ws_01",
"name": "数据助手",
"status": "active"
}
],
"limit": 20,
"next_cursor": "cursor_01"
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
integer |
|
|
array |
A summary of the agent display that references this tool. |
|
string |
Agent ID and workspace. |
|
string |
Agent ID and workspace. |
|
string |
Agent name and status. |
|
string |
Agent name and status. |
|
integer |
The actual page size used by this page. |
|
string |
Next page cursor; does not return when there is no more data. |
[] after a type denotes an array. [] in a field path denotes each item in an array.
Error response¶
{
"code": 2,
"message": "<错误信息>"
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
The tool ID, |
Use the cursor returned as is, and check the path and query parameters. |
|
|
Lack of valid identity credentials. |
Check API Key. |
|
|
The current identity does not have permission to read tools or candidate agents. |
Check workspace authorization. |
|
|
The tool does not exist in the current or specified tools directory. |
Check tool ID and |
|
|
Tool or agent reference services are temporarily unavailable. |
Try again later. |
Follow-up operations¶
Save the identification of the target item and then Query GitHub tool connection.