Query file products

Query file product information by file ID.

GET https://moi.matrixorigin.cn/newmoi/catalog/file-artifacts/{file_id}

Preparation before calling

First query the file list to obtain the target file ID. Prepare the personal access token, target workspace ID, and file 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.

  • $FILE_ID: The file ID of the product to be queried.

Request example

curl "https://moi.matrixorigin.cn/newmoi/catalog/file-artifacts/$FILE_ID" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Path parameters

Parameters

Type

Description

file_id

string

File ID.

Successful response

Returns 200 and file product information when successful; returns 404 when the file does not exist.

{
  "code": "OK",
  "msg": "OK",
  "data": {
    "file_id": "file-123",
    "file_exists": true,
    "has_artifact": false,
    "derivations": [],
    "assets_by_id": {}
  }
}

The response fields are as follows.

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data.file_id

string

The queried file ID.

data.file_exists

boolean

Whether the file exists.

data.has_artifact

boolean

Whether the file has related products.

data.source_file_id

string

Source file ID; may be omitted if not available.

data.parsed_file_id

string

Parsed product file ID; can be omitted if not available.

data.root_asset

object

Root data asset; may be omitted if not available.

data.stage_asset

object

Data asset in processing; may be omitted if not available.

data.parsed_asset

object

The parsed data asset; may be omitted if not available.

data.derivations

array

Data asset derivation relationship.

data.manifest

object

Mapping metadata between original file and parsed product; may be omitted if not available.

data.assets_by_id

object

Related assets indexed by asset ID.

Error response

{
  "code": "ErrNotFound",
  "msg": "对象不存在",
  "data": null
}

Common HTTP errors

HTTP status code

error code

Common causes

Recommended actions

400

ErrParamInvalid

file_id in path is missing or invalid.

Pass in a valid file ID.

403

ErrForbidden

The current identity does not have read permission on the root volume to which it belongs.

Use credentials with read access, or contact your administrator for authorization.

404

ErrNotFound

File does not exist.

Check file ID.

500

ErrServer

The service cannot read the file product.

Record the request time and error message and try again; if it continues to fail, contact support.

Follow-up operations

Save the identification of the target item and then Query Catalog details.

Last updated on