-
Notifications
You must be signed in to change notification settings - Fork 0
API Overview
All routes except for login and register require a valid JWT token in the Authorization header.
Format: Authorization: Bearer <token>
Authenticates a user and returns a JWT token.
-
URL:
/user/account/login
-
Method:
POST
-
Request Body:
{ "username": "string", "password": "string" }
-
Success Response:
- Code: 200
-
Content:
{ "jwtToken": "string" }
Creates a new user account.
-
URL:
/user/account/register
-
Method:
POST
-
Request Body:
{ "username": "string", "password": "string" }
-
Success Response:
- Code: 201
-
Content:
{ "success": true }
Updates the username of the authenticated user.
-
URL:
/user/account/update/username
-
Method:
PATCH
-
Request Body:
{ "password": "string", "new_username": "string" }
-
Success Response:
- Code: 200
-
Content:
{ "message": "Username updated" }
Updates the password of the authenticated user.
-
URL:
/user/account/update/password
-
Method:
PATCH
-
Request Body:
{ "old_password": "string", "new_password": "string" }
-
Success Response:
- Code: 200
-
Content:
{ "message": "Password updated" }
Deletes the authenticated user's account.
-
URL:
/user/account/delete
-
Method:
DELETE
-
Request Body:
{ "password": "string" }
-
Success Response:
- Code: 200
-
Content:
{ "message": "User deleted" }
Uploads a new video and starts processing a new scene.
-
URL:
/user/scene/new
-
Method:
POST
-
Content-Type:
multipart/form-data
-
Form Data:
-
file
: The video file (required) -
training_mode
: "gaussian" or "tensorf" (required) -
output_types
: Comma-separated list of output types (required) -
save_iterations
: Comma-separated list of iterations to save (required) -
total_iterations
: Total number of iterations (required) -
scene_name
: Name of the scene (optional)
-
-
Success Response:
- Code: 202
-
Content:
{ "id": "string", "message": "Video received and processing scene. Check back later for updates." }
Retrieves metadata about the resources available for a scene.
-
URL:
/user/scene/metadata/:scene_id
-
Method:
GET
-
URL Params:
-
scene_id
: ID of the scene
-
-
Success Response:
- Code: 200
- Content: JSON object containing resource metadata
-
Example Response:
- Code: 200
- Content:
{
"uuid": "5f9b2c1b3e7a8d1234567890",
"status": 200,
"error": 0,
"message": "Scene metadata retrieved successfully",
"resources": {
"splat_cloud": {
"1000": {
"exists": true,
"size": 1048576,
"chunks": 1,
"last_chunk_size": 1048576
},
"7000": {
"exists": true,
"size": 2097152,
"chunks": 2,
"last_chunk_size": 1048576
},
"30000": {
"exists": false,
"size": 0,
"chunks": 0,
"last_chunk_size": 0
}
},
"video": {
"1000": {
"exists": true,
"size": 5242880,
"chunks": 5,
"last_chunk_size": 1048576
},
"7000": {
"exists": true,
"size": 10485760,
"chunks": 10,
"last_chunk_size": 1048576
},
"30000": {
"exists": false,
"size": 0,
"chunks": 0,
"last_chunk_size": 0
}
}
}
}
Retrieves the thumbnail image for a scene.
-
URL:
/user/scene/thumbnail/:scene_id
-
Method:
GET
-
URL Params:
-
scene_id
: ID of the scene
-
-
Success Response:
- Code: 200
- Content: Thumbnail image data
Retrieves the name of a scene.
-
URL:
/user/scene/name/:scene_id
-
Method:
GET
-
URL Params:
-
scene_id
: ID of the scene
-
-
Success Response:
- Code: 200
-
Content:
{ "name": "string" }
Retrieves the progress of scene processing.
-
URL:
/user/scene/progress/:scene_id
-
Method:
GET
-
URL Params:
-
scene_id
: ID of the scene
-
-
Success Response:
- Code: 200
- Content: JSON object containing progress information
-
Example Response:
- Code: 200
- **Content:
{
"uuid": "5f9b2c1b3e7a8d1234567890",
"status": 200,
"error": 0,
"message": "Scene progress retrieved successfully",
"processing": true,
"overall_position": 3,
"overall_size": 10,
"stage": "nerf_list",
"current_position": 1,
"current_size": 5
}
Retrieves a specific output file for a scene.
-
URL:
/user/scene/output/:output_type/:scene_id
-
Method:
GET
-
URL Params:
-
output_type
: Type of output (splat_cloud, point_cloud, video, or model) -
scene_id
: ID of the scene
-
-
Query Params:
-
iteration
: Specific iteration to retrieve (optional)
-
-
Success Response:
- Code: 200
- Content: Output file data
Retrieves the list of scenes for the authenticated user.
-
URL:
/user/scene/history
-
Method:
GET
-
Success Response:
- Code: 200
-
Content:
{ "resources": ["string"] }
Deletes a specific scene.
-
URL:
/user/scene/delete/:scene_id
-
Method:
DELETE
-
URL Params:
-
scene_id
: ID of the scene to delete
-
-
Success Response:
- Code: 200
-
Content:
{ "message": "Scene deleted" }
Retrieves a list of all available routes.
-
URL:
/routes
-
Method:
GET
-
Success Response:
- Code: 200
- Content: JSON array of route information
Checks the health status of the server.
-
URL:
/health
-
Method:
GET
-
Success Response:
- Code: 200
- Content: "OK"
Note: All authenticated routes require a valid JWT token in the Authorization header. Error responses are not detailed here but should include appropriate HTTP status codes and error messages.