SDK reference
Storage
GET/
The org's buckets with their latest daily size and object count.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/storage' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
A bucket record with its versioning status and latest daily usage.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/storage/{resourceId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
One level of the bucket: folders (common prefixes) and files under prefix.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/storage/{resourceId}/objects' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
One file's size, type, modification time and metadata.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/storage/{resourceId}/object?key=example' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
A download link valid for five minutes. versionId downloads an earlier version.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/storage/{resourceId}/download?key=example' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Every version and delete marker of one file, newest first (versioned buckets).
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/storage/{resourceId}/object/versions?key=example' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Makes an earlier version of a file current again (copied on top, so history is kept). With the newest delete marker of a deleted file, removes the marker and so brings the file back.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/storage/{resourceId}/object/restore' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"key": "example",
"versionId": "<versionId>"
}'POST/
Deletes one version of a file for good; its other versions stay.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/storage/{resourceId}/object/versions/delete' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"key": "example",
"versionId": "<versionId>"
}'GET/
Deleted files in one folder of a versioned bucket (their newest version is a delete marker).
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/storage/{resourceId}/deleted' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Moves or renames files and folders (copy, then delete the original); never overwrites. Folders move in batches: done: false means call again with the same moves and resume: true.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/storage/{resourceId}/objects/move' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"files": [
{
"from": "example",
"to": "example"
}
],
"folders": [
{
"from": "example",
"to": "example"
}
],
"resume": false
}'POST/
Starts a multipart upload for a large file (up to 5 TB): the part size and how many parts to send.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/storage/{resourceId}/uploads/multipart' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"key": "example",
"contentType": "example",
"size": 1
}'POST/
Upload links (15 minutes) for parts of a multipart upload; the browser PUTs each part and keeps its ETag.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/storage/{resourceId}/uploads/multipart/parts' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"key": "example",
"uploadId": "<uploadId>",
"partNumbers": [
1
]
}'POST/
Finishes a multipart upload from its parts' numbers and ETags.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/storage/{resourceId}/uploads/multipart/complete' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"key": "example",
"uploadId": "<uploadId>",
"parts": [
{
"partNumber": 1,
"etag": "example"
}
]
}'POST/
Cancels a multipart upload and discards the parts sent so far.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/storage/{resourceId}/uploads/multipart/abort' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"key": "example",
"uploadId": "<uploadId>"
}'POST/
Upload links (PUT, 15 minutes, up to 5 GB each). The browser sends each file straight to S3.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/storage/{resourceId}/uploads' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"files": [
{
"key": "example",
"contentType": "example",
"size": 1
}
]
}'POST/
Creates an empty folder under prefix.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/storage/{resourceId}/folders' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"name": "Example"
}'POST/
Deletes files and folders (with everything in them). done: false means call again to finish large folders.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/storage/{resourceId}/objects/delete' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"keys": [],
"prefixes": []
}'GET/
CORS rules, versioning and lifecycle rules.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/storage/{resourceId}/settings' \
-H "Authorization: Bearer $CACTIVE_TOKEN"PUT/
Replaces the bucket's CORS rules (Cloud's upload rule is kept separately).
Parameters and answerscurl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/storage/{resourceId}/cors' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"rules": [
{
"AllowedOrigins": [
"example"
],
"AllowedMethods": [
"GET"
]
}
]
}'PUT/
Turns versioning on, or suspends it.
Parameters and answerscurl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/storage/{resourceId}/versioning' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"enabled": true
}'POST/
Adds a rule that deletes files under a prefix a number of days after they're written.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/storage/{resourceId}/lifecycle' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"days": 1
}'DELETE/
Removes a lifecycle rule.
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/storage/{resourceId}/lifecycle/{ruleId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"DELETE/
Deletes an empty bucket (old versions of deleted files go with it) and its record.
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/storage/{resourceId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"