Query skill version¶
Lists the skill’s version snapshot. This interface can explicitly read the skill version in the current workspace or system workspace.
GET https://api.moi.matrixorigin.cn/v5/workspaces/{workspace_id}/skills/{skill_id}/versions
Before you call¶
First query the skill list to obtain the skill ID and the skill workspace. Save them as SKILL_ID and SKILL_WORKSPACE_ID; use system for system skills. Prepare the personal access token and target workspace ID.
The example below uses:
$AI_STUDIO_API_KEY: The actual personal access token, passed through theX-API-KeyHeader.$WORKSPACE_ID: Target workspace ID, passed throughX-Workspace-IDHeader.$SKILL_ID: Skill ID.$SKILL_WORKSPACE_ID: Workspace where the skill definition belongs;systemfor system skills.
Request example¶
curl --get "https://api.moi.matrixorigin.cn/v5/workspaces/$WORKSPACE_ID/skills/$SKILL_ID/versions" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
--data-urlencode "skill_workspace_id=$SKILL_WORKSPACE_ID" \
--data-urlencode "limit=20" \
--data-urlencode "offset=0"
Path parameters¶
Parameters |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
Yes |
The current workspace ID. |
|
string |
Yes |
Skill ID. |
Query parameters¶
Parameters |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
No |
Workspace where the skill belongs. Use |
|
integer |
No |
Quantity per page. Default |
|
integer |
No |
Starting offset; negative numbers are treated as |
Successful response¶
Returns 200 on success.
{
"code": 0,
"data": {
"items": [
{
"id": "skill_ver_02",
"workspace_id": "ws_01",
"skill_id": "skill_01",
"version": 2,
"spec_snapshot": {
"name": "摘要技能",
"status": "active"
},
"change_summary": "补充输出约定",
"created_at": "2026-01-03T10:00:00Z"
}
],
"total": 2,
"limit": 20,
"offset": 0
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
integer |
|
|
array |
Skill versions returned on the current page. |
|
string |
Version record ID. |
|
string |
Skill ID for this version. |
|
string |
Workspace where the skill belongs. |
|
integer |
Skill version number. |
|
object |
A snapshot of the complete skill definition when this version was saved. |
|
string |
Version change description; not returned if not set. |
|
string |
Version creation time, in RFC 3339 format. |
|
integer |
Total number of matching versions. |
|
integer |
Maximum number of versions requested for this page. |
|
integer |
Zero-based offset of the first version in this page. |
[] 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 skill ID, workspace range, or paging parameters. |
Check path and query parameters. |
|
|
Lack of valid identity credentials. |
Check API Key. |
|
|
The current identity does not have permission to read the skill version. |
Check workspace authorization. |
|
|
The skill or version record does not exist in the specified workspace. |
Check skill ID and |
|
|
Skill services or authorized dependencies are temporarily unavailable. |
Try again later. |
Follow-up operations¶
After selecting the version, you can Set the current skill version; when you need skill subject information, Query skill details.