Begin a direct upload
POST
/api/v1/projects/{id}/uploads
const url = 'https://api.deploybase.eu/api/v1/api/v1/projects/example/uploads';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"branch":"example","files":[{"hash":"example","path":"example","size":1}],"label":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.deploybase.eu/api/v1/api/v1/projects/example/uploads \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "branch": "example", "files": [ { "hash": "example", "path": "example", "size": 1 } ], "label": "example" }'Validates a file manifest, creates a pending deployment and returns the files the client must send
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ” id
required
string
Project ID
Header Parameters
Section titled “ Header Parameters ” Idempotency-Key
string
Replaying this key returns the original session and creates nothing
Request Body
Section titled “ Request Body ”Upload manifest
Media type application/json
object
branch
string
files
required
Array<object>
object
hash
string
path
string
size
integer
label
string
Example generated
{ "branch": "example", "files": [ { "hash": "example", "path": "example", "size": 1 } ], "label": "example"}Responses
Section titled “ Responses ”Created
Media type application/json
object
data
meta
object
request_id
string
timestamp
string
trace_id
string
data
object
deployment_id
string
expires_at
string
known_count
integer
missing
Missing lists every unique manifest hash the client must PUT. In this phase that is every hash in the manifest; DEP-411 narrows it to the blobs the team does not hold.
Array<string>
total_bytes_to_send
integer
upload_id
string
Example generated
{ "data": { "deployment_id": "example", "expires_at": "example", "known_count": 1, "missing": [ "example" ], "total_bytes_to_send": 1, "upload_id": "example" }, "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Invalid request body or Idempotency-Key
Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Unauthorized
Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Manifest exceeds the plan’s upload allowance
Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Team suspended
Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Project not found
Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Project is being deleted
Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Invalid manifest
Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Too many upload sessions
Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}