Getting started
Complete an import upload
Validate a direct import upload for this database before starting work.
POST
/api/customer/v1/projects/{projectId}/databases/{databaseId}/imports/uploads/{uploadId}/completePath parameters
| Name | Value |
|---|---|
projectId | Required resource ID from an earlier API response. |
databaseId | Required resource ID from an earlier API response. |
uploadId | Required resource ID from an earlier API response. |
Example request
Set HCODE_BASE_URL and HCODE_API_KEY as shown in Getting started. Replace resource variables with your own IDs.
curl --request POST "$HCODE_BASE_URL/api/customer/v1/projects/${PROJECT_ID}/databases/${DATABASE_ID}/imports/uploads/${UPLOAD_ID}/complete" \
--header "Authorization: Bearer $HCODE_API_KEY" Response
The JSON shape is defined in the response schema.
Response schema
{
"type": "object",
"properties": {
"uploadId": {
"type": "string"
},
"expiresAt": {
"type": "string"
},
"sizeBytes": {
"type": "integer"
},
"filename": {
"type": "string"
},
"directUpload": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"method": {
"type": "string"
},
"headers": {
"type": "object",
"additionalProperties": true
}
},
"required": [
"url",
"method",
"headers"
],
"additionalProperties": true
},
"operationId": {
"type": "string"
},
"operations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"status": {
"type": "string"
},
"href": {
"type": "string"
}
},
"required": [
"id",
"status",
"href"
]
}
}
},
"required": [
"uploadId"
],
"additionalProperties": true
}See errors and retries for failure responses.