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.
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.
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 |
|---|---|---|---|
|
array of file |
Yes |
The local file to upload. Repeat the passed in multipart form part with the same name. Do not set additional |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"conn_file_ids": [
"conn_file_01"
],
"file_ids": [
"file_01"
]
}
}
Field |
Type |
Description |
|---|---|---|
|
array of string or null |
Temporary connector file ID, in the same order as the uploaded file. |
|
array of string |
Store file IDs in the same order as |
Error response¶
{
"code": "ErrParamInvalid",
"msg": "invalid multipart form"
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
Readable error message. |