Query skill tags

Query the aggregation tags of the current workspace and system default skills. The numbers of identical tags in the two directories are merged.

GET https://api.moi.matrixorigin.cn/v5/workspaces/{workspace_id}/skills/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 the X-API-Key Header.

  • $WORKSPACE_ID: The workspace ID to be queried is passed through the X-Workspace-ID Header.

Request example

curl "https://api.moi.matrixorigin.cn/v5/workspaces/$WORKSPACE_ID/skills/tags" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Path parameters

Parameters

Type

Is it required

Description

workspace_id

string

Yes

The current workspace ID.

Successful response

Returns 200 on success. Tags are first sorted by quantity in descending order, and if the quantity is the same, they are sorted by tag name.

{
  "code": 0,
  "data": {
    "items": [
      {
        "tag": "文本处理",
        "count": 3
      },
      {
        "tag": "摘要",
        "count": 1
      }
    ]
  }
}

The response fields are as follows.

Field

Type

Description

code

integer

0 on success.

data.items

array

Aggregated tag list.

data.items[].tag

string

Tag name.

data.items[].count

integer

The total number of times this tag is used in the current workspace and system default skills.

[] 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

400

2INVALID_ARGUMENT

Invalid workspace ID.

Check path parameters.

401

6UNAUTHENTICATED

Lack of valid identity credentials.

Check API Key.

403

5PERMISSION_DENIED

The current identity does not have permission to read workspace skills.

Check workspace authorization.

503

15UNAVAILABLE

Skill services or authorized dependencies are temporarily unavailable.

Try again later.

Follow-up operations

Tags are used for filtering. After selecting the tag, return to Query skill list to filter by tag.

Last updated on