Object Storage Attachments

Get an upload URL for a new attachment

POST
/api/records/{record_key}/attachments/upload-url

Returns a presigned PostObject form for uploading a file to the object storage (currently Alibaba Cloud OSS). POST every form_data field plus the file — the file must be the last field — to action. Form field keys are limited to 8 KB and values to 2 MB.

Authorization

bearerAuth
AuthorizationBearer <token>

Access token from POST /oauth2/token (valid for 300 seconds).

In: header

Path Parameters

record_key*string

Record key of the record the attachments belong to.

Request Body

application/json

expiration*integer

Lifetime of the upload URL in seconds (30–32,400).

Range30 <= value <= 32400
filename*string

Name to store the file under.

Response Body

application/json

curl -X POST "https://example.com/api/records/d1c2e12cfeababc8b95daf6902e210b1/attachments/upload-url" \  -H "Content-Type: application/json" \  -d '{    "expiration": 60,    "filename": "original_file_name_to_save.txt"  }'
{  "action": "string",  "file_id": "string",  "method": "POST",  "form_data": {    "Expires": "string",    "policy": "string",    "Signature": "string",    "OSSAccessKeyId": "string",    "x-oss-security-token": "string",    "callback": "string",    "success_action_status": "string",    "Content-Disposition": "string",    "key": "string",    "property1": "string",    "property2": "string"  }}