Recent searches

in

Editing Sessions

On this page

Get editing session details

GET/api/v0/editing_sessions/{editing_session_uuid}
Path parameters:
editing_session_uuidUUIDRequired#
Example request:
Bash
Copied to clipboard
curl https://app.cloudcannon.com/api/v0/editing_sessions/{editing_session_uuid} \
  -H "X-API-KEY: <your-api-key>"
Responses:
200OK
JSON
Copied 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
JSON
Copied to clipboard
{
  "error": "string"
}
404Not Found
JSON
Copied to clipboard
{
  "error": "string"
}

Abort a merge on an editing session

DELETE/api/v0/editing_sessions/{editing_session_uuid}/abort
Path parameters:
editing_session_uuidUUIDRequired#
Example request:
Bash
Copied 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
JSON
Copied to clipboard
{
  "error": "string"
}
404Not Found
JSON
Copied to clipboard
{
  "error": "string"
}
422Unprocessable
JSON
Copied to clipboard
{
  "errors": {}
}

Perform a clone in an editing session

POST/api/v0/editing_sessions/{editing_session_uuid}/clone_path
Path parameters:
editing_session_uuidUUIDRequired#
Request body:
sourcestring#
targetstring#
pathsArray<object>#
sourcestring#
targetstring#
allow_overwriteboolean#
metadataobject#
Example request:
Bash
Copied 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
JSON
Copied 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
JSON
Copied to clipboard
{
  "error": "string"
}
404Not Found
JSON
Copied to clipboard
{
  "error": "string"
}
422Unprocessable
JSON
Copied to clipboard
{
  "errors": {}
}

Save an editing session to your source provider

POST/api/v0/editing_sessions/{editing_session_uuid}/commit
Path parameters:
editing_session_uuidUUIDRequired#
Request body:
messagestring#
includeobject#
Example request:
Bash
Copied 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
JSON
Copied to clipboard
{
  "socket_message_id": "string"
}
403Forbidden
JSON
Copied to clipboard
{
  "error": "string"
}
404Not Found
JSON
Copied to clipboard
{
  "error": "string"
}
422Unprocessable
JSON
Copied to clipboard
{
  "errors": {}
}

Perform a delete in an editing session

POST/api/v0/editing_sessions/{editing_session_uuid}/delete_path
Path parameters:
editing_session_uuidUUIDRequired#
Request body:
targetstring#
pathsArray<object>#
targetstring#
discard_unsavedboolean#
Example request:
Bash
Copied 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
JSON
Copied 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
JSON
Copied to clipboard
{
  "error": "string"
}
404Not Found
JSON
Copied to clipboard
{
  "error": "string"
}
422Unprocessable
JSON
Copied to clipboard
{
  "errors": {}
}

Get the files for an editing session

GET/api/v0/editing_sessions/{editing_session_uuid}/files
Path parameters:
editing_session_uuidUUIDRequired#
Example request:
Bash
Copied to clipboard
curl https://app.cloudcannon.com/api/v0/editing_sessions/{editing_session_uuid}/files \
  -H "X-API-KEY: <your-api-key>"
Responses:
200OK
JSON
Copied 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
JSON
Copied to clipboard
{
  "error": "string"
}
404Not Found
JSON
Copied to clipboard
{
  "error": "string"
}

Create a new file in an editing session

POST/api/v0/editing_sessions/{editing_session_uuid}/files
Path parameters:
editing_session_uuidUUIDRequired#
Request body:
edit_typestringNullable#
pathstringNullable#
source_pathstringNullable#
discard_unsavedboolean#
previous_content_hashstring#
metadataobject#
Example request:
Bash
Copied 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
JSON
Copied 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
JSON
Copied 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
JSON
Copied to clipboard
{
  "error": "string"
}
404Not Found
JSON
Copied to clipboard
{
  "error": "string"
}
422Unprocessable
JSON
Copied to clipboard
{
  "errors": {}
}

Perform a move in an editing session

POST/api/v0/editing_sessions/{editing_session_uuid}/move_path
Path parameters:
editing_session_uuidUUIDRequired#
Request body:
sourcestring#
targetstring#
pathsArray<object>#
sourcestring#
targetstring#
allow_overwriteboolean#
metadataobject#
Example request:
Bash
Copied 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
JSON
Copied 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
JSON
Copied to clipboard
{
  "error": "string"
}
404Not Found
JSON
Copied to clipboard
{
  "error": "string"
}
422Unprocessable
JSON
Copied to clipboard
{
  "errors": {}
}

Restore a deleted editing session file

POST/api/v0/editing_sessions/{editing_session_uuid}/restore_path
Path parameters:
editing_session_uuidUUIDRequired#
Request body:
targetstring#
pathsArray<object>#
targetstring#
Example request:
Bash
Copied 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
JSON
Copied 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
JSON
Copied to clipboard
{
  "error": "string"
}
404Not Found
JSON
Copied to clipboard
{
  "error": "string"
}
422Unprocessable
JSON
Copied to clipboard
{
  "errors": {}
}

Upload a file to an editing session

POST/api/v0/editing_sessions/{editing_session_uuid}/upload_file
Path parameters:
editing_session_uuidUUIDRequired#
Request body:
targetstring#
s3_keystring#
content_hashstring#
filesArray<object>#
targetstring#
s3_keystring#
content_hashstring#
allow_overwriteboolean#
Example request:
Bash
Copied 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
JSON
Copied 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
JSON
Copied to clipboard
{
  "error": "string"
}
404Not Found
JSON
Copied to clipboard
{
  "error": "string"
}
422Unprocessable
JSON
Copied to clipboard
{
  "errors": {}
}
Open in a new tab