Query Catalog reference

Returns the current results of the Catalog reference query.

POST https://moi.matrixorigin.cn/newmoi/catalog/ref_list

Preparation before calling

First query the catalog list to obtain the target catalog ID. Prepare the personal access token, target workspace ID, and Catalog ID that have 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: Target workspace ID, passed through X-Workspace-ID Header.

  • $CATALOG_ID: The Catalog ID of the reference is to be queried.

Request example

curl -X POST "https://moi.matrixorigin.cn/newmoi/catalog/ref_list" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H 'Content-Type: application/json' \
  -d '{
    "id": '"$CATALOG_ID"'
  }'

Request body

Parameter

Type

Required

Description

id

integer

Yes

Catalog ID.

Successful response

Returns 200 on success. The current implementation returns an empty array, and this result cannot be used to confirm that the Catalog has no references; the actual result of the deletion operation is subject to the deletion interface response.

{
  "code": "OK",
  "msg": "OK",
  "data": {
    "list": []
  }
}

The response fields are as follows.

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data.list

object[]

Is currently fixed to an empty array and cannot be used to determine whether a reference exists.

[] after a type means an array. For example, object[] is an array of objects.

Error response

{
  "code": "ErrServer",
  "msg": "服务器内部错误",
  "data": null
}

Common HTTP errors

HTTP status code

error code

Common causes

Recommended actions

400

ErrParamInvalid

The request body or Catalog ID is invalid.

Positive integer IDs returned using a list.

403

ErrForbidden

The current identity does not have read permission.

Requesting permission to catalog.read.

500

ErrServer

The server failed to query the reference.

Try again later.

Follow-up operations

When you need to delete the Catalog, directly call Delete Catalog and process the result according to its response.

Last updated on