Skip to content
Sign in with Google

Delete a file or folder

POST
/v1/workspace/books/{bookId}/delete

Delete one file or folder from the working copy, as it is; Discard brings back what was published. 404 not_found when it is not there. Nothing is published until Save; the agent sees it at once. 409 workspace_busy while Git works in the repository (the agent’s, or a sync): nothing changed, try again. For those who can view the Book; changes for its editors and owner (403 workspace_forbidden).

Authorizations

Parameters

Path Parameters

bookId
required
string
/^[A-Za-z0-9_-]{1,128}$/

Request Body required

object
path
required

A file or folder (one tree entry).

string
>= 1 characters <= 512 characters

Responses

200

Success

A change to the working copy: not published until Save.

object
paths
required

What changed in the working copy, by path: a move’s from and to, a delete’s path, the files an add wrote, a discard put back or removed, or an undo changed.

Array<string>

400

Rejected; never contains credentials or upstream payloads.

object
error
required
object
code
required

Stable code, e.g. not_found, idempotency_conflict, session_working, usage_limit_exceeded. Open.

string
type

Category, e.g. invalid_request_error, authentication_error, usage_limit_error. Open.

string
message
string
host

Host_in_use: the host another service holds.

string
service

Host_in_use: the id of the service that holds the host.

string
reason

File_invalid: why the change, or a picture, was refused. Open: path | text | size | skill | skills | count | type.

string
paths

File_exists from an add: every path of the request where a file is and replace was not set, all at once, so the person can be asked once. publish_conflict: the files someone published changes to the same lines of.

Array<string>
publishers

Publish_conflict: who published those changes, by name.

Array<string>

401

Rejected; never contains credentials or upstream payloads.

object
error
required
object
code
required

Stable code, e.g. not_found, idempotency_conflict, session_working, usage_limit_exceeded. Open.

string
type

Category, e.g. invalid_request_error, authentication_error, usage_limit_error. Open.

string
message
string
host

Host_in_use: the host another service holds.

string
service

Host_in_use: the id of the service that holds the host.

string
reason

File_invalid: why the change, or a picture, was refused. Open: path | text | size | skill | skills | count | type.

string
paths

File_exists from an add: every path of the request where a file is and replace was not set, all at once, so the person can be asked once. publish_conflict: the files someone published changes to the same lines of.

Array<string>
publishers

Publish_conflict: who published those changes, by name.

Array<string>

403

Rejected; never contains credentials or upstream payloads.

object
error
required
object
code
required

Stable code, e.g. not_found, idempotency_conflict, session_working, usage_limit_exceeded. Open.

string
type

Category, e.g. invalid_request_error, authentication_error, usage_limit_error. Open.

string
message
string
host

Host_in_use: the host another service holds.

string
service

Host_in_use: the id of the service that holds the host.

string
reason

File_invalid: why the change, or a picture, was refused. Open: path | text | size | skill | skills | count | type.

string
paths

File_exists from an add: every path of the request where a file is and replace was not set, all at once, so the person can be asked once. publish_conflict: the files someone published changes to the same lines of.

Array<string>
publishers

Publish_conflict: who published those changes, by name.

Array<string>

404

Rejected; never contains credentials or upstream payloads.

object
error
required
object
code
required

Stable code, e.g. not_found, idempotency_conflict, session_working, usage_limit_exceeded. Open.

string
type

Category, e.g. invalid_request_error, authentication_error, usage_limit_error. Open.

string
message
string
host

Host_in_use: the host another service holds.

string
service

Host_in_use: the id of the service that holds the host.

string
reason

File_invalid: why the change, or a picture, was refused. Open: path | text | size | skill | skills | count | type.

string
paths

File_exists from an add: every path of the request where a file is and replace was not set, all at once, so the person can be asked once. publish_conflict: the files someone published changes to the same lines of.

Array<string>
publishers

Publish_conflict: who published those changes, by name.

Array<string>

409

Rejected; never contains credentials or upstream payloads.

object
error
required
object
code
required

Stable code, e.g. not_found, idempotency_conflict, session_working, usage_limit_exceeded. Open.

string
type

Category, e.g. invalid_request_error, authentication_error, usage_limit_error. Open.

string
message
string
host

Host_in_use: the host another service holds.

string
service

Host_in_use: the id of the service that holds the host.

string
reason

File_invalid: why the change, or a picture, was refused. Open: path | text | size | skill | skills | count | type.

string
paths

File_exists from an add: every path of the request where a file is and replace was not set, all at once, so the person can be asked once. publish_conflict: the files someone published changes to the same lines of.

Array<string>
publishers

Publish_conflict: who published those changes, by name.

Array<string>

410

Rejected; never contains credentials or upstream payloads.

object
error
required
object
code
required

Stable code, e.g. not_found, idempotency_conflict, session_working, usage_limit_exceeded. Open.

string
type

Category, e.g. invalid_request_error, authentication_error, usage_limit_error. Open.

string
message
string
host

Host_in_use: the host another service holds.

string
service

Host_in_use: the id of the service that holds the host.

string
reason

File_invalid: why the change, or a picture, was refused. Open: path | text | size | skill | skills | count | type.

string
paths

File_exists from an add: every path of the request where a file is and replace was not set, all at once, so the person can be asked once. publish_conflict: the files someone published changes to the same lines of.

Array<string>
publishers

Publish_conflict: who published those changes, by name.

Array<string>

411

Rejected; never contains credentials or upstream payloads.

object
error
required
object
code
required

Stable code, e.g. not_found, idempotency_conflict, session_working, usage_limit_exceeded. Open.

string
type

Category, e.g. invalid_request_error, authentication_error, usage_limit_error. Open.

string
message
string
host

Host_in_use: the host another service holds.

string
service

Host_in_use: the id of the service that holds the host.

string
reason

File_invalid: why the change, or a picture, was refused. Open: path | text | size | skill | skills | count | type.

string
paths

File_exists from an add: every path of the request where a file is and replace was not set, all at once, so the person can be asked once. publish_conflict: the files someone published changes to the same lines of.

Array<string>
publishers

Publish_conflict: who published those changes, by name.

Array<string>

413

Rejected; never contains credentials or upstream payloads.

object
error
required
object
code
required

Stable code, e.g. not_found, idempotency_conflict, session_working, usage_limit_exceeded. Open.

string
type

Category, e.g. invalid_request_error, authentication_error, usage_limit_error. Open.

string
message
string
host

Host_in_use: the host another service holds.

string
service

Host_in_use: the id of the service that holds the host.

string
reason

File_invalid: why the change, or a picture, was refused. Open: path | text | size | skill | skills | count | type.

string
paths

File_exists from an add: every path of the request where a file is and replace was not set, all at once, so the person can be asked once. publish_conflict: the files someone published changes to the same lines of.

Array<string>
publishers

Publish_conflict: who published those changes, by name.

Array<string>

422

Rejected; never contains credentials or upstream payloads.

object
error
required
object
code
required

Stable code, e.g. not_found, idempotency_conflict, session_working, usage_limit_exceeded. Open.

string
type

Category, e.g. invalid_request_error, authentication_error, usage_limit_error. Open.

string
message
string
host

Host_in_use: the host another service holds.

string
service

Host_in_use: the id of the service that holds the host.

string
reason

File_invalid: why the change, or a picture, was refused. Open: path | text | size | skill | skills | count | type.

string
paths

File_exists from an add: every path of the request where a file is and replace was not set, all at once, so the person can be asked once. publish_conflict: the files someone published changes to the same lines of.

Array<string>
publishers

Publish_conflict: who published those changes, by name.

Array<string>

503

Rejected; never contains credentials or upstream payloads.

object
error
required
object
code
required

Stable code, e.g. not_found, idempotency_conflict, session_working, usage_limit_exceeded. Open.

string
type

Category, e.g. invalid_request_error, authentication_error, usage_limit_error. Open.

string
message
string
host

Host_in_use: the host another service holds.

string
service

Host_in_use: the id of the service that holds the host.

string
reason

File_invalid: why the change, or a picture, was refused. Open: path | text | size | skill | skills | count | type.

string
paths

File_exists from an add: every path of the request where a file is and replace was not set, all at once, so the person can be asked once. publish_conflict: the files someone published changes to the same lines of.

Array<string>
publishers

Publish_conflict: who published those changes, by name.

Array<string>