Upload files

Upload a local file and get a temporary file ID that can be previewed, downloaded, or used for subsequent imports. Uploading only saves temporary files and does not start the import task.

HTTP
POST $CLOUDSIGMA_API_BASE/connectors/file/upload

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 local files to be uploaded, as well as personal access token and target workspace ID that can access the target workspace.

Request body

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

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/connectors/file/upload" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -F "files=@./data.csv"

Parameter

Type

Required

Description

files

array of file

Yes

The local file to upload. Repeat the passed in multipart form part with the same name. Do not set additional Content-Type.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "conn_file_ids": [
      "conn_file_01"
    ],
    "file_ids": [
      "file_01"
    ]
  }
}

Field

Type

Description

data.conn_file_ids

array of string or null

Temporary connector file ID, in the same order as the uploaded file.

data.file_ids

array of string

Store file IDs in the same order as data.conn_file_ids.

Error response

JSON
{
  "code": "ErrParamInvalid",
  "msg": "invalid multipart form"
}

Field

Type

Description

code

string

error code.

msg

string

Readable error message.

Last updated on