Query tool tag¶
Query the aggregate tags in a tool catalog and the number of tools corresponding to each tag. Workspace tools and system tools are queried separately and will not be combined in the same response.
GET https://moi.matrixorigin.cn/newmoi/workspaces/{workspace_id}/tools/tags
Before you call¶
Prepare a personal access token and target workspace ID that has access to the target workspace.
The example below uses:
$AI_STUDIO_API_KEY: The actual personal access token, passed through theX-API-KeyHeader.$WORKSPACE_ID: The workspace ID to be queried is passed through theX-Workspace-IDHeader.
Request example¶
curl "https://moi.matrixorigin.cn/newmoi/workspaces/$WORKSPACE_ID/tools/tags?catalog=workspace&status=active" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Path parameters¶
Parameters |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
Yes |
The current workspace ID used for authorization. |
Query parameters¶
Parameters |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
No |
Directory to query: |
|
string |
No |
Filter by tool status, category, category, or stage. |
|
string |
No |
Filter by tool status, category, category, or stage. |
|
string |
No |
Filter by tool status, category, category, or stage. |
|
string |
No |
Filter by tool status, category, category, or stage. |
|
string |
No |
Filter by side effects category. |
|
string |
No |
Filter by runtime visibility or binding type. |
|
string |
No |
Filter by runtime visibility or binding type. |
|
string |
No |
Search by name, description, localized display text or tags and then aggregate. |
Successful response¶
Returns 200 on success. items Contains only tags with a quantity greater than zero, sorted by tag name.
{
"code": 0,
"data": {
"items": [
{
"tag": "数据查询",
"count": 3
},
{
"tag": "运维",
"count": 1
}
]
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
integer |
|
|
array |
Aggregated tag list. |
|
string |
Tag name. |
|
integer |
The number of tools using this tag within this filtering range. |
[] 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 |
|---|---|---|---|
|
|
|
Set |
|
|
Lack of valid identity credentials. |
Check API Key. |
|
|
The current identity does not have permission to read the current workspace tool directory. |
Check workspace authorization. |
|
|
Tool resource services or authorization dependencies are temporarily unavailable. |
Try again later. |
Follow-up operations¶
Save the identification of the target item, and then Query GitHub tool connection.