uploadCaptureAsset
# uploadCaptureAsset
PUT
/captures/{captureId}/assets/{assetKey}
const url = 'http://localhost:8080/api/v1/captures/per_01j9x3k8m2q4r5s6t7v8w9y0z1/assets/example';const options = { method: 'PUT', headers: { cookie: 'hs_session=<hs_session>', 'Content-Type': 'application/octet-stream' }, body: 'example'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url http://localhost:8080/api/v1/captures/per_01j9x3k8m2q4r5s6t7v8w9y0z1/assets/example \ --header 'Content-Type: application/octet-stream' \ --cookie hs_session=<hs_session> \ --data exampleCalled by Homestead Helper with the capture’s upload token (Bearer hsu_…), which is valid for 10 minutes and only for this capture’s listed assets. Body is the cached response body. Max 50 MB; image/* or video/* only.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”captureId
required
string
assetKey
required
SHA-1 hex of the asset URL.
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/octet-stream
string
Responses
Section titled “Responses”Stored (or already present).
Missing or invalid credentials.
Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
code
required
string
i18nKey
string
detail
string
fields
Array<object>
object
path
required
string
code
required
string
i18nKey
string
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "i18nKey": "example", "detail": "example", "fields": [ { "path": "example", "code": "example", "i18nKey": "example" } ]}Not found.
Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
code
required
string
i18nKey
string
detail
string
fields
Array<object>
object
path
required
string
code
required
string
i18nKey
string
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "i18nKey": "example", "detail": "example", "fields": [ { "path": "example", "code": "example", "i18nKey": "example" } ]}Too large.
Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
code
required
string
i18nKey
string
detail
string
fields
Array<object>
object
path
required
string
code
required
string
i18nKey
string
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "i18nKey": "example", "detail": "example", "fields": [ { "path": "example", "code": "example", "i18nKey": "example" } ]}