API Specification
FastAPI 0.1.0#
Endpoints#
GET /api/v1/captures#
List captures
Description
Get all user captures
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
limit |
query | integer | 25 | No | |
offset |
query | integer | 0 | No | |
time_zone |
query | boolean | False | No |
Response 200 OK
[
{
"eid": "string",
"sid": null,
"name": "string",
"created": "2022-04-13T15:42:05.901Z",
"uploaded": null,
"state": "CREATED",
"error_reason": null,
"state_description": null,
"error_reason_slug": null,
"preview_urls": {},
"preview_url": null,
"viewer_url": null,
"share_url": null,
"share_link": null,
"gif_url": null,
"video_url": null,
"share_video_url": null,
"is_public": true
}
]
Response 422 Unprocessable Entity
POST /api/v1/captures#
New capture
Description
Workflow to upload a capture:
-
Create empty capture:
POST /api/v1/captures
with the capture name and bytesize. The server creates a new capture and returns how many parts the file should be split into (num_parts
) and the size of each part (chunk_size
). -
For each part, create an upload url with
POST /api/v1/captures/{eid}/create-upload-url/{part_no + 1}
. The part numbers start at 1. -
Read
chunk_size
bytes from your input file and upload the bytes with aPUT
request to theupload_url
for this part. The response contains an ETag header. Remember the ETag value for eachpart_no
. -
Complete the upload:
POST /api/v1/captures/{eid}/uploaded
with the ETags for each part.
Input data formats:
-
bulk-images
: The file should be a .zip archive containing RBG images. The files can be nested in folders. Non-image files will be ignored. The file can be larger than 5 GB. -
video
: The file should be an mp4 file. It can be larger than 5 GB.
Request body
{
"name": "string",
"bytesize": 0,
"created": "string",
"num_frames": null,
"input_data_format": "bulk-images",
"guided_mode": null,
"ios_app_version": null,
"training_parameters": null
}
Schema of the request body
{
"properties": {
"name": {
"type": "string",
"title": "Name"
},
"bytesize": {
"type": "integer",
"title": "Bytesize"
},
"created": {
"type": "string",
"title": "Created",
"deprecated": true
},
"num_frames": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Num Frames"
},
"input_data_format": {
"$ref": "#/components/schemas/InputDataFormatEnum",
"default": "commonformat-ios"
},
"guided_mode": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Guided Mode"
},
"ios_app_version": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Ios App Version"
},
"training_parameters": {
"anyOf": [
{
"$ref": "#/components/schemas/TrainingParameters"
},
{
"type": "null"
}
],
"description": "Customise behaviour of model training"
}
},
"type": "object",
"required": [
"name",
"bytesize"
],
"title": "NewCaptureInput"
}
Response 200 OK
Schema of the response body
{
"properties": {
"eid": {
"type": "string",
"title": "Eid",
"description": "External ID"
},
"chunk_size": {
"type": "integer",
"title": "Chunk Size"
},
"num_parts": {
"type": "integer",
"title": "Num Parts"
}
},
"type": "object",
"required": [
"eid",
"chunk_size",
"num_parts"
],
"title": "NewCaptureOutput"
}
Response 422 Unprocessable Entity
PUT /api/v1/captures/{eid}#
Modify capture
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
eid |
path | string | No | ||
time_zone |
query | None | False | No |
Request body
Response 200 OK
{
"eid": "string",
"sid": null,
"name": "string",
"created": "2022-04-13T15:42:05.901Z",
"uploaded": null,
"state": "CREATED",
"error_reason": null,
"state_description": null,
"error_reason_slug": null,
"preview_urls": {},
"preview_url": null,
"viewer_url": null,
"share_url": null,
"share_link": null,
"gif_url": null,
"video_url": null,
"share_video_url": null,
"is_public": true
}
Schema of the response body
{
"properties": {
"eid": {
"type": "string",
"title": "Eid"
},
"sid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Sid"
},
"name": {
"type": "string",
"title": "Name"
},
"created": {
"type": "string",
"format": "date-time",
"title": "Created"
},
"uploaded": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Uploaded"
},
"state": {
"$ref": "#/components/schemas/CaptureState"
},
"error_reason": {
"anyOf": [
{
"$ref": "#/components/schemas/CaptureErrorReason"
},
{
"type": "null"
}
]
},
"state_description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "State Description"
},
"error_reason_slug": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Error Reason Slug"
},
"preview_urls": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"title": "Preview Urls"
},
"preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Preview Url"
},
"viewer_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Viewer Url"
},
"share_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Share Url"
},
"share_link": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Share Link"
},
"gif_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Gif Url"
},
"video_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Video Url"
},
"share_video_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Share Video Url"
},
"is_public": {
"type": "boolean",
"title": "Is Public"
}
},
"type": "object",
"required": [
"eid",
"sid",
"name",
"created",
"uploaded",
"state",
"error_reason",
"state_description",
"error_reason_slug",
"preview_urls",
"preview_url",
"viewer_url",
"share_url",
"share_link",
"gif_url",
"video_url",
"share_video_url",
"is_public"
],
"title": "CaptureOutput"
}
Response 422 Unprocessable Entity
DELETE /api/v1/captures/{eid}#
Delete capture
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
eid |
path | string | No |
Response 204 No Content
Response 422 Unprocessable Entity
POST /api/v1/captures/{eid}/create-upload-url/{part_no}#
Create upload URL
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
eid |
path | string | No | ||
part_no |
path | integer | No |
Request body
Response 200 OK
Schema of the response body
Response 422 Unprocessable Entity
POST /api/v1/captures/{eid}/uploaded#
Complete upload
Description
When all chunks have been uploaded, send their ETags to this endpoint. We then consider the file to be completely uploaded and start our processing.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
eid |
path | string | No |
Request body
Schema of the request body
Response 200 OK
{
"eid": "string",
"sid": null,
"name": "string",
"created": "2022-04-13T15:42:05.901Z",
"uploaded": null,
"state": "CREATED",
"error_reason": null,
"state_description": null,
"error_reason_slug": null,
"preview_urls": {},
"preview_url": null,
"viewer_url": null,
"share_url": null,
"share_link": null,
"gif_url": null,
"video_url": null,
"share_video_url": null,
"is_public": true
}
Schema of the response body
{
"properties": {
"eid": {
"type": "string",
"title": "Eid"
},
"sid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Sid"
},
"name": {
"type": "string",
"title": "Name"
},
"created": {
"type": "string",
"format": "date-time",
"title": "Created"
},
"uploaded": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Uploaded"
},
"state": {
"$ref": "#/components/schemas/CaptureState"
},
"error_reason": {
"anyOf": [
{
"$ref": "#/components/schemas/CaptureErrorReason"
},
{
"type": "null"
}
]
},
"state_description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "State Description"
},
"error_reason_slug": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Error Reason Slug"
},
"preview_urls": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"title": "Preview Urls"
},
"preview_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Preview Url"
},
"viewer_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Viewer Url"
},
"share_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Share Url"
},
"share_link": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Share Link"
},
"gif_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Gif Url"
},
"video_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Video Url"
},
"share_video_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Share Video Url"
},
"is_public": {
"type": "boolean",
"title": "Is Public"
}
},
"type": "object",
"required": [
"eid",
"sid",
"name",
"created",
"uploaded",
"state",
"error_reason",
"state_description",
"error_reason_slug",
"preview_urls",
"preview_url",
"viewer_url",
"share_url",
"share_link",
"gif_url",
"video_url",
"share_video_url",
"is_public"
],
"title": "CaptureOutput"
}
Response 422 Unprocessable Entity
GET /share/{sid}/metadata#
Get metadata
Description
Returns the metadata such as camera poses and CDN URLs for this
capture. Use the quality
and profiles
parameters to select the
model you want to download.
The profiles
parameter is a list and may contain the following values:
-
ply
for the uncompressed full.ply
file -
sogs-sh0
for the Self-Organizing Gaussian compression method. URL will be to a .zip archive containing the 6 data files.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
lod |
query | None | No | Level of detail hierarchy | |
profiles |
query | None | No | Content-type profile | |
quality |
query | string | No | ||
sid |
path | string | No | ||
use_cdn |
query | boolean | True | No |
Response 200 OK
{
"eid": "string",
"sid": null,
"name": "string",
"segmented_capture_eid": null,
"profile_name": "string",
"lod": true,
"hdr_mode": null,
"nominal_ev": null,
"tmo_parameters": null,
"model_urls": [
"string"
],
"cameras": [
{
"matrix": [
10.12
]
}
],
"models": [
{
"url": "string",
"size": 0,
"id": null,
"aabb": null,
"resolution_range": null,
"parent": null
}
],
"video_trajectory": null,
"reposition_data": null
}
Schema of the response body
{
"properties": {
"eid": {
"type": "string",
"title": "Eid"
},
"sid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Sid"
},
"name": {
"type": "string",
"title": "Name"
},
"segmented_capture_eid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Segmented Capture Eid"
},
"profile_name": {
"type": "string",
"title": "Profile Name"
},
"lod": {
"type": "boolean",
"title": "Lod"
},
"hdr_mode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Hdr Mode"
},
"nominal_ev": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Nominal Ev",
"default": 0
},
"tmo_parameters": {
"anyOf": [
{
"items": {
"type": "number"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Tmo Parameters"
},
"model_urls": {
"items": {
"type": "string"
},
"type": "array",
"title": "Model Urls",
"deprecated": true
},
"cameras": {
"items": {
"$ref": "#/components/schemas/Matrix"
},
"type": "array",
"title": "Cameras",
"description": "Camera poses as quaternions"
},
"models": {
"items": {
"$ref": "#/components/schemas/SegmentModel"
},
"type": "array",
"title": "Models"
},
"video_trajectory": {
"anyOf": [
{
"$ref": "#/components/schemas/VideoTrajectory"
},
{
"type": "null"
}
]
},
"reposition_data": {
"anyOf": [
{
"$ref": "#/components/schemas/CaptureRepositionDataOutputSchema"
},
{
"type": "null"
}
]
}
},
"type": "object",
"required": [
"eid",
"name",
"segmented_capture_eid",
"profile_name",
"lod",
"model_urls",
"cameras",
"models"
],
"title": "CaptureMetadata"
}
Response 422 Unprocessable Entity
Schemas#
CaptureErrorReason#
Type: string
CaptureMetadata#
Name | Type |
---|---|
cameras |
Array<Matrix> |
eid |
string |
hdr_mode |
|
lod |
boolean |
model_urls |
Array<string> |
models |
Array<SegmentModel> |
name |
string |
nominal_ev |
|
profile_name |
string |
reposition_data |
|
segmented_capture_eid |
|
sid |
|
tmo_parameters |
|
video_trajectory |
CaptureOutput#
Name | Type |
---|---|
created |
string(date-time) |
eid |
string |
error_reason |
|
error_reason_slug |
|
gif_url |
|
is_public |
boolean |
name |
string |
preview_url |
|
preview_urls |
|
share_link |
|
share_url |
|
share_video_url |
|
sid |
|
state |
CaptureState |
state_description |
|
uploaded |
|
video_url |
|
viewer_url |
CaptureRepositionDataOutputSchema#
Name | Type |
---|---|
rotation_w |
number |
rotation_x |
number |
rotation_y |
number |
rotation_z |
number |
scale |
number |
CaptureState#
Type: string
CaptureUploadedInput#
Name | Type |
---|---|
eid |
string |
parts |
Array<UploadedPart> |
EditCaptureInput#
Name | Type |
---|---|
name |
string |
FocusArea#
Name | Type |
---|---|
buffer_meters |
|
crop_method |
|
max_lat |
|
max_lng |
|
min_lat |
|
min_lng |
|
polylines |
Array<string> |
FocusCropMethod#
Type: string
HTTPValidationError#
Name | Type |
---|---|
detail |
Array<ValidationError> |
InputDataFormatEnum#
Type: string
LodAabb#
Name | Type |
---|---|
max |
Array<number> |
min |
Array<number> |
Matrix#
Name | Type |
---|---|
matrix |
Array<number> |
NewCaptureInput#
Name | Type |
---|---|
bytesize |
integer |
created |
string |
guided_mode |
|
input_data_format |
InputDataFormatEnum |
ios_app_version |
|
name |
string |
num_frames |
|
training_parameters |
NewCaptureOutput#
Name | Type |
---|---|
chunk_size |
integer |
eid |
string |
num_parts |
integer |
RecreateCaptureUploadUrls#
Name | Type |
---|---|
bytesize |
integer |
eid |
string |
SegmentModel#
Name | Type |
---|---|
aabb |
|
id |
|
parent |
|
resolution_range |
|
size |
integer |
url |
string |
TrainingParameters#
Name | Type |
---|---|
focus_area |
UploadedPart#
Name | Type |
---|---|
etag |
string |
number |
integer |
UploadUrlOutput#
Name | Type |
---|---|
chunk_size |
integer |
eid |
string |
upload_url |
string |
ValidationError#
Name | Type |
---|---|
loc |
Array<> |
msg |
string |
type |
string |
VideoTrajectory#
Name | Type |
---|---|
fps |
number |
keyframes |
Array<Matrix> |