Simple RTMP Restreamer exposes a REST API on port 6070 that lets you manage streams and push targets programmatically. All request and response bodies use JSON. You can use any HTTP client — curl, a language SDK, or a custom integration — to interact with the API.
Base URL
All endpoints are relative to your server’s address on port 6070:
Content type
Set the Content-Type header to application/json on all requests that include a body.
Authentication
Authentication is optional. If you start the server with the BASIC_AUTH_USER and BASIC_AUTH_PASS environment variables set, every API request must include an Authorization header using HTTP Basic Auth.
Pass credentials using the Authorization header directly:
Authorization: Basic <base64(user:pass)>
Or use curl’s -u flag, which handles encoding automatically:
curl -u user:pass http://your-server:6070/api/streams/-/status
If BASIC_AUTH_USER and BASIC_AUTH_PASS are not configured, the API accepts requests without authentication.
Endpoints
| Method | Path | Description |
|---|
GET | /api/streams | List all streams |
POST | /api/streams | Create a stream |
GET | /api/streams/{id} | Get a stream by name |
DELETE | /api/streams/{id} | Delete a stream |
GET | /api/streams/{id}/status | Get live status for a stream |
GET | /api/streams/-/status | Get all streams with live status |
POST | /api/streams/{id}/targets | Add a push target to a stream |
DELETE | /api/streams/{id}/targets | Remove a push target from a stream |
Error responses
When a request fails, the API returns a JSON object with a single error field describing the problem:
{"error": "stream not found"}
Possible error values include "DB_CONNECTION_FAIL", standard HTTP status text, and "stream not found".
HTTP status codes
| Code | Meaning |
|---|
200 | OK — the request succeeded. |
400 | Bad Request — the request body was missing or malformed. |
401 | Unauthorized — credentials were missing or incorrect. |
404 | Not Found — the requested stream does not exist. |
500 | Internal Server Error — the server encountered an unexpected error. |