Query skill list¶
Lists current workspace skills and readable system default skills. The system skill workspace_id is system and should be considered a read-only resource.
GET https://moi.matrixorigin.cn/newmoi/workspaces/{workspace_id}/skills
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/skills?status=active&limit=20&offset=0" \
-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. |
Query parameters¶
Parameters |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
No |
Filter by status, source type, category, or stage. |
|
string |
No |
Filter by status, source type, category, or stage. |
|
string |
No |
Filter by status, source type, category, or stage. |
|
string |
No |
Filter by status, source type, category, or stage. |
|
string |
No |
Search by skill text. |
|
string[] |
No |
Repeat to filter tags, for example |
|
integer |
No |
Quantity per page. Default |
|
integer |
No |
Starting offset; negative numbers are treated as |
[] after a type denotes an array. [] in a field path denotes each item in an array.
Successful response¶
Returns 200 on success.
{
"code": 0,
"data": {
"items": [
{
"id": "skill_01",
"workspace_id": "ws_01",
"name": "摘要技能",
"description": "总结输入内容。",
"status": "active",
"source_type": "custom",
"version": 2
}
],
"total": 1,
"limit": 20,
"offset": 0
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
integer |
|
|
array |
The skill definition of the current page. |
|
string |
Skill ID and workspace. |
|
string |
Skill ID and workspace. |
|
string |
Name, status, and source type. |
|
string |
Name, status, and source type. |
|
string |
Name, status, and source type. |
|
string |
Skill description; does not return if not set. |
|
string |
Source reference; not returned if not set. |
|
string |
Skill classification; does not return if not set. |
|
string[] |
Skill label; does not return if not set. |
|
string |
Skill stage; does not return if not set. |
|
object |
Route summary; not returned if not set. |
|
object |
Skill command. |
|
object |
Skill dependency requirements; not returned if not set. |
|
integer |
Current version. |
|
object |
Extended metadata; not returned if not set. |
|
string |
Creator ID; does not return if not set. |
|
string |
Last updater ID; does not return if not set. |
|
string |
Creation time, in RFC 3339 format. |
|
string |
Last updated time, in RFC 3339 format. |
|
integer |
The total number of matches, the size of this page and the starting offset. |
|
integer |
The total number of matches, the size of this page and the starting offset. |
|
integer |
The total number of matches, the size of this page and the starting offset. |
[] 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 |
|---|---|---|---|
|
|
Invalid workspace or filter parameters. |
Check path and query parameters. |
|
|
Lack of valid identity credentials. |
Check API Key. |
|
|
The current identity does not have permission to read workspace skills. |
Check workspace authorization. |
|
|
Skill services or authorized dependencies are temporarily unavailable. |
Try again later. |
Follow-up operations¶
Save the identification of the target skill and then Query skill details.