Get a file's details from an Editing Session
GET
/api/v0/editing_session_files/{editing_session_file_uuid}- Path parameters:
- Example request:
- BashCopied to clipboard
curl https://app.cloudcannon.com/api/v0/editing_session_files/{editing_session_file_uuid} \ -H "X-API-KEY: <your-api-key>" - Responses:
200OK
JSONCopied to clipboard{ "uuid": "00000000-0000-0000-0000-000000000000", "id": 0, "editing_session_uuid": "string", "edit_type": "string", "source_path": "string", "path": "string", "sync_blocked": true, "has_conflict": true, "unchanged": true, "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z", "metadata": {}, "contributions": [ { "uuid": "00000000-0000-0000-0000-000000000000", "id": 0, "editing_session_file_uuid": "string", "session_type": "string", "user_uuid": "string", "session_uuid": "string", "state": "string", "file_contents": "string", "generated_by_merge": true, "content_hash": "string", "ended_at": "2024-01-01T00:00:00Z", "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z" } ] }403Forbidden
JSONCopied to clipboard{ "error": "string" }404Not Found
JSONCopied to clipboard{ "error": "string" }
Discard a file from an Editing Session
DELETE
/api/v0/editing_session_files/{editing_session_file_uuid}- Path parameters:
- Example request:
- BashCopied to clipboard
curl https://app.cloudcannon.com/api/v0/editing_session_files/{editing_session_file_uuid} \ -X DELETE \ -H "X-API-KEY: <your-api-key>" - Responses:
200Discarded
JSONCopied to clipboard{}403Forbidden
JSONCopied to clipboard{ "error": "string" }404Not Found
JSONCopied to clipboard{ "error": "string" }422Unprocessable
JSONCopied to clipboard{ "errors": {} }
Claim the editing lock on a file in an Editing Session
PUT
/api/v0/editing_session_files/{editing_session_file_uuid}/claim_lock- Path parameters:
- Request body:
- Example request:
- BashCopied to clipboard
curl https://app.cloudcannon.com/api/v0/editing_session_files/{editing_session_file_uuid}/claim_lock \ -X PUT \ -H "X-API-KEY: <your-api-key>" \ -H "Content-Type: application/json" \ -d '{ "previous_content_hash": "string" }' - Responses:
200OK
JSONCopied to clipboard{ "uuid": "00000000-0000-0000-0000-000000000000", "id": 0, "editing_session_file_uuid": "string", "session_type": "string", "user_uuid": "string", "session_uuid": "string", "state": "string", "file_contents": "string", "generated_by_merge": true, "content_hash": "string", "ended_at": "2024-01-01T00:00:00Z", "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z" }403Forbidden
JSONCopied to clipboard{ "error": "string" }404Not Found
JSONCopied to clipboard{ "error": "string" }422Unprocessable
JSONCopied to clipboard{ "errors": {} }
List all contributions for a file in an Editing Session
GET
/api/v0/editing_session_files/{editing_session_file_uuid}/contributions- Path parameters:
- Example request:
- BashCopied to clipboard
curl https://app.cloudcannon.com/api/v0/editing_session_files/{editing_session_file_uuid}/contributions \ -H "X-API-KEY: <your-api-key>" - Responses:
200OK
JSONCopied to clipboard[ { "uuid": "00000000-0000-0000-0000-000000000000", "id": 0, "editing_session_file_uuid": "string", "session_type": "string", "user_uuid": "string", "session_uuid": "string", "state": "string", "file_contents": "string", "generated_by_merge": true, "content_hash": "string", "ended_at": "2024-01-01T00:00:00Z", "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z" } ]403Forbidden
JSONCopied to clipboard{ "error": "string" }404Not Found
JSONCopied to clipboard{ "error": "string" }
Create a contribution for a file in an Editing Session, or update the latest contribution
POST
/api/v0/editing_session_files/{editing_session_file_uuid}/contributions- Path parameters:
- Request body:
- Example request:
- BashCopied to clipboard
curl https://app.cloudcannon.com/api/v0/editing_session_files/{editing_session_file_uuid}/contributions \ -X POST \ -H "X-API-KEY: <your-api-key>" \ -H "Content-Type: application/json" \ -d '{ "s3_key": "string", "content_hash": "string", "previous_content_hash": "string" }' - Responses:
200OK
JSONCopied to clipboard{ "uuid": "00000000-0000-0000-0000-000000000000", "id": 0, "editing_session_file_uuid": "string", "session_type": "string", "user_uuid": "string", "session_uuid": "string", "state": "string", "file_contents": "string", "generated_by_merge": true, "content_hash": "string", "ended_at": "2024-01-01T00:00:00Z", "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z" }401Unauthorized
JSONCopied to clipboard{ "error": "string" }403Forbidden
JSONCopied to clipboard{ "error": "string" }404Not Found
JSONCopied to clipboard{ "error": "string" }422Unprocessable
JSONCopied to clipboard{ "errors": {} }
Update a file's edit type in an Editing Session
PUT
/api/v0/editing_session_files/{editing_session_file_uuid}/edit_type- Path parameters:
- Request body:
- Example request:
- BashCopied to clipboard
curl https://app.cloudcannon.com/api/v0/editing_session_files/{editing_session_file_uuid}/edit_type \ -X PUT \ -H "X-API-KEY: <your-api-key>" \ -H "Content-Type: application/json" \ -d '{ "edit_type": "string", "discard_unsaved": true }' - Responses:
200OK
JSONCopied to clipboard{}403Forbidden
JSONCopied to clipboard{ "error": "string" }404Not Found
JSONCopied to clipboard{ "error": "string" }422Unprocessable
JSONCopied to clipboard{ "errors": {} }
Update a file's metadata in an Editing Session
PUT
/api/v0/editing_session_files/{editing_session_file_uuid}/metadata- Path parameters:
- Request body:
- Example request:
- BashCopied to clipboard
curl https://app.cloudcannon.com/api/v0/editing_session_files/{editing_session_file_uuid}/metadata \ -X PUT \ -H "X-API-KEY: <your-api-key>" \ -H "Content-Type: application/json" \ -d '{ "metadata": {} }' - Responses:
200OK
JSONCopied to clipboard{ "uuid": "00000000-0000-0000-0000-000000000000", "id": 0, "editing_session_uuid": "string", "edit_type": "string", "source_path": "string", "path": "string", "sync_blocked": true, "has_conflict": true, "unchanged": true, "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z", "metadata": {}, "contributions": [ { "uuid": "00000000-0000-0000-0000-000000000000", "id": 0, "editing_session_file_uuid": "string", "session_type": "string", "user_uuid": "string", "session_uuid": "string", "state": "string", "file_contents": "string", "generated_by_merge": true, "content_hash": "string", "ended_at": "2024-01-01T00:00:00Z", "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z" } ] }403Forbidden
JSONCopied to clipboard{ "error": "string" }404Not Found
JSONCopied to clipboard{ "error": "string" }422Unprocessable
JSONCopied to clipboard{ "errors": {} }
Update a file's path in an Editing Session
PUT
/api/v0/editing_session_files/{editing_session_file_uuid}/path- Path parameters:
- Request body:
- Example request:
- BashCopied to clipboard
curl https://app.cloudcannon.com/api/v0/editing_session_files/{editing_session_file_uuid}/path \ -X PUT \ -H "X-API-KEY: <your-api-key>" \ -H "Content-Type: application/json" \ -d '{ "path": "string" }' - Responses:
200OK
JSONCopied to clipboard{ "uuid": "00000000-0000-0000-0000-000000000000", "id": 0, "editing_session_uuid": "string", "edit_type": "string", "source_path": "string", "path": "string", "sync_blocked": true, "has_conflict": true, "unchanged": true, "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z", "metadata": {}, "contributions": [ { "uuid": "00000000-0000-0000-0000-000000000000", "id": 0, "editing_session_file_uuid": "string", "session_type": "string", "user_uuid": "string", "session_uuid": "string", "state": "string", "file_contents": "string", "generated_by_merge": true, "content_hash": "string", "ended_at": "2024-01-01T00:00:00Z", "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z" } ] }403Forbidden
JSONCopied to clipboard{ "error": "string" }404Not Found
JSONCopied to clipboard{ "error": "string" }422Unprocessable
JSONCopied to clipboard{ "errors": {} }
Get a file's raw contents from an Editing Session
GET
/api/v0/editing_session_files/{editing_session_file_uuid}/raw- Path parameters:
- Example request:
- BashCopied to clipboard
curl https://app.cloudcannon.com/api/v0/editing_session_files/{editing_session_file_uuid}/raw \ -H "X-API-KEY: <your-api-key>" - Responses:
303Redirect
403Forbidden
JSONCopied to clipboard{ "error": "string" }404Not Found
JSONCopied to clipboard{ "error": "string" }
View a resized preview of a file from an Editing Session
GET
/api/v0/editing_session_files/{editing_session_file_uuid}/resized- Path parameters:
- Query parameters:
The width to resize the preview to, in pixels
Defaults to:
200The height to resize the preview to, in pixels
Defaults to:
200The content type to return the image as
- Example request:
- BashCopied to clipboard
curl https://app.cloudcannon.com/api/v0/editing_session_files/{editing_session_file_uuid}/resized \ -H "X-API-KEY: <your-api-key>" - Responses:
307Redirect
403Forbidden
JSONCopied to clipboard{ "error": "string" }404Not Found
JSONCopied to clipboard{ "error": "string" }
Mark a file's conflicts as resolved in an Editing Session
PUT
/api/v0/editing_session_files/{editing_session_file_uuid}/resolve- Path parameters:
- Example request:
- BashCopied to clipboard
curl https://app.cloudcannon.com/api/v0/editing_session_files/{editing_session_file_uuid}/resolve \ -X PUT \ -H "X-API-KEY: <your-api-key>" - Responses:
200OK
JSONCopied to clipboard{ "uuid": "00000000-0000-0000-0000-000000000000", "id": 0, "editing_session_uuid": "string", "edit_type": "string", "source_path": "string", "path": "string", "sync_blocked": true, "has_conflict": true, "unchanged": true, "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z", "metadata": {}, "contributions": [ { "uuid": "00000000-0000-0000-0000-000000000000", "id": 0, "editing_session_file_uuid": "string", "session_type": "string", "user_uuid": "string", "session_uuid": "string", "state": "string", "file_contents": "string", "generated_by_merge": true, "content_hash": "string", "ended_at": "2024-01-01T00:00:00Z", "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z" } ] }403Forbidden
JSONCopied to clipboard{ "error": "string" }404Not Found
JSONCopied to clipboard{ "error": "string" }422Unprocessable
JSONCopied to clipboard{ "errors": {} }
Release the editing lock on a file in an Editing Session
PUT
/api/v0/editing_session_files/{editing_session_file_uuid}/unlock- Path parameters:
- Request body:
- Example request:
- BashCopied to clipboard
curl https://app.cloudcannon.com/api/v0/editing_session_files/{editing_session_file_uuid}/unlock \ -X PUT \ -H "X-API-KEY: <your-api-key>" \ -H "Content-Type: application/json" \ -d '{ "previous_content_hash": "string" }' - Responses:
200OK
JSONCopied to clipboard{ "uuid": "00000000-0000-0000-0000-000000000000", "id": 0, "editing_session_file_uuid": "string", "session_type": "string", "user_uuid": "string", "session_uuid": "string", "state": "string", "file_contents": "string", "generated_by_merge": true, "content_hash": "string", "ended_at": "2024-01-01T00:00:00Z", "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z" }403Forbidden
JSONCopied to clipboard{ "error": "string" }404Not Found
JSONCopied to clipboard{ "error": "string" }422Unprocessable
JSONCopied to clipboard{ "errors": {} }