### Snapshot at Session Start Source: https://docs.vagon.io/teams/features/folder-snapshot Example of the initial snapshot state where all files are treated as new and copied in full. ```text Vagon Files/Outputs/t/ ├── quarterly_report.docx ├── financials.pptx ├── sales_data.csv └── Files.txt ← lists quarterly_report.docx, financials.pptx, sales_data.csv ``` -------------------------------- ### Installation State Event Listener Source: https://docs.vagon.io/streams/integrations/client-side-communication/javascript-sdk Registers a callback for when the application enters the installation state. ```javascript window.Vagon.onInstalling(() => { console.log("Application Installing"); }); ``` -------------------------------- ### Get Download Status Success Response Source: https://docs.vagon.io/teams/reference/files Example JSON response returned when the file is ready for download. ```json { "id": "string", "type": "download", "attributes": { "status": "uploaded", "download_url": "https://s3.amazonaws.com/bucket/temp_files/uuid/archive.zip?X-Amz-Signature=...&X-Amz-Expires=3600", "expires_at": "2021-01-21T16:09:09.461Z", "size": 1048576 }, "client_code": 200, "message": "OK", "timestamp": "2026-02-05T10:00:00Z" } ``` -------------------------------- ### Machine Creation Success Response Example Source: https://docs.vagon.io/teams/reference/machines Example of a successful JSON response returned after creating a machine. ```json image_id": 100, "assigned_image_name": "Template #100", "region": "dublin", "machine_type": "Planet", "remaining_usage": 0, "deposited_usage": 0, "user": null, "friendly_status": "off", "permissions": { "public_internet_access": true, "can_download_from_vagon_workstation": true, "analytics_collection_enabled": false, "clipboard_enabled": true, "screen_recording_enabled": false, "input_recording_enabled": false } } } ], "count": 1, "client_code": 200, "message": "OK", "timestamp": "2026-02-05T10:10:22Z" } ``` -------------------------------- ### User Action Logs Response Example Source: https://docs.vagon.io/teams/reference/user-action-logs A full example of the JSON response returned by the logs endpoint. ```json { "logs": [ { "id": 1, "action_type": "machine_started", "user_id": 123, "user_email": "user@example.com", "machine_id": 456, "metadata": { "machine_type_id": 1, "machine_type_name": "Standard", "region": "dublin" }, "created_at": "2024-01-15T10:30:00Z", "updated_at": "2024-01-15T10:30:00Z" }, { "id": 2, "action_type": "file_deleted", "user_id": 123, "user_email": "user@example.com", "machine_id": 456, "metadata": { "file_id": 789, "file_name": "document.pdf", "file_size": 1048576, "file_content_type": "application/pdf", "is_shared": false, "object_type": "file" }, "created_at": "2024-01-15T11:00:00Z", "updated_at": "2024-01-15T11:00:00Z" } ], "count": 150, "start_date": "2024-01-01T00:00:00Z", "end_date": "2024-01-31T23:59:59Z" } ``` -------------------------------- ### Response Example for Listing Files Source: https://docs.vagon.io/teams/reference/files This is an example of a successful response when listing file system content. It includes an array of file/folder objects, a client code, message, and timestamp. ```json { "content": [ { "path": "C:\\Users\\Administrator", "name": "Administrator", "is_directory": true }, { "path": "C:\\Users\\Public", "name": "Public", "is_directory": true } ], "client_code": 200, "message": "OK", "timestamp": "2026-02-04T11:55:10Z" } ``` -------------------------------- ### Success Response for Directory Creation Source: https://docs.vagon.io/teams/reference/files Example response returned when creating a new directory. ```json { "id": 124, "uid": "def456-ghi789-jkl012", "upload_urls": null, "chunk_size": 250, "client_code": 200, "message": "OK", "timestamp": "2026-02-05T10:00:00Z" } ``` -------------------------------- ### Success Response Example Source: https://docs.vagon.io/teams/reference/images Example of the JSON response returned upon successful initiation of the image creation request. ```json { "id": "1", "type": "image", "attributes": { "id": 1, "name": "Design Suite Template", "size": 107374182400, "status": "pending", "source": "pre_installation", "created_at": "2024-01-15T10:00:00Z", "updated_at": "2024-01-15T10:00:00Z", "softwares": { "data": [ { "id": "1", "type": "software", "attributes": { "id": 1, "name": "Adobe Photoshop", "size": 5583457484 } }, { "id": "1", "type": "software", "attributes": { "id": 2, "name": "Blender", "size": 5583457484 } } ] } } } ``` -------------------------------- ### Install Vagon CLI Source: https://docs.vagon.io/streams/tools-and-services/vagon-streams-cli Use pip to install the Vagon CLI. This command is used to set up the tool for managing Vagon Streams applications. ```bash pip install vagon-cli ``` -------------------------------- ### Available Machine Types Response Example Source: https://docs.vagon.io/teams/reference/machines Example JSON response structure returned when successfully querying available machine types. ```json { "machine_types": [ { "id": "11", "type": "machine_type", "attributes": { "name": "g4dn.xlarge", "friendly_name": "Planet", "cpu": 4, "memory": "16.0", "gpu": 1, "gpu_memory": "16.0" } }, { "id": "15", "type": "machine_type", "attributes": { "name": "g5.xlarge", "friendly_name": "Spark", "cpu": 4, "memory": "16.0", "gpu": 1, "gpu_memory": "24.0" } } ], "client_code": 200, "message": "OK", "timestamp": "2026-02-04T11:13:07Z" } ``` -------------------------------- ### Success Response Example for Retrieving Machine Usage Source: https://docs.vagon.io/teams/reference/usages This is an example of a successful response after retrieving machine usage. It confirms the number of minutes retrieved and provides machine details. ```json { "retrieved_minutes": 1, "machine_id": 717, "machine_type": "Planet", "client_code": 200, "message": "OK", "timestamp": "2026-02-04T13:51:41Z" } ``` -------------------------------- ### Stream Machine Start Response (200 OK) Source: https://docs.vagon.io/streams/integrations/streams-api-services/api-documentation Successful response when starting a Stream Machine. Includes connection details and machine status. ```json { "client_code": 200, "connection_link": "https://sb-app.vagon.io/stream/bf96fb3b-9420-asf2-8dc5-b8477fd52303", "machine": { "id": "946869128", "type": "machine", "attributes": { "start_at": "2024-03-27T11:05:42.144Z", "end_at": null, "status": "pending", "friendly_status": "turning_on", "connection_status": "assigned", "region": "dublin", "uid": "bf96fb3b-9420-asf2-8dc5-b8477fd52303", "cost": "0.0", "duration": 0, "application_name": "Test Application", "application_id": 1143, "stream_id": 1381, "stream_name": "Stream #138241", "machine_type": "Pro - G2", "public_ip_address": null } }, "message": null, "timestamp": "2024-03-27T11:05:49Z" } ``` -------------------------------- ### Success Response Example for Machine Creation Source: https://docs.vagon.io/teams/reference/machines This is an example of a successful response when creating one or more machines. It includes details about the created machines and a status message. ```json { "machines": [ { "id": "100", "type": "machine", "attributes": { "name": "Computer #100", "last_session_start_at": null, "auto_stop_threshold": 900, "file_storage_size": 25, "disk_size": 75, "network_credit": 10737418240, "assigned_image_id": 100, "assigned_image_name": "Template #100", "region": "dublin", "machine_type": "Planet", "remaining_usage": 0, "deposited_usage": 0, "user": null, "friendly_status": "off", "permissions": { "public_internet_access": true, "can_download_from_vagon_workstation": true, "analytics_collection_enabled": false, "clipboard_enabled": true, "screen_recording_enabled": false, "input_recording_enabled": false } } } ], "count": 1, "client_code": 200, "message": "OK", "timestamp": "2026-02-05T10:10:22Z" } ``` -------------------------------- ### Archived Logs Response Example Source: https://docs.vagon.io/teams/reference/user-action-logs Example JSON response containing an array of presigned S3 download URLs and metadata for the requested date range. ```json { "download_urls": [ "https://s3.amazonaws.com/vagon-logs/org-123/2023-01.json.gz?X-Amz-Signature=abc123...&X-Amz-Expires=600", "https://s3.amazonaws.com/vagon-logs/org-123/2023-02.json.gz?X-Amz-Signature=def456...&X-Amz-Expires=600", "https://s3.amazonaws.com/vagon-logs/org-123/2023-03.json.gz?X-Amz-Signature=ghi789...&X-Amz-Expires=600" ], "count": 12, "start_date": "2023-01-01T00:00:00Z", "end_date": "2023-12-31T23:59:59Z", "client_code": 200, "message": "OK", "timestamp": "2026-02-05T10:00:00Z" } ``` -------------------------------- ### Complete Upload Request Body Example Source: https://docs.vagon.io/teams/reference/files Provides an example of the JSON request body required to complete a multipart upload. It includes an array of uploaded parts, each with its part number and ETag. ```json { "parts": [ { "part_number": 1, "etag": "\"d8e8fca2dc0f896fd7cb4cb0031ba249\"" }, { "part_number": 2, "etag": "\"7cb4cb0031ba249d8e8fca2dc0f896fd\"" } ] } ``` -------------------------------- ### Assign User or Invitation Success Response Source: https://docs.vagon.io/teams/reference/users Example of a successful response returned after assigning a machine. ```json { "name": "Computer User", "email": "", "status": "active", "machine_id": 100, "uid": "683530d7-707a-aaaa-8d74-4ac8475e5051", "client_code": 200, "message": "OK", "timestamp": "2026-02-10T15:58:10Z" } ``` -------------------------------- ### File Creation Request Body Source: https://docs.vagon.io/teams/reference/files Example JSON payload for initiating a file creation request. ```json { "content_type": "application/zip", "size": 104857600, "chunk_size": 250, "overwrite": false, "parent_id": 1 } ``` -------------------------------- ### 200 OK Response for Headers Source: https://docs.vagon.io/streams/integrations/streams-api-services/api-documentation Example JSON response indicating a successful operation when retrieving headers. ```json { "client_code": 200, "timestamp": "2024-03-27T11:20:09Z" } ``` -------------------------------- ### POST /images/install - Create Image from Application List Source: https://docs.vagon.io/teams/reference/images Creates a new image (template) with pre-installed software by installing software on a base image. The image can then be assigned to machines. ```APIDOC ## POST /images/install ### Description Creates an image (template) with pre-installed software. This endpoint creates a new image by installing software on a base image. The image can then be assigned to machines. ### Headers | Name | Type | | --- | --- | | Authorization* | HMAC {key}:{signature}:{nonce}:{timestamp} | | Content-Type | application/json | ### Parameters #### Request Body - **name** (String) - Optional - Custom name for the image. If not provided, auto-generated as "Template #{base_image_id}" - **software_ids** (Array[Integer]) - Optional - Array of software IDs to pre-install. Use `GET /software` to see available software. Default: empty array - **base_image_id** (Integer) - Optional - Base image ID. If not provided, uses the latest base image. Use `GET /software` to see available base images ### Request Example ```json { "name": "Design Suite Template", "software_ids": [1, 2], "base_image_id": 1 } ``` ### Response #### Success Response (200) - **id** (String) - Image ID - **type** (String) - Always "image" - **attributes.id** (Integer) - Image ID (numeric) - **attributes.name** (String) - Image name - **attributes.size** (Integer) - Image size in GB (includes 5% buffer) - **attributes.status** (String) - Image status: `pending` initially, then `building`, and finally `available` - **attributes.source** (String) - Always `pre_installation` for this endpoint - **attributes.created_at** (String) - Creation timestamp (ISO 8601) - **attributes.updated_at** (String) - Last update timestamp (ISO 8601) - **attributes.softwares** (Object) - Array of pre-installed software - **client_code** (Integer) - Response code (200 for success) - **message** (String) - Response message - **timestamp** (String) - Response timestamp (ISO 8601) #### Response Example ```json { "id": "1", "type": "image", "attributes": { "id": 1, "name": "Design Suite Template", "size": 107374182400, "status": "pending", "source": "pre_installation", "created_at": "2024-01-15T10:00:00Z", "updated_at": "2024-01-15T10:00:00Z", "softwares": { "data": [ { "id": "1", "type": "software", "attributes": { "id": 1, "name": "Adobe Photoshop", "size": 5583457484 } }, { "id": "1", "type": "software", "attributes": { "id": 2, "name": "Blender", "size": 5583457484 } } ] } } } ``` ### Error Responses | Status | Description | | --- | --- | | 400 | Bad request | | 404 | Base image not found (if base_image_id provided) | | 4710 | Permission required | ### Notes - Image creation is asynchronous and may take time - Image size is calculated with a 5% buffer - If `software_ids` is empty, only the base image size (with buffer) is used - Image status will be `pending` initially, then `building`, and finally `available` when ready - Use `GET /images/:id` to check image status ``` -------------------------------- ### GET /machines/{id}/sessions Source: https://docs.vagon.io/teams/reference/machines Retrieves all sessions for a specific machine. Sessions are ordered by start time in descending order, most recent first. ```APIDOC ## GET /machines/{id}/sessions ### Description Retrieves all sessions for a specific machine. Sessions are ordered by start time in descending order, most recent first. ### Method GET ### Endpoint /machines/{id}/sessions ### Headers - **Authorization** (HMAC {key}:{signature}:{nonce}:{timestamp}) - Required - **Content-Type** (application/json) - Required ### Path Parameters - **id** (Integer) - Required - Machine ID ### Response #### Success Response (200) - **sessions** (Array) - Array of session objects - **sessions[].id** (String) - Session ID - **sessions[].type** (String) - Always "machine_session" - **sessions[].attributes.start_at** (String) - Session start time (ISO 8601 format) - **sessions[].attributes.end_at** (String) - Session end time (ISO 8601 format). null if still active - **sessions[].attributes.duration** (Integer) - Session duration in minutes - **client_code** (Integer) - Response code (200 for success) - **message** (String) - Response message - **timestamp** (String) - Response timestamp (ISO 8601) #### Response Example ```json { "sessions": [ { "id": "2000", "type": "machine_session", "attributes": { "start_at": "2026-01-23T11:02:41.902Z", "end_at": "2026-01-23T11:07:51.115Z", "duration": 6 } }, { "id": "1999", "type": "machine_session", "attributes": { "start_at": "2026-01-21T22:57:57.450Z", "end_at": "2026-01-21T22:59:58.408Z", "duration": 3 } } ], "client_code": 200, "message": "OK", "timestamp": "2026-02-04T11:55:58Z" } ``` ``` -------------------------------- ### GET /images - List Available Images Source: https://docs.vagon.io/teams/reference/images Lists all organization images (templates). This endpoint returns all silver images (templates) created by the organization. Images can be created from machines or installed with pre-configured software. ```APIDOC ## GET /images ### Description Lists all organization images (templates). This endpoint returns all silver images (templates) created by the organization. Images can be created from machines or installed with pre-configured software. ### Method GET ### Endpoint /images ### Headers - **Authorization** (HMAC {key}:{signature}:{nonce}:{timestamp}) - Required - **Content-Type** (application/json) - Required ### Query Parameters - **page** (integer) - Optional - Page number. Default: 1 - **per_page** (integer) - Optional - Records per page. Default: 20 - **q** (string) - Optional - Search by image name ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **images** (Array) - Array of image objects - **images[].id** (String) - Image ID - **images[].type** (String) - Always "image" - **images[].attributes.id** (Integer) - Image ID (numeric) - **images[].attributes.name** (String) - Image name - **images[].attributes.size** (Integer) - Image size in GB - **images[].attributes.status** (String) - Image status: `pending`, `building`, `available`, `failed` - **images[].attributes.source** (String) - Image source: `pre_installation` (created with software) or `seat` (created from machine) - **images[].attributes.created_at** (String) - Creation timestamp (ISO 8601) - **images[].attributes.updated_at** (String) - Last update timestamp (ISO 8601) - **images[].attributes.softwares** (Array) - Array of pre-installed software (if source is `pre_installation`) - **count** (Integer) - Total number of images - **page** (Integer) - Current page number - **next_page** (Integer) - Next page number. null if last page - **client_code** (Integer) - Response code (200 for success) - **message** (String) - Response message - **timestamp** (String) - Response timestamp (ISO 8601) #### Response Example ```json { "images": [ { "id": "347", "type": "image", "attributes": { "id": 347, "name": "My Custom Template", "size": 75, "status": "available", "source": "seat", "created_at": "2026-02-04T12:47:07.761Z", "updated_at": "2026-02-04T12:48:11.194Z", "softwares": [] } }, { "id": "346", "type": "image", "attributes": { "id": 346, "name": "Template #346", "size": 21, "status": "available", "source": "pre_installation", "created_at": "2026-02-03T14:37:20.238Z", "updated_at": "2026-02-03T14:48:13.643Z", "softwares": [ { "id": "1", "type": "software", "attributes": { "id": 1, "name": "Blender", "size": 1.4 } } ] } } ], "count": 2, "page": 1, "next_page": 2, "client_code": 200, "message": "OK", "timestamp": "2026-02-04T12:50:06Z" } ``` #### Error Responses - **400** - Bad request - **404** - Not found - **4710** - Permission required ``` -------------------------------- ### Full Demo HTML Structure Source: https://docs.vagon.io/streams/integrations/client-side-communication/javascript-sdk A complete example showing the SDK script inclusion and the configured iframe within an HTML document. ```html