Download file

Get the download address of the temporary file. This interface only returns the download path, not the file content.

HTTP
POST $CLOUDSIGMA_API_BASE/connectors/file/download

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. Prepare personal access token, target workspace ID and temporary file ID that can access the target workspace.

Request body

Replace $CLOUDSIGMA_API_KEY, $WORKSPACE_ID, $CONN_FILE_ID in the example with actual values.

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/connectors/file/download" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H 'Content-Type: application/json' \
  -d "{
    \"conn_file_id\": \"$CONN_FILE_ID\"
  }"

Field

Type

Required

Description

conn_file_id

string

Yes

Temporary file ID to download. Cannot be empty.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "url": "/v5/connectors/file/stream?conn_file_id=conn_file_01"
  }
}

Field

Type

Description

data.url

string

Relative file stream download path.

Error response

JSON
{
  "code": "ErrParamInvalid",
  "msg": "invalid file identifier"
}

Field

Type

Description

code

string

error code.

msg

string

error message.

Last updated on