Skip to content

All documentation

API

Read and manage projects, play URLs, sessions and analytics over HTTPS with your account API key

Authentication

Base URL and your API key

Base URL

https://simplystream.com/api/v1

The full OpenAPI description is at https://simplystream.com/api/v1/openapi.json, and the interactive API docs let you try each call from the browser.

Your API key

Every account has one API key. It is shown as API Key on your Profile page. The key belongs to your account, so it can reach every project you can.

Send it as a bearer token on every request:

curl https://simplystream.com/api/v1/projects \
  -H "Authorization: Bearer $SIMPLYSTREAM_API_KEY"

A missing or wrong key gets 401 and this body:

{ "success": false, "error": "Unauthorized - missing or invalid Authorization header" }

Keeping the key safe

The key gives full access to your account through the API. Keep it out of source control and out of anything that runs in a player's browser. Call the API from your own server or tools, and read the key from an environment variable as the examples here do.

Quick start

Common calls with curl, JavaScript and Python

The examples assume your key is in SIMPLYSTREAM_API_KEY. Responses are JSON with a success field; the data sits in result or results, depending on the endpoint.

List your projects

curl https://simplystream.com/api/v1/projects \
  -H "Authorization: Bearer $SIMPLYSTREAM_API_KEY"
const res = await fetch('https://simplystream.com/api/v1/projects', {
	headers: { Authorization: `Bearer ${process.env.SIMPLYSTREAM_API_KEY}` },
});
const { result } = await res.json();
for (const project of result) console.log(project.id, project.name);
import os, requests

res = requests.get(
    'https://simplystream.com/api/v1/projects',
    headers={'Authorization': f'Bearer {os.environ["SIMPLYSTREAM_API_KEY"]}'},
)
for project in res.json()['result']:
    print(project['id'], project['name'])

List a project's revisions

Each build of a project is a numbered revision.

curl https://simplystream.com/api/v1/projects/PROJECT_ID/revisions \
  -H "Authorization: Bearer $SIMPLYSTREAM_API_KEY"

The response is { "success": true, "result": [ ... ] }, one entry per revision with its rev number.

Recent sessions

curl "https://simplystream.com/api/v1/sessions?project_id=PROJECT_ID" \
  -H "Authorization: Bearer $SIMPLYSTREAM_API_KEY"

The list is in results. Each session carries its revision, browser, device and status.

Concurrent users over time

curl "https://simplystream.com/api/v1/analytics/concurrent-users?project_id=PROJECT_ID&time_window_hours=24" \
  -H "Authorization: Bearer $SIMPLYSTREAM_API_KEY"

results is a list of { "timestamp": "...", "users": 3 } points. bucket_interval_hours sets the bucket size.

Session quality

curl "https://simplystream.com/api/v1/analytics/quality-stats?project_id=PROJECT_ID" \
  -H "Authorization: Bearer $SIMPLYSTREAM_API_KEY"

stats holds total_sessions, avg_fps, avg_latency_ms, avg_packet_loss_percent and quality_score.

Set a streaming nameserver for a project

Create the nameserver, then point the project at it. See Connect a domain for what nameservers do.

curl -X POST https://simplystream.com/api/v1/nameservers \
  -H "Authorization: Bearer $SIMPLYSTREAM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"route": "stream.example.com", "name": "Production"}'

The response's result holds the new nameserver's id and the nsRecords to add at your DNS provider. Then:

curl -X PUT https://simplystream.com/api/v1/projects/PROJECT_ID/nameserver \
  -H "Authorization: Bearer $SIMPLYSTREAM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"nameserverId": "NAMESERVER_ID"}'

Send {"nameserverId": null} to go back to the default.

Endpoint reference

The endpoints most integrations use

Paths are relative to https://simplystream.com/api/v1. Every request needs Authorization: Bearer <your API key>. This page lists the endpoints most integrations use; the interactive API docs and https://simplystream.com/api/v1/openapi.json describe every endpoint with its full request and response schema, multiplayer included.

Response format

Responses are JSON. A successful call has "success": true and its data in result (one object, or a list on some endpoints) or results (a list). A failed call has "success": false and a message in error; a few session endpoints use msg instead.

Status Meaning
200 Done
201 Created
400 The request body or parameters are invalid
401 The API key is missing or wrong
403 The account is not allowed to do this
404 Not found, or not yours
409 Conflict, for example a project name already in use
429 Too many requests, or no capacity right now; retry later

Projects

Method Path Does
GET /projects List your projects
POST /projects Create a project. Body: { "name": "..." }. Returns result.project_id
GET /projects/{projectId} Get one project
PATCH /projects/{projectId} Change name, description or tags
DELETE /projects/{projectId} Delete a project and its revisions
GET /projects/{projectId}/members List members and invitees

Revisions

Method Path Does
GET /projects/{projectId}/revisions List the project's revisions
GET /projects/{projectId}/revisions/active Get the active revision
PUT /projects/{projectId}/revisions/active Set the active revision. Body: { "revision": 12 }
PATCH /projects/{projectId}/revisions/{rev} Change a revision's notes
DELETE /projects/{projectId}/revisions/{rev} Delete a revision

This API has no upload endpoint: new revisions come from Strata.

Play URLs

The API calls play URLs endpoints.

Method Path Does
GET /endpoints?project_id={projectId} List a project's play URLs
POST /endpoints Create or update a play URL. Needs endpoint (the hostname) and project_id; the hostname's domain must be verified. The response's dns says whether the hostname resolves yet
DELETE /endpoints/{endpointId} Delete a play URL
PUT /endpoints/{endpointId}/nameserver Set or clear the play URL's nameserver. Body: { "nameserverId": "..." } or null

Sessions

Method Path Does
GET /sessions List sessions. Filters: project_id, server_id, status, timeframe
GET /sessions/{sessionId} Get one session
GET /sessions/{sessionId}/log Get a session's log
GET /sessions/{sessionId}/metrics Get a session's performance metrics
DELETE /sessions/{sessionId} End a session

Analytics

Method Path Does
GET /analytics/concurrent-users Concurrent users over time. Query: project_id, time_window_hours, bucket_interval_hours
GET /analytics/quality-stats Session count, average FPS, latency, packet loss and a quality score
GET /analytics/problematic Sessions with quality problems
GET /analytics/performance-bottlenecks Bottlenecks found in session metrics
GET /analytics/cpu-distribution Sessions grouped by CPU score
GET /projects/{projectId}/analytics/quality-history A project's quality over time
GET /projects/{projectId}/analytics/quality-alerts A project's quality alerts

Nameservers

Method Path Does
GET /nameservers List your nameservers and how many projects and play URLs use each
POST /nameservers Create one. Body: { "route": "stream.example.com", "name": "..." }. Returns the nsRecords to add
PUT /nameservers/{nameserverId} Change a nameserver
DELETE /nameservers/{nameserverId} Delete a nameserver; refused while a project or play URL uses it
POST /nameservers/{nameserverId}/verify Check its DNS delegation
GET /projects/{projectId}/nameserver Get the project's nameserver
PUT /projects/{projectId}/nameserver Set or clear it. Body: { "nameserverId": "..." } or null

Server profiles

Server profiles apply to cloud streaming and hybrid sessions only.

Method Path Does
GET /server_profiles List server profiles, yours and the system ones
POST /server_profiles Create a profile
GET /server_profiles/{profileId} Get one profile
PUT /server_profiles/{profileId} Change a profile you own
DELETE /server_profiles/{profileId} Delete a profile you own
POST /server_profiles/{profileId}/clone Copy a profile so you can edit it
POST /server_profiles/estimate-cost Estimate what a set of machines would cost

Billing

Method Path Does
GET /billing/balance Your credit balance in USD
GET /billing/credits Each credit grant with its remaining value and expiry date
GET /billing/invoices Your invoices
Ask a question