Query file details

Query file details by file ID.

HTTP
POST $CLOUDSIGMA_API_BASE/catalog/file/info

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 or upload the file to obtain the target file ID. Prepare the personal access token, target workspace ID, and file ID that can access the target workspace. The caller needs read permissions on the root volume to which the file belongs.

Request body

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

Field

Type

Required

Description

file_id

string

Yes

File ID.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "file_id": "file-123",
    "file_name": "orders.csv",
    "size": 2048
  }
}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data.file_id

string

File ID.

data.file_name

string

File name.

data.size

integer

File size in bytes.

Error response

JSON
{
  "code": "ErrNotFound",
  "msg": "Not Found"
}

Field

Type

Description

code

string

error code.

msg

string

error message.

Last updated on