HomeGuidesAPI ReferenceChangelogDiscussions
Hire a ReactVision Expert 🛠️Launch Studio 🖥️Sponsor on GitHub ❤️Log In
API Reference

Start a scan's upload

Secret key only. Scope: vps.

Also accepts a user token.

Admits the upload of the scan's recording and answers a signed URL for it. PUT the zip to upload.url as the body, with upload.headers and a Content-Length of recording_bytes, then call POST /vps/scans/{scan_id}/upload/complete. The URL needs no credentials and is good for two hours (expires_at). If the storage answers that the object already exists, an earlier PUT landed: go on to complete.

The upload is admitted against the team's spend limit, its queue of waiting scans and, for a kept recording, its storage quota. An app user's scan takes one of the app user's daily scans at its first admission, and an app user may have at most 3 scans admitted and not yet finished (awaiting_upload after admission, queued or processing).

Calling it again is safe while the scan is awaiting_upload. upload is null when the recording is already stored at exactly recording_bytes: skip the PUT and call complete.

Recordings are limited to 512 MiB (536,870,912 bytes). Needs a paid plan. Not counted against the monthly API request quota.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
uuid
required

Scan id.

Body Params
integer
required
1 to 536870912

The zip's exact size, at most 512 MiB.

Headers
uuid
required

The project. With a client key or a bound secret key, the key's own project; with a user token, the token's project.

string
length between 1 and 255

Your id for the signed-in app user: 1 to 255 printable ASCII characters, no spaces, not . or ... With a secret key, the request acts for that app user: it sees the app user's locations and scans and the shared ones, and changes only the app user's own. With a user token, leave it out or send the token's own app user; another one answers 403 APP_USER_MISMATCH. A client or legacy key cannot send it (403 APP_USER_ID_NOT_ALLOWED).

Responses

MISSING_PROJECT_ID: no x-project-id header.

INVALID_PROJECT_ID: x-project-id is not a UUID.

INVALID_APP_USER_ID: x-app-user-id is not 1 to 255 printable ASCII characters without spaces, or is . or ...

INVALID_BODY: recording_bytes is missing, not a whole number, or below 1.

MISSING_API_KEY: no x-api-key header and no user token.

INVALID_API_KEY_FORMAT: the key is not rv_live_, rv_client_ or rv_secret_ followed by 64 lowercase hexadecimal characters.

INVALID_SESSION_FORMAT: the Authorization header is not Bearer followed by a user token.

INVALID_API_KEY: no such key, or a key sent with the wrong prefix for its type.

API_KEY_EXPIRED: the key is past its expiry date.

INVALID_APP_USER_TOKEN: the user token is not valid, or the secret key that minted it has been deleted or has expired.

APP_USER_TOKEN_EXPIRED: the user token has expired. Get a new one from your backend.

INVALID_SESSION: a Bearer token that is neither a user token nor a ReactVision Editor session.

API_KEY_TYPE_NOT_ALLOWED: a client key or a legacy key. This operation needs a secret key or a user token.

PROJECT_NOT_FOUND: the project does not exist.

PROJECT_ACCESS_DENIED: the project belongs to another team, is not the project the key is bound to, or is not the user token's project.

APP_USER_ID_NOT_ALLOWED: a client or legacy key sent x-app-user-id. Use a user token, or a secret key on your backend.

APP_USER_MISMATCH: a user token sent an x-app-user-id other than its own app user.

VPS_SHARED_LOCATION: an app user changing a shared location or scan.

PAID_PLAN_REQUIRED: the team is on the Free plan, or its plan ended.

COMPUTE_BILLING_NOT_SET_UP: the team's plan has no payment method that can be charged.

COMPUTE_PAYMENT_FAILED: the team's last compute usage invoice is unpaid.

COMPUTE_SPEND_LIMIT_REACHED: this usage period's compute spend (Advanced VPS, environment renders and co-location) is at the team's limit.

STORAGE_LIMIT_REACHED: the team's storage quota is used up.

NOT_FOUND: no such scan, or one the request cannot see.

ALREADY_UPLOADED: the scan is no longer awaiting_upload. Get it, and upload to a new scan only if it is failed.

TOO_LARGE: recording_bytes is over 512 MiB, or the JSON body is over 64 KB.

RATE_LIMITED: for a secret key, more than 1,200 requests a minute across all operations. Wait the number of seconds in Retry-After. See Limits.

VPS_QUEUE_FULL: 50 scans of the team are already waiting to be processed.

VPS_USER_LIMIT_REACHED: the app user has started as many scans today (UTC) as the team allows.

VPS_USER_OPEN_SCANS_LIMIT: the app user already has 3 scans waiting to be uploaded or processed.

INTERNAL_ERROR: an unexpected error. Retry, and quote meta.request_id to support if it persists.

AUTH_UNAVAILABLE: the key or user token could not be checked. Retry; this does not mean it is invalid.

VPS_LOOKUP_FAILED: the records could not be read or written. Retry.

COMPUTE_BILLING_UNAVAILABLE: the team's billing could not be checked. Retry.

Language
Credentials
LoadingLoading…
Response
Choose an example:
application/json