Add files
POST /v1/workspace/user/add
Write files from the user’s computer into the working copy, 1 to 100 at their full paths, all or none; folders there merge. Each file is a PNG or JPEG by its bytes up to 5 MiB or UTF-8 text up to 256 KiB, written byte for byte, at most 10 MiB together; the body at most 14 MiB (413 request_too_large). 409 file_exists with paths, every file there not marked replace, so the user can be asked once; 422 file_invalid (with reason) when it cannot be written. In context what agents would not load yet is written: the listing warns of it, and Save refuses it. 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. The user’s own.
Authorizations
Request Body required
object
1 to 100 files, at most 10 MiB together.
object
Its full path in the repository (not relative to a folder), each once. Folders on the way are made, or merged with those there.
Standard base64 of the file’s exact bytes, written byte for byte. A PNG or JPEG by its bytes up to 5 MiB, else UTF-8 text up to 256 KiB (422 file_invalid, reason type or size).
Replace a file there (keeping its mode). Default false: 409 file_exists with paths.
Responses
200
Success
A change to the working copy: not published until Save.
object
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.
400
Rejected; never contains credentials or upstream payloads.
object
object
Stable code, e.g. not_found, idempotency_conflict, session_working, usage_limit_exceeded. Open.
Category, e.g. invalid_request_error, authentication_error, usage_limit_error. Open.
Host_in_use: the host another service holds.
Host_in_use: the id of the service that holds the host.
File_invalid: why the change, or a picture, was refused. Open: path | text | size | skill | skills | count | type.
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.
Publish_conflict: who published those changes, by name.
401
Rejected; never contains credentials or upstream payloads.
object
object
Stable code, e.g. not_found, idempotency_conflict, session_working, usage_limit_exceeded. Open.
Category, e.g. invalid_request_error, authentication_error, usage_limit_error. Open.
Host_in_use: the host another service holds.
Host_in_use: the id of the service that holds the host.
File_invalid: why the change, or a picture, was refused. Open: path | text | size | skill | skills | count | type.
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.
Publish_conflict: who published those changes, by name.
403
Rejected; never contains credentials or upstream payloads.
object
object
Stable code, e.g. not_found, idempotency_conflict, session_working, usage_limit_exceeded. Open.
Category, e.g. invalid_request_error, authentication_error, usage_limit_error. Open.
Host_in_use: the host another service holds.
Host_in_use: the id of the service that holds the host.
File_invalid: why the change, or a picture, was refused. Open: path | text | size | skill | skills | count | type.
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.
Publish_conflict: who published those changes, by name.
404
Rejected; never contains credentials or upstream payloads.
object
object
Stable code, e.g. not_found, idempotency_conflict, session_working, usage_limit_exceeded. Open.
Category, e.g. invalid_request_error, authentication_error, usage_limit_error. Open.
Host_in_use: the host another service holds.
Host_in_use: the id of the service that holds the host.
File_invalid: why the change, or a picture, was refused. Open: path | text | size | skill | skills | count | type.
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.
Publish_conflict: who published those changes, by name.
409
Rejected; never contains credentials or upstream payloads.
object
object
Stable code, e.g. not_found, idempotency_conflict, session_working, usage_limit_exceeded. Open.
Category, e.g. invalid_request_error, authentication_error, usage_limit_error. Open.
Host_in_use: the host another service holds.
Host_in_use: the id of the service that holds the host.
File_invalid: why the change, or a picture, was refused. Open: path | text | size | skill | skills | count | type.
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.
Publish_conflict: who published those changes, by name.
410
Rejected; never contains credentials or upstream payloads.
object
object
Stable code, e.g. not_found, idempotency_conflict, session_working, usage_limit_exceeded. Open.
Category, e.g. invalid_request_error, authentication_error, usage_limit_error. Open.
Host_in_use: the host another service holds.
Host_in_use: the id of the service that holds the host.
File_invalid: why the change, or a picture, was refused. Open: path | text | size | skill | skills | count | type.
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.
Publish_conflict: who published those changes, by name.
411
Rejected; never contains credentials or upstream payloads.
object
object
Stable code, e.g. not_found, idempotency_conflict, session_working, usage_limit_exceeded. Open.
Category, e.g. invalid_request_error, authentication_error, usage_limit_error. Open.
Host_in_use: the host another service holds.
Host_in_use: the id of the service that holds the host.
File_invalid: why the change, or a picture, was refused. Open: path | text | size | skill | skills | count | type.
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.
Publish_conflict: who published those changes, by name.
413
Rejected; never contains credentials or upstream payloads.
object
object
Stable code, e.g. not_found, idempotency_conflict, session_working, usage_limit_exceeded. Open.
Category, e.g. invalid_request_error, authentication_error, usage_limit_error. Open.
Host_in_use: the host another service holds.
Host_in_use: the id of the service that holds the host.
File_invalid: why the change, or a picture, was refused. Open: path | text | size | skill | skills | count | type.
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.
Publish_conflict: who published those changes, by name.
422
Rejected; never contains credentials or upstream payloads.
object
object
Stable code, e.g. not_found, idempotency_conflict, session_working, usage_limit_exceeded. Open.
Category, e.g. invalid_request_error, authentication_error, usage_limit_error. Open.
Host_in_use: the host another service holds.
Host_in_use: the id of the service that holds the host.
File_invalid: why the change, or a picture, was refused. Open: path | text | size | skill | skills | count | type.
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.
Publish_conflict: who published those changes, by name.
503
Rejected; never contains credentials or upstream payloads.
object
object
Stable code, e.g. not_found, idempotency_conflict, session_working, usage_limit_exceeded. Open.
Category, e.g. invalid_request_error, authentication_error, usage_limit_error. Open.
Host_in_use: the host another service holds.
Host_in_use: the id of the service that holds the host.
File_invalid: why the change, or a picture, was refused. Open: path | text | size | skill | skills | count | type.
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.
Publish_conflict: who published those changes, by name.