Windows
Get All Instances
Windows
Interact
Windows
Get All Instances
Requires API key authentication.
GET
/
windows
/
instances
import { Skylight } from "skylight-sdk";
const skylight = new Skylight({
apikey: process.env["SKYLIGHT_APIKEY"] ?? "",
});
async function run() {
const result = await skylight.windows.instances();
// Handle the result
console.log(result);
}
run();
{
"instances": [
{
"assigned_at": "2023-01-01T12:00:00Z",
"instance_id": "i-123456",
"knowledge": "unknown",
"livestream_url": "launchskylight.com/embed/i-123456",
"state": "running"
},
{
"assigned_at": "2023-01-02T12:00:00Z",
"instance_id": "i-789012",
"knowledge": "unknown",
"livestream_url": "launchskylight.com/embed/i-789012",
"state": "stopped"
}
]
}
Authorizations
API key authentication
Response
200
application/json
List of instances retrieved successfully
List of instances associated with the API key
Current state of the instance
Example:
"running"
Current knowledge of the instance
Example:
"unknown"
URL to livestream the instance
Example:
"launchskylight.com/embed/i-123456"
When the instance was assigned
Example:
"2023-01-01T12:00:00Z"
import { Skylight } from "skylight-sdk";
const skylight = new Skylight({
apikey: process.env["SKYLIGHT_APIKEY"] ?? "",
});
async function run() {
const result = await skylight.windows.instances();
// Handle the result
console.log(result);
}
run();
{
"instances": [
{
"assigned_at": "2023-01-01T12:00:00Z",
"instance_id": "i-123456",
"knowledge": "unknown",
"livestream_url": "launchskylight.com/embed/i-123456",
"state": "running"
},
{
"assigned_at": "2023-01-02T12:00:00Z",
"instance_id": "i-789012",
"knowledge": "unknown",
"livestream_url": "launchskylight.com/embed/i-789012",
"state": "stopped"
}
]
}