Batch parsing file products

Batch query the existence of parsing products and their associated identifiers by file ID.

HTTP
POST $CLOUDSIGMA_API_BASE/catalog/file-artifacts:batchResolve

Before you call

Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. First query the file list to obtain the file ID. Prepare a list of personal access tokens, target workspace IDs, and file IDs that can access the target workspace.

Request body

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/catalog/file-artifacts:batchResolve" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "file_ids": ["'"$FILE_ID"'"]
  }'

Field

Type

Required

Description

file_ids

array of string

Yes

List of file IDs to query.

The service strips leading and trailing whitespace from file IDs and ignores empty entries, but retains duplicate IDs. When the number of different IDs exceeds 200, HTTP 400 is returned. HTTP 500 may currently be returned when the total number of duplicates exceeds 200.

The service checks whether the file exists and whether the caller has root volume permissions. When the file does not exist or there is no access permission, the entire batch of requests may fail and the corresponding result will not be directly set to false.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "items": [
      {
        "file_id": "file-01",
        "file_exists": true,
        "has_artifact": true,
        "source_file_id": "file-01",
        "parsed_file_id": "file-02",
        "root_asset_id": "asset-root",
        "parsed_asset_id": "asset-parsed",
        "volume_id": 10
      }
    ]
  }
}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data.items

array of object

File product parsing results.

data.items[].file_id

string

Requested file ID.

data.items[].file_exists

boolean

whether the file exists.

data.items[].has_artifact

boolean

Whether the file has related products.

data.items[].source_file_id

string

Source file ID.

data.items[].parsed_file_id

string

Parse product file ID.

data.items[].root_asset_id

string

Root data asset ID.

data.items[].stage_asset_id

string

The ID of the data asset in process.

data.items[].parsed_asset_id

string

Resolve data asset IDs.

data.items[].origin_file_name

string

Original file name. Return when applicable.

data.items[].origin_file_ext

string

Original file extension. Return when applicable.

data.items[].volume_id

integer

ID of the root volume to which the file belongs.

Error response

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

Field

Type

Description

code

string

error code.

msg

string

error message.

Last updated on