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
page*
1
per_page*
100
Headers
Authorization*
HMAC {key}:{signature}:{nonce}:{timestamp}
Content-Type
application/json
{
"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"
}{
"message": "Not Found",
"client_code": 404,
"timestamp": "2024-03-27T10:11:43Z"
}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
page
1
per_page
100
application_id*
String
Headers
Content-Type
application/json
Authorization
HMAC {key}:{signature}:{nonce}:{timestamp}
{
"streams": [
{
"id": "138681",
"type": "stream",
"attributes": {
"id": 138681,
"name": "Stream",
"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"
}{
"message": "Not Found",
"client_code": 404,
"timestamp": "2024-03-27T10:11:43Z"
}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
stream_id*
String
Query Parameters
page
1
per_page
10
Headers
Content-Type
application/json
Authorization*
HMAC {key}:{signature}:{nonce}:{timestamp}
{
"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"
}{
"message": "Not Found",
"client_code": 404,
"timestamp": "2024-03-27T10:40:45Z"
}Stream Machine Status Details
waiting
Stream is still booting up and preparing for connection.
available
Stream is ready for assigning and then connecting.
assigned
Stream is assigned to a User, but not connected yet.
connected
Stream is connected, and there is an active session.
terminated
Stream is turned off, and terminated.
proxy-in-migration
Stream is getting ready for the next visitor.
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
stream_id*
String
Headers
Content-Type*
application/json
Authorization*
HMAC {key}:{signature}:{nonce}:{timestamp}
Request Body
region*
String
Stream Machine Location
{
"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"
}{
"client_code": 404,
"message": "Not Found",
"timestamp": "2024-03-27T10:53:28Z"
}{
"client_code": 4601,
"message": "Insufficient Capacity",
"timestamp": "2024-03-27T10:54:53Z"
}{
"client_code": 4603,
"message": "Region must be activated",
"timestamp": "2024-03-27T10:56:06Z"
}{
"client_code": 4609,
"message": "Stream is not active",
"timestamp": "2024-03-27T10:59:53Z"
}{
"client_code": 4610,
"message": "Stream capacity management method must be Cost Optimized - on_demand",
"timestamp": "2024-03-27T10:57:19Z"
}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.
Dublin
dublin
North Virginia
north_virginia
Oregon
oregon
Ohio
ohio
Montreal
montreal
California
california
Sao Paolo
sao_paolo
Stockholm
stockholm
Frankfurt
frankfurt
Bahrain
bahrain
Mumbai
mumbai
Seoul
seoul
Tokyo
tokyo
Singapore
singapore
Sydney
sydney
Jakarta
jakarta
Dubai
uae
Cape Town
cape_town
Hong Kong
hong_kong
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
stream_id*
String
Headers
Content-Type*
application/json
Authorization
HMAC {key}:{signature}:{nonce}:{timestamp}
Request Body
region*
String
user_id
String
user_id can be generated via Create Visitor endpoint
{
"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"
}{
"client_code": 4603,
"message": "Region must be activated",
"timestamp": "2024-03-27T11:06:35Z"
}{
"client_code": 404,
"message": "Not Found",
"timestamp": "2024-03-27T11:08:03Z"
}Stop Stream Machine
POST https://api.vagon.io/app-stream-management/v2/streams/stop-machine
Turns off a running Streams Machine
Headers
Content-Type*
application/json
Authorization*
HMAC {key}:{signature}:{nonce}:{timestamp}
Request Body
machine_id*
String
{
"client_code": 200,
"timestamp": "2024-03-27T11:10:38Z"
}{
"client_code": 400,
"timestamp": "2024-03-27T11:10:44Z"
}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
Content-Type
application/json
Authorization
HMAC {key}:{signature}:{nonce}:{timestamp}
Request Body
{
"id": "7D4F4EA7F4",
"type": "user",
"attributes": {
"email": "[email protected]"
},
"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
user_id
String
Headers
Content-Type
application/json
Authorization
HMAC {key}:{signature}:{nonce}:{timestamp}
{
"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
start_at
yyyy-MM-dd'T'HH:mm:ssZ
Sample: 2023-09-15T06:42:36.564Z
end_at
yyyy-MM-dd'T'HH:mm:ssZ
Sample: 2023-09-15T06:42:36.564Z
page
Integer
Default: 1
per_page
Integer
Default: 20
application_id
Integer
stream_id
Integer
Headers
Content-Type*
application/json
Authorization*
HMAC {key}:{signature}:{nonce}:{timestamp}
{
"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"
}// Returns when application_id and stream_id are requested at the same timeSingle Stream Machine Stats
GET https://api.vagon.io/app-stream-management/v2/machines/{machine_uid}
Retrieve a specific Stream Machines with stats.
Headers
Content-Type*
application/json
Authorization*
HMAC {key}:{signature}:{nonce}:{timestamp}
{
"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
start_at
yyyy-MM-dd'T'HH:mm:ssZ
Sample: 2023-09-15T06:42:36.564Z
end_at
yyyy-MM-dd'T'HH:mm:ssZ
Sample: 2023-09-15T06:42:36.564Z
page
Integer
Default: 1
per_page
Integer
Default: 20
application_id
Integer
stream_id
Integer
Headers
Content-Type*
application/json
Authorization*
HMAC {key}:{signature}:{nonce}:{timestamp}
{
"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"
}// Returns when application_id and stream_id are requested at the same timestart_at
2023-09-14T14:00:39.834Z
end_at
2023-09-14T14:03:09.894Z
region
dublin
ping
78.625
audio_state
muted
playing
not_collected
audio_input
{
"kind": "audioinput",
"label": "",
"groupId": "",
"deviceId": ""
}audio_output
{
"kind": "audioinput",
"label": "",
"groupId": "",
"deviceId": ""
}duration
3
minutes
readable_duration
3 minutes
city
San Francisco
⚠️ Data Collection must be enabled
country
US
⚠️ Data Collection must be enabled
os
Windows 11
⚠️ Data Collection must be enabled
device_type
desktop
⚠️ Data Collection must be enabled
customer
CUS_625289
⚠️ Email Collection must be enabled for Visitor Email address
application_name
AwesomeApp
application_id
870
stream_id
587
stream_name
Stream #587
machine_type
Pro - G2
Configure Application Settings
PUT https://api.vagon.io/app-stream-management/v2/applications/{application_id}
Configure existing application settings.
Path Parameters
application_id
String
Headers
Content-Type
application/json
Authorization
HMAC {key}:{signature}:{nonce}:{timestamp}
Request Body
application_name
String
key_mapping_selection
String
click game_mode
changeable_key_mapping
Boolean
machine_type_id
Integer
Starter - 9
Pro - 17
Starter G2 - 12
Pro G2 - 13
{
"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"
}{
"message": "Not Found",
"client_code": 404,
"timestamp": "2024-03-27T11:37:44Z"
}Configure Stream Settings
PUT https://api.vagon.io/app-stream-management/v2/streams/{stream_id}
Configure existing Stream settings.
Path Parameters
stream_id
String
Headers
Content-Type
application/json
Authorization
HMAC {key}:{signature}:{nonce}:{timestamp}
Request Body
resolution
String
res_scale res_720p res_1080p res_2160p
name
String
sound
String
off activate_on_start user_can_activate
microphone
String
off activate_on_start user_can_activate
auto_turn_off_duration
String
off immediately 2_min 5_min 30_min 1_hour 3_hour 6_hour
maximum_session_duration
String
off 5_min 10_min 15_min 30_min 1_hour
idle_duration
String
off 1_min 5_min 10_min
launch_arguments
String
dark_mode
Boolean
collect_info
Boolean
password
String
password_protection
String
dock_position
String
hide bottom top left
keyboard_layout
String
user_session_data
Boolean
boost_enabled
Boolean
pixel_streaming_enabled
Boolean
port_access_enabled
Boolean
capacity_type
String
on_demand balanced always_on
capacities
Array of Objects
[
{
"region": "dublin",
"total_capacity": "5"
}
]restart_application
Boolean
auto_start_application
Boolean
collect_application_logs
Boolean
game_engine
String
unreal unity
project_name
String
Required for Unreal Engine Apps
company_name
String
Required for Unity Apps
product_name
String
Required for Unity Apps
region_optimization
Boolean
show_play_page
Boolean
{
"id": "1364",
"type": "stream",
"attributes": {
"id": 1364,
"name": "Stream Name",
"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",
"restart_application": false,
"auto_start_application": true,
"collect_application_logs": true,
"game_engine": "unity",
"project_name": "project_name",
"company_name": "company_name",
"product_name": "product_name",
"region_optimization": true,
"show_play_page": false
"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"
}{
"message": "Not Found",
"client_code": 404,
"timestamp": "2024-03-27T11:37:44Z"
}Stream Configurations
GET https://api.vagon.io/app-stream-management/v2/streams/{{stream_uid}}
Retrieve most recent Stream configurations.
Path Parameters
stream_uid
String
Headers
Content-Type*
application/json
Authorization*
HMAC {key}:{signature}:{nonce}:{timestamp}
{
"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"
}{
"message": "Not Found",
"client_code": 404,
"timestamp": "2024-03-27T11:37:44Z"
}Create Stream
POST https://api.vagon.io/app-stream-management/v2/streams
Creates Stream with provided configurations.
Headers
Content-Type
application/json
Authorization
HMAC {key}:{signature}:{nonce}:{timestamp}
Request Body
application_id
String
capacities
Array of Objects
[
{
"region": "dublin",
"total_capacity": "5"
}
]capacity_type
String
on_demand balanced always_on
{
"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"
}{
"message": "Not Found",
"client_code": 404,
"timestamp": "2024-03-27T11:37:44Z"
}Delete Stream
Delete Stream
DELETE https://api.vagon.io/app-stream-management/v2/streams/{stream_id}
Delete a previously created Stream
Path Parameters
stream_id
String
Headers
Content-Type
application/json
Authorization
HMAC {key}:{signature}:{nonce}:{timestamp}
{
"client_code": 200,
"timestamp": "2024-03-27T11:20:09Z"
}{
"message": "Not Found",
"client_code": 404,
"timestamp": "2024-03-27T11:37:44Z"
}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
stream_id
String
Headers
Content-Type
application/json
Authorization
HMAC {key}:{signature}:{nonce}:{timestamp}
{
"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:29:21Z"
}Pause Stream
PUT https://api.vagon.io/app-stream-management/v2/streams/{stream_id}/pause
Pause / stop an existing Stream to make it unavailable.
Path Parameters
stream_id
String
Headers
Content-Type
application/json
Authorization
HMAC {key}:{signature}:{nonce}:{timestamp}
{
"id": "1384",
"type": "stream",
"attributes": {
"id": 1384,
"status": "paused",
"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:29:21Z"
}Vagon Pinger.js
Vagon Pinger allows you to find the best region to find the lowest latency location for a better experience for your Visitors.
Import VagonPinger to your project by adding the following code piece to your code. Then, use the bestRegion parameter value for Start Streams and/or Assign Streams endpoints.
// Import the VagonPinger class
import VagonPinger from "https://app.vagon.io/helpers/VagonPinger.js";
// Ping all regions and log the results
VagonPinger.getRegionPings()
.then(({ regionPings, bestRegion }) => {
console.log("Region pings:", regionPings);
console.log("Best region:", bestRegion);
})
// Ping specific regions and log the results
VagonPinger.getRegionPings(["dublin", "frankfurt", "north_virginia"])
.then(({ regionPings, bestRegion }) => {
console.log("Region pings:", regionPings);
console.log("Best region:", bestRegion);
})Last updated