Plan Upload
POST
/api/v1/files/upload
const url = 'https://aura.strangeworks.com/api/v1/files/upload';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"content_type":"application/octet-stream","deployment_name":"example","path":"example","project_id":"example","size":1,"snapshot_id":"example","source":"deployment"}'};
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://aura.strangeworks.com/api/v1/files/upload \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "content_type": "application/octet-stream", "deployment_name": "example", "path": "example", "project_id": "example", "size": 1, "snapshot_id": "example", "source": "deployment" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Successful Response
Media typeapplication/json
UploadPlanResponse
object
plan
required
One of: discriminator: mode
SinglePutPlan
object
expires_at
required
Expires At
string format: date-time
headers
required
Headers
object
key
additional properties
string
method
required
Method
string
mode
Mode
string
url
required
Url
string
S3MultipartPlan
Presigned per-part PUTs; client uploads parts in parallel.
object
expires_at
required
Expires At
string format: date-time
mode
Mode
string
part_size
required
Part Size
integer
parts
required
Parts
Array<object>
S3MultipartPartobject
headers
Headers
object
key
additional properties
string
method
Method
string
part_number
required
Part Number
integer
url
required
Url
string
upload_token
required
Upload Token
string
Example
{ "plan": { "mode": "single_put" }}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}