Get an Editing Session's details
GET
/api/v0/editing_sessions/{editing_session_uuid}- Path parameters:
- Example request:
- BashCopied to clipboard
curl https://app.cloudcannon.com/api/v0/editing_sessions/{editing_session_uuid} \ -H "X-API-KEY: <your-api-key>" - Responses:
200OK
JSONCopied to clipboard{ "uuid": "00000000-0000-0000-0000-000000000000", "id": 0, "site_id": 0, "build_id": 0, "state": "string", "base_commit_hash": "string", "upstream_commit_hash": "string", "syncs_blocked": 0, "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z", "site_uuid": "00000000-0000-0000-0000-000000000000", "build_uuid": "00000000-0000-0000-0000-000000000000", "files": [ { "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": [ {} ] } ] }403Forbidden
JSONCopied to clipboard{ "error": "string" }404Not Found
JSONCopied to clipboard{ "error": "string" }
Abort a merge on an Editing Session
DELETE
/api/v0/editing_sessions/{editing_session_uuid}/abort- Path parameters:
- Example request:
- BashCopied to clipboard
curl https://app.cloudcannon.com/api/v0/editing_sessions/{editing_session_uuid}/abort \ -X DELETE \ -H "X-API-KEY: <your-api-key>" - Responses:
204No Content
403Forbidden
JSONCopied to clipboard{ "error": "string" }404Not Found
JSONCopied to clipboard{ "error": "string" }422Unprocessable
JSONCopied to clipboard{ "errors": {} }
Clone a file in an Editing Session
POST
/api/v0/editing_sessions/{editing_session_uuid}/clone_path- Path parameters:
- Request body:
The path of the file to copy
The path for the copied file
Overwrite the target file if it already exists
Additional metadata to store on the file
- Example request:
- BashCopied to clipboard
curl https://app.cloudcannon.com/api/v0/editing_sessions/{editing_session_uuid}/clone_path \ -X POST \ -H "X-API-KEY: <your-api-key>" \ -H "Content-Type: application/json" \ -d '{ "source": "string", "target": "string", "paths": [ { "source": "string", "target": "string" } ], "allow_overwrite": true, "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": {} }
Commit an Editing Session to its Git Provider
POST
/api/v0/editing_sessions/{editing_session_uuid}/commit- Path parameters:
- Request body:
- Example request:
- BashCopied to clipboard
curl https://app.cloudcannon.com/api/v0/editing_sessions/{editing_session_uuid}/commit \ -X POST \ -H "X-API-KEY: <your-api-key>" \ -H "Content-Type: application/json" \ -d '{ "message": "string", "include": {} }' - Responses:
200OK
JSONCopied to clipboard{ "socket_message_id": "string" }403Forbidden
JSONCopied to clipboard{ "error": "string" }404Not Found
JSONCopied to clipboard{ "error": "string" }422Unprocessable
JSONCopied to clipboard{ "errors": {} }
Delete a file in an Editing Session
POST
/api/v0/editing_sessions/{editing_session_uuid}/delete_path- Path parameters:
- Request body:
- Example request:
- BashCopied to clipboard
curl https://app.cloudcannon.com/api/v0/editing_sessions/{editing_session_uuid}/delete_path \ -X POST \ -H "X-API-KEY: <your-api-key>" \ -H "Content-Type: application/json" \ -d '{ "target": "string", "paths": [ { "target": "string" } ], "discard_unsaved": true }' - 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": {} }
List an Editing Session's files
GET
/api/v0/editing_sessions/{editing_session_uuid}/files- Path parameters:
- Example request:
- BashCopied to clipboard
curl https://app.cloudcannon.com/api/v0/editing_sessions/{editing_session_uuid}/files \ -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" }
Create a file in an Editing Session
POST
/api/v0/editing_sessions/{editing_session_uuid}/files- Path parameters:
- Request body:
- Example request:
- BashCopied to clipboard
curl https://app.cloudcannon.com/api/v0/editing_sessions/{editing_session_uuid}/files \ -X POST \ -H "X-API-KEY: <your-api-key>" \ -H "Content-Type: application/json" \ -d '{ "edit_type": "string", "path": "string", "source_path": "string", "discard_unsaved": true, "previous_content_hash": "string", "metadata": {} }' - Responses:
200Success
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" } ] }201Created
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": {} }
Move a file in an Editing Session
POST
/api/v0/editing_sessions/{editing_session_uuid}/move_path- Path parameters:
- Request body:
The current path of the file to move
The new path for the file
Overwrite the target file if it already exists
Additional metadata to store on the file
- Example request:
- BashCopied to clipboard
curl https://app.cloudcannon.com/api/v0/editing_sessions/{editing_session_uuid}/move_path \ -X POST \ -H "X-API-KEY: <your-api-key>" \ -H "Content-Type: application/json" \ -d '{ "source": "string", "target": "string", "paths": [ { "source": "string", "target": "string" } ], "allow_overwrite": true, "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": {} }
Restore a deleted file in an Editing Session
POST
/api/v0/editing_sessions/{editing_session_uuid}/restore_path- Path parameters:
- Request body:
- Example request:
- BashCopied to clipboard
curl https://app.cloudcannon.com/api/v0/editing_sessions/{editing_session_uuid}/restore_path \ -X POST \ -H "X-API-KEY: <your-api-key>" \ -H "Content-Type: application/json" \ -d '{ "target": "string", "paths": [ { "target": "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": {} }
Upload a file to an Editing Session
POST
/api/v0/editing_sessions/{editing_session_uuid}/upload_file- Path parameters:
- Request body:
The path to upload the file to
The storage key of the uploaded file contents
The hash of the uploaded file contents
Overwrite the target file if it already exists
- Example request:
- BashCopied to clipboard
curl https://app.cloudcannon.com/api/v0/editing_sessions/{editing_session_uuid}/upload_file \ -X POST \ -H "X-API-KEY: <your-api-key>" \ -H "Content-Type: application/json" \ -d '{ "target": "string", "s3_key": "string", "content_hash": "string", "files": [ { "target": "string", "s3_key": "string", "content_hash": "string" } ], "allow_overwrite": true }' - 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": {} }