API Documentation

Applications

GET https://api.vagon.io/app-stream-management/v2/applications

Returns all applications in Developer account. Application IDs will be used for other endpoints.

Query Parameters

Headers

{
  "applications": [
    {
      "id": "11421",
      "type": "application",
      "attributes": {
        "id": 11421,
        "name": "Test Application",
        "status": "active",
        "banner_url": null,
        "logo_url": null,
        "friendly_status": "no_streams",
        "os": "windows",
        "active_executable": {
          "id": "122411",
          "type": "executable",
          "attributes": {
            "executable_name": "Application",
            "launch_arguments": null,
            "restart_arguments": null,
            "file": "Application.zip",
            "version": 1,
            "active": true,
            "created_at": "2024-03-07T14:40:23.744Z",
            "images": []
          }
        },
        "performance": "Pro - G2",
        "enterprise": null,
        "pro": null
      }
    }
  ],
  "count": 7,
  "page": 1,
  "client_code": 200,
  "timestamp": "2024-03-27T10:29:25Z"
}

Streams

Streams endpoints allow you to manage your Stream Machines according to your custom workflow.

You have to create a Stream link from Vagon Dashboard to use Streams endpoints to manage your Streams Machines.

GET https://api.vagon.io/app-stream-management/v2/streams

Returns all Streams and Streams details under the selected application

Query Parameters

Headers

{
  "streams": [
    {
      "id": "138681",
      "type": "stream",
      "attributes": {
        "id": 138681,
        "status": "active",
        "uid": "416d2b18-90av-a71k-2034-9f282c3f8603",
        "resolution": "res_1080p",
        "collect_info": false,
        "dark_mode": null,
        "password_protection": false,
        "sound": "user_can_activate",
        "microphone": "user_can_activate",
        "launch_arguments": null,
        "dock_position": "bottom",
        "keyboard_layout": null,
        "user_session_data": false,
        "boost_enabled": false,
        "pixel_streaming_enabled": false,
        "port_access_enabled": false,
        "maximum_session_duration": "off",
        "idle_duration": "off",
        "auto_turn_off_duration": "5_min",
        "application": {
          "id": "11421",
          "type": "application",
          "attributes": {
            "id": 11421,
            "name": "Test Application",
            "status": "active",
            "banner_url": null,
            "logo_url": null,
            "friendly_status": "live",
            "os": "windows",
            "active_executable": {
              "id": "122411",
              "type": "executable",
              "attributes": {
                "executable_name": "Application",
                "launch_arguments": null,
                "restart_arguments": null,
                "file": "Application.zip",
                "version": 1,
                "active": true,
                "created_at": "2024-03-07T14:40:26.896Z",
                "images": []
              }
            },
            "performance": "Pro - G2",
            "enterprise": null,
            "pro": null
          }
        },
        "in_active_time_range": true
      }
    }
  ],
  "count": 2,
  "page": 1,
  "client_code": 200,
  "timestamp": "2024-03-27T10:36:47Z"
}

Stream Machines

GET https://api.vagon.io/app-stream-management/v2/streams/{stream_id}/machines

Returns all Stream Machines and their status under the Streams

Path Parameters

Query Parameters

Headers

{
  "machines": [
    {
      "id": "9462282",
      "type": "machine",
      "attributes": {
        "start_at": "2024-03-27T08:48:46.948Z",
        "end_at": "2024-03-27T08:55:12.763Z",
        "status": "stopped",
        "friendly_status": "off",
        "connection_status": "terminated",
        "region": "dublin",
        "uid": "4df05d4e-af92-ad82-2034-2f2cc0f57ea2",
        "cost": "0.182",
        "duration": 385,
        "application_name": "Test Application",
        "application_id": 1151,
        "stream_id": 1364,
        "stream_name": "Stream #2240",
        "machine_type": "Pro - G2",
        "public_ip_address": null
      }
    }
  ],
  "count": 5,
  "page": 1,
  "client_code": 200,
  "timestamp": "2024-03-27T10:39:43Z"
}

Stream Machine Status Details

When you use the generated iframe or URL link from the Streams Dashboard, all Stream Machine operations will be done by Streams itself according to your preferences.

Start Stream Machine

POST https://api.vagon.io/app-stream-management/v2/streams/{stream_id}/start-machine

Starts a Stream Machine under the given Streams

Path Parameters

Headers

Request Body

{
  "id": "94683",
  "type": "machine",
  "attributes": {
    "start_at": "2024-03-27T10:52:13.858Z",
    "end_at": null,
    "status": "pending",
    "friendly_status": "turning_on",
    "connection_status": "waiting",
    "region": "dublin",
    "uid": "11a17688-221c-4707-94dd-a2af9116d7d0",
    "cost": "0.0",
    "duration": 0,
    "application_name": "Test Application",
    "application_id": 1143,
    "stream_id": 1381,
    "stream_name": "Stream #1381",
    "machine_type": "Starter",
    "public_ip_address": null
  },
  "client_code": 200,
  "timestamp": "2024-03-27T10:52:15Z"
}

This endpoint can only be used with Cost Optimized Streams. For Availability Optimized or Balanced Streams, the system will automatically handle the capacity management.

Capacity Management configuration can be updated via Streams Dashboard.

If you try to start a Stream Machine for Availability Optimized or Balanced streams, you will get a 4610 error from the endpoint.

Assign Stream Machine

After running the Stream, Developer must assign the session to a User. As a response of this request, the system will automatically assign a Stream to the User, API will return a Session Link, and the client will be able to give access to the User by embedding Session Link to an iframe.

POST https://api.vagon.io/app-stream-management/v2/streams/{stream_id}/assign-machine

Assigns an available Streams Machine to your Visitor

Path Parameters

Headers

Request Body

{
  "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"
}

Stop Stream Machine

POST https://api.vagon.io/app-stream-management/v2/streams/stop-machine

Turns off a running Streams Machine

Headers

Request Body

{
  "client_code": 200,
  "timestamp": "2024-03-27T11:10:38Z"
}

Create User

Developer must create User(s) to give access to a Stream for each User. You can provide an email address to identify your Users, or you can send the request by leaving that parameter blank.

Sending an email is not a mandatory field, but it will help you to track User usage.

POST https://api.vagon.io/app-stream-management/v2/users

Creates Visitor information to monitor their Streams usages

Headers

Request Body

{
  "id": "7D4F4EA7F4",
  "type": "user",
  "attributes": {
    "email": "team@vagon.io"
  },
  "client_code": 200,
  "timestamp": "2024-03-27T11:18:26Z"
}

Remove User

DELETE https://api.vagon.io/app-stream-management/v2/users/{user_id}

Delete a previously created Visitor record

Path Parameters

Headers

{
  "client_code": 200,
  "timestamp": "2024-03-27T11:20:09Z"
}

Stream Machine Stats

GET https://api.vagon.io/app-stream-management/v2/machines

Retrieve all running and previously active Stream Machines with stats

Query Parameters

Headers

{
  "machines": [
    {
      "id": "94688",
      "type": "machine",
      "attributes": {
        "start_at": "2024-03-27T11:05:42.144Z",
        "end_at": "2024-03-27T11:10:29.548Z",
        "status": "stopped",
        "friendly_status": "off",
        "connection_status": "terminated",
        "region": "dublin",
        "uid": "bf96fb3b-edc3-43ce-8dc5-b8477fd52303",
        "cost": "0.13",
        "duration": 287,
        "application_name": "Test Application",
        "application_id": 1143,
        "stream_id": 1381,
        "stream_name": "Stream #1381",
        "machine_type": "Pro - G2",
        "public_ip_address": null
      }
    }
  ],
  "count": 6,
  "page": 1,
  "client_code": 200,
  "timestamp": "2024-03-27T11:21:44Z"
}

Single Stream Machine Stats

GET https://api.vagon.io/app-stream-management/v2/machines/{machine_uid}

Retrieve a specific Stream Machines with stats.

Headers

{
  "id": "94688",
  "type": "machine",
  "attributes": {
    "start_at": "2024-03-27T11:05:42.144Z",
    "end_at": "2024-03-27T11:10:29.548Z",
    "status": "stopped",
    "friendly_status": "off",
    "connection_status": "terminated",
    "region": "dublin",
    "uid": "bf96fb3b-edc3-43ce-8dc5-b8477fd52303",
    "cost": "0.13",
    "duration": 287,
    "application_name": "Test Application",
    "application_id": 1143,
    "stream_id": 1381,
    "stream_name": "Stream #1381",
    "machine_type": "Pro - G2",
    "public_ip_address": null
  },
  "client_code": 200,
  "timestamp": "2024-03-27T11:21:44Z"
}

Visitor Session Stats

GET https://api.vagon.io/app-stream-management/v2/sessions

Retrieve all Visitor Sessions with additional stats

Query Parameters

Headers

{
  "sessions": [
    {
      "id": "9150",
      "type": "vendor_customer_session",
      "attributes": {
        "start_at": "2024-03-11T08:03:47.735Z",
        "end_at": "2024-03-11T08:07:17.645Z",
        "region": "dublin",
        "ping": 98,
        "audio_state": "muted",
        "audio_input": {
          "kind": "audioinput",
          "label": "",
          "groupId": "",
          "deviceId": "default"
        },
        "audio_output": {
          "kind": "audiooutput",
          "label": "",
          "groupId": "",
          "deviceId": "default"
        },
        "duration": 4,
        "readable_duration": "4 minutes",
        "city": null,
        "country": null,
        "os": null,
        "device_type": null,
        "customer": "CUS_9150",
        "application_name": "Test Application",
        "application_id": 1143,
        "stream_id": 1369,
        "stream_name": "Stream #1369",
        "machine_type": "Pro - G2"
      }
    }
  ],
  "count": 23,
  "page": 1,
  "next_page": 2,
  "client_code": 200,
  "timestamp": "2024-03-27T11:25:44Z"
}

Configure Application Settings

PUT https://api.vagon.io/app-stream-management/v2/applications/{application_id}

Configure existing application settings.

Path Parameters

Headers

Request Body

{
  "id": "1143",
  "type": "application",
  "attributes": {
    "id": 1143,
    "name": "Test Application",
    "status": "active",
    "banner_url": null,
    "logo_url": null,
    "friendly_status": "live",
    "os": "windows",
    "active_executable": {
      "id": "1222",
      "type": "executable",
      "attributes": {
        "executable_name": "Application",
        "launch_arguments": null,
        "restart_arguments": null,
        "file": "Application.zip",
        "version": 1,
        "active": true,
        "created_at": "2024-03-07T14:40:26.896Z",
        "images": []
      }
    },
    "performance": "Pro - G2",
    "enterprise": null,
    "pro": null
  },
  "client_code": 200,
  "timestamp": "2024-03-27T11:35:18Z"
}

Configure Stream Settings

PUT https://api.vagon.io/app-stream-management/v2/streams/{stream_id}

Configure existing Stream settings.

Path Parameters

Headers

Request Body

{
  "id": "1364",
  "type": "stream",
  "attributes": {
    "id": 1364,
    "status": "active",
    "uid": "57f01de3-910a-aa25-2055-cf4a6aef093c",
    "resolution": "res_1080p",
    "collect_info": false,
    "dark_mode": null,
    "password_protection": false,
    "sound": "user_can_activate",
    "microphone": "off",
    "launch_arguments": null,
    "dock_position": "bottom",
    "keyboard_layout": null,
    "user_session_data": false,
    "boost_enabled": false,
    "pixel_streaming_enabled": false,
    "port_access_enabled": false,
    "maximum_session_duration": "off",
    "idle_duration": "off",
    "auto_turn_off_duration": "5_min",
    "application": {
      "id": "1151",
      "type": "application",
      "attributes": {
        "id": 1151,
        "name": "Test Application",
        "status": "active",
        "banner_url": null,
        "logo_url": null,
        "friendly_status": "live",
        "os": "windows",
        "active_executable": {
          "id": "1230",
          "type": "executable",
          "attributes": {
            "executable_name": "Application",
            "launch_arguments": null,
            "restart_arguments": null,
            "file": "Application.zip",
            "version": 1,
            "active": true,
            "created_at": "2024-03-08T11:56:45.103Z",
            "images": []
          }
        },
        "performance": "Starter",
        "enterprise": null,
        "pro": null
      }
    },
    "in_active_time_range": true
  },
  "client_code": 200,
  "timestamp": "2024-03-27T09:24:35Z"
}

Stream Configurations

GET https://api.vagon.io/app-stream-management/v2/streams/{{stream_uid}}

Retrieve most recent Stream configurations.

Path Parameters

Headers

{
  "id": "1384",
  "type": "stream",
  "attributes": {
    "id": 1384,
    "status": "active",
    "uid": "75313492-95a9-4acd-82d1-f20a154d8d3c",
    "resolution": "res_1080p",
    "collect_info": false,
    "dark_mode": null,
    "password_protection": false,
    "sound": "user_can_activate",
    "microphone": "user_can_activate",
    "launch_arguments": null,
    "dock_position": "bottom",
    "keyboard_layout": null,
    "user_session_data": false,
    "boost_enabled": false,
    "pixel_streaming_enabled": false,
    "port_access_enabled": false,
    "maximum_session_duration": "off",
    "idle_duration": "off",
    "auto_turn_off_duration": "5_min",
    "capacities": [
      {
        "id": "dublin",
        "type": "vendor_capacity",
        "attributes": {
          "region": "dublin",
          "machine_type_id": 11,
          "capacity_type": "on_demand",
          "reserve_capacity": 0,
          "total_capacity": 10,
          "used_capacity": 1,
          "assignable_machine_count": 0
        }
      }
    ],
    "texts": {
      "initializing_text": "Initializing Stream",
      "session_expired_text": "Session expired, you can reconnect again.",
      "invalid_email_text": "Visitor information is invalid, contact your system admin.",
      "invalid_password_text": "Stream password is incorrect.\nCheck the password or contact your system admin.",
      "not_active_text": "Stream is not active at the moment.\nContact your system admin to check availability.",
      "reconnect_text": "Connection expired, you can reconnect again.",
      "queue_text": "Waiting in queue",
      "installing_application_text": "Installing Application",
      "connecting_text": "Connecting...",
      "idle_text": "Connection expired due to inactivity. \nYou can reconnect again."
    },
    "application": {
      "id": "1144",
      "type": "application",
      "attributes": {
        "id": 1144,
        "name": "Test Application",
        "status": "active",
        "banner_url": null,
        "logo_url": null,
        "friendly_status": "live",
        "os": "windows",
        "active_executable": {
          "id": "1223",
          "type": "executable",
          "attributes": {
            "executable_name": "Application",
            "launch_arguments": null,
            "restart_arguments": null,
            "file": "Application.zip",
            "version": 1,
            "active": true,
            "created_at": "2024-03-07T14:41:13.719Z",
            "images": []
          }
        },
        "performance": "Starter",
        "enterprise": null,
        "pro": null
      }
    },
    "in_active_time_range": true
  },
  "client_code": 200,
  "timestamp": "2024-03-27T13:24:19Z"
}

Create Stream

POST https://api.vagon.io/app-stream-management/v2/streams

Creates Stream with provided configurations.

Headers

Request Body

{
  "id": "1385",
  "type": "stream",
  "attributes": {
    "id": 1385,
    "status": "active",
    "uid": "4c3771e7-a875-40aa-b5ea-bbb2a429a34e",
    "resolution": "res_1080p",
    "collect_info": false,
    "dark_mode": null,
    "password_protection": false,
    "sound": "user_can_activate",
    "microphone": "user_can_activate",
    "launch_arguments": null,
    "dock_position": "bottom",
    "keyboard_layout": null,
    "user_session_data": false,
    "boost_enabled": false,
    "pixel_streaming_enabled": false,
    "port_access_enabled": false,
    "maximum_session_duration": "off",
    "idle_duration": "off",
    "auto_turn_off_duration": "5_min",
    "capacities": [
      {
        "id": "dublin",
        "type": "vendor_capacity",
        "attributes": {
          "region": "dublin",
          "machine_type_id": 11,
          "capacity_type": "on_demand",
          "reserve_capacity": 0,
          "total_capacity": 5,
          "used_capacity": 0,
          "assignable_machine_count": 0
        }
      }
    ],
    "texts": {
      "initializing_text": "Initializing Stream",
      "session_expired_text": "Session expired, you can reconnect again.",
      "invalid_email_text": "Visitor information is invalid, contact your system admin.",
      "invalid_password_text": "Stream password is incorrect.\nCheck the password or contact your system admin.",
      "not_active_text": "Stream is not active at the moment.\nContact your system admin to check availability.",
      "reconnect_text": "Connection expired, you can reconnect again.",
      "queue_text": "Waiting in queue",
      "installing_application_text": "Installing Application",
      "connecting_text": "Connecting...",
      "idle_text": "Connection expired due to inactivity. \nYou can reconnect again."
    },
    "application": {
      "id": "1144",
      "type": "application",
      "attributes": {
        "id": 1144,
        "name": "Test Application",
        "status": "active",
        "banner_url": null,
        "logo_url": null,
        "friendly_status": "live",
        "os": "windows",
        "active_executable": {
          "id": "1223",
          "type": "executable",
          "attributes": {
            "executable_name": "Application",
            "launch_arguments": null,
            "restart_arguments": null,
            "file": "Application.zip",
            "version": 1,
            "active": true,
            "created_at": "2024-03-07T14:41:13.719Z",
            "images": []
          }
        },
        "performance": "Starter",
        "enterprise": null,
        "pro": null
      }
    },
    "in_active_time_range": true
  },
  "client_code": 200,
  "timestamp": "2024-03-27T13:27:54Z"
}

Delete Stream

Delete Stream

DELETE https://api.vagon.io/app-stream-management/v2/streams/{stream_id}

Delete a previously created Stream

Path Parameters

Headers

{
  "client_code": 200,
  "timestamp": "2024-03-27T11:20:09Z"
}

Activate Stream

PUT https://api.vagon.io/app-stream-management/v2/streams/{stream_id}/activate

Activate / run an existing Stream to make it available.

Path Parameters

Headers

{
  "id": "1384",
  "type": "stream",
  "attributes": {
    "id": 1384,
    "status": "active",
    "uid": "75313492-95a9-4acd-82d1-f20a154d8d3c",
    "resolution": "res_1080p",
    "collect_info": false,
    "dark_mode": null,
    "password_protection": false,
    "sound": "user_can_activate",
    "microphone": "user_can_activate",
    "launch_arguments": null,
    "dock_position": "bottom",
    "keyboard_layout": null,
    "user_session_data": false,
    "boost_enabled": false,
    "pixel_streaming_enabled": false,
    "port_access_enabled": false,
    "maximum_session_duration": "off",
    "idle_duration": "off",
    "auto_turn_off_duration": "5_min",
    "capacities": [
      {
        "id": "dublin",
        "type": "vendor_capacity",
        "attributes": {
          "region": "dublin",
          "machine_type_id": 11,
          "capacity_type": "on_demand",
          "reserve_capacity": 0,
          "total_capacity": 10,
          "used_capacity": 1,
          "assignable_machine_count": 0
        }
      }
    ],
    "texts": {
      "initializing_text": "Initializing Stream",
      "session_expired_text": "Session expired, you can reconnect again.",
      "invalid_email_text": "Visitor information is invalid, contact your system admin.",
      "invalid_password_text": "Stream password is incorrect.\nCheck the password or contact your system admin.",
      "not_active_text": "Stream is not active at the moment.\nContact your system admin to check availability.",
      "reconnect_text": "Connection expired, you can reconnect again.",
      "queue_text": "Waiting in queue",
      "installing_application_text": "Installing Application",
      "connecting_text": "Connecting...",
      "idle_text": "Connection expired due to inactivity. \nYou can reconnect again."
    },
    "application": {
      "id": "1144",
      "type": "application",
      "attributes": {
        "id": 1144,
        "name": "Test Application",
        "status": "active",
        "banner_url": null,
        "logo_url": null,
        "friendly_status": "live",
        "os": "windows",
        "active_executable": {
          "id": "1223",
          "type": "executable",
          "attributes": {
            "executable_name": "Application",
            "launch_arguments": null,
            "restart_arguments"