From df13b941842b1f904e2e0426b07413e351f0daa3 Mon Sep 17 00:00:00 2001 From: Owncast Date: Wed, 21 Apr 2021 01:51:42 +0000 Subject: [PATCH] Commit updated API documentation --- doc/api/index.html | 66 +++++++++++++++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 21 deletions(-) diff --git a/doc/api/index.html b/doc/api/index.html index 3b73c7ce2..7cfa99e93 100644 --- a/doc/api/index.html +++ b/doc/api/index.html @@ -182,6 +182,12 @@ data-styled.g22[id="sc-fzoXzr"]{content:"Lihot,"}/*!sc*/ .jlDjZa .sc-fzpjYC,.jlDjZa .sc-fzpjYC .sc-fzpjYC .sc-fzpjYC,.jlDjZa .sc-fzpjYC .sc-fzpjYC .sc-fzpjYC .sc-fzpjYC .sc-fzpjYC{margin:1em;margin-right:0;background:#fafafa;}/*!sc*/ .jlDjZa .sc-fzpjYC .sc-fzpjYC,.jlDjZa .sc-fzpjYC .sc-fzpjYC .sc-fzpjYC .sc-fzpjYC,.jlDjZa .sc-fzpjYC .sc-fzpjYC .sc-fzpjYC .sc-fzpjYC .sc-fzpjYC .sc-fzpjYC{background:#ffffff;}/*!sc*/ data-styled.g24[id="sc-fznxsB"]{content:"jlDjZa,"}/*!sc*/ +.gqZkJU{font-size:0.9em;font-family:Courier,monospace;}/*!sc*/ +.gqZkJU::after{content:' [';}/*!sc*/ +data-styled.g28[id="sc-fzqARJ"]{content:"gqZkJU,"}/*!sc*/ +.kCRNAN{font-size:0.9em;font-family:Courier,monospace;}/*!sc*/ +.kCRNAN::after{content:']';}/*!sc*/ +data-styled.g29[id="sc-fzqNqU"]{content:"kCRNAN,"}/*!sc*/ .iuCQoO{background-color:#f5f5f5;border:2px solid #7C7C7C;border-radius:7;cursor:pointer;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;font-size:1em;position:relative;}/*!sc*/ .iuCQoO:hover{border:2px solid #6e6d6d;}/*!sc*/ .iuCQoO:disabled{background-color:#ededed;cursor:unset;}/*!sc*/ @@ -430,6 +436,8 @@ data-styled.g69[id="sc-fzqLLg"]{content:"jbhQmP,"}/*!sc*/ data-styled.g70[id="sc-fzoxnE"]{content:"dUEjwH,"}/*!sc*/ .chnCRo{vertical-align:middle;font-size:13px;line-height:20px;color:#d41f1c;font-size:0.9em;font-weight:normal;margin-left:20px;line-height:1;}/*!sc*/ data-styled.g73[id="sc-fzplgP"]{content:"chnCRo,"}/*!sc*/ +.jdKyQH{padding-left:10px;}/*!sc*/ +data-styled.g85[id="sc-fznNTe"]{content:"jdKyQH,"}/*!sc*/ .CvVzT{font-family:Montserrat,sans-serif;font-weight:400;font-size:1.85714em;line-height:1.6em;color:#32329f;margin-top:0;margin-bottom:0.5em;}/*!sc*/ data-styled.g87[id="sc-fzooss"]{content:"CvVzT,"}/*!sc*/ .hTmvgG{border:1px solid #32329f;color:#32329f;font-weight:normal;margin-left:0.5em;padding:4px 8px 4px;display:inline-block;-webkit-text-decoration:none;text-decoration:none;cursor:pointer;}/*!sc*/ @@ -585,7 +593,7 @@ data-styled.g143[id="sc-global-kJtbWf1"]{content:"sc-global-kJtbWf1,"}/*!sc*/ -

Owncast (0.0.7-dev)

Download OpenAPI specification:Download

Owncast is a self-hosted live video and web chat server for use with existing popular broadcasting software. The following APIs represent the state in the development branch.

+ " fill="currentColor">

Owncast (0.0.7)

Download OpenAPI specification:Download

Owncast is a self-hosted live video and web chat server for use with existing popular broadcasting software. The following APIs represent the state in the development branch.

Authentication

AdminBasicAuth

The username for admin basic auth is admin and the password is the stream key.

Security Scheme Type HTTP
HTTP Authorization Scheme basic

AccessToken

3rd party integration auth where a service user must provide an access token.

Security Scheme Type HTTP
HTTP Authorization Scheme bearer

Admin

Admin operations requiring authentication.

@@ -667,50 +675,66 @@ data-styled.g143[id="sc-global-kJtbWf1"]{content:"sc-global-kJtbWf1,"}/*!sc*/
Authorizations:

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Hardware Stats

Get the CPU, Memory and Disk utilization levels over the collected period.

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "cpu": [
    ],
  • "memory": [
    ],
  • "disk": [
    ]
}

Return all webhooks.

Return all of the configured webhooks for external events.

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "url": "string",
  • "events": [
    ],
  • "timestamp": "2019-08-24T14:15:22Z",
  • "lastUsed": "2019-08-24T14:15:22Z"
}

Delete a single webhook.

Delete a single webhook by its ID.

+

Response samples

Content type
application/json
{
  • "id": "string",
  • "url": "string",
  • "events": [
    ],
  • "timestamp": "2019-08-24T14:15:22Z",
  • "lastUsed": "2019-08-24T14:15:22Z"
}

Set external action URLs.

Set a collection of external action URLs that are displayed in the UI.

+
Authorizations:
Request Body schema: application/json
Array ()
url
string

URL of the external action content.

+
title
string

The title to put on the external action button.

+
description
string

Optional additional description to display in the UI.

+
icon
string

The URL to an image to place on the external action button.

+
color
string

Optional color to use for drawing the action button.

+
openExternally
boolean

If set this action will open in a new browser tab instead of an internal modal.

+

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Delete a single webhook.

Delete a single webhook by its ID.

Authorizations:
Request Body schema: application/json
id
string

The webhook id to delete

Responses

Request samples

Content type
application/json
{
  • "id": "string"
}

Create a webhook.

Create a single webhook that acts on the requested events.

+

Request samples

Content type
application/json
{
  • "id": "string"
}

Create a webhook.

Create a single webhook that acts on the requested events.

Authorizations:
Request Body schema: application/json
url
string

The url to post the events to.

events
Array of strings

The events to be notified about.

Responses

Request samples

Content type
application/json
{
  • "url": "string",
  • "events": [
    ]
}

Response samples

Content type
application/json
{
  • "name": "your new token",
  • "token": "zG2xO-mHTFnelCp5xaIkYEFWcPhoOswOSRmFC1BkI="
}

Chat

Endpoints related to the chat interface.

+

Request samples

Content type
application/json
{
  • "url": "string",
  • "events": [
    ]
}

Response samples

Content type
application/json
{
  • "name": "your new token",
  • "token": "zG2xO-mHTFnelCp5xaIkYEFWcPhoOswOSRmFC1BkI="
}

Chat

Endpoints related to the chat interface.

Historical Chat Messages

Used to get all chat messages prior to connecting to the websocket.

-

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Custom Emoji

Get a list of custom emoji that are supported in chat.

-

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Integrations

APIs built to allow 3rd parties to interact with an Owncast server.

+

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Custom Emoji

Get a list of custom emoji that are supported in chat.

+

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Integrations

APIs built to allow 3rd parties to interact with an Owncast server.

Set the stream title.

Set the title of the currently streaming content.

Authorizations:
Request Body schema: application/json
string or integer or object or boolean

Responses

Request samples

Content type
application/json
{
  • "value": "Streaming my favorite game, Desert Bus."
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "message": "context specific success message"
}

Send a user chat message.

Send a chat message on behalf of a user. Could be a bot name or a real user.

+

Request samples

Content type
application/json
{
  • "value": "Streaming my favorite game, Desert Bus."
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "message": "context specific success message"
}

Send a user chat message.

Send a chat message on behalf of a user. Could be a bot name or a real user.

Authorizations:
Request Body schema: application/json
user
string

The user you want to send this message as.

body
string

The message text that will be sent as the user.

Responses

Request samples

Content type
application/json
{
  • "user": "string",
  • "body": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "sent"
}

Send a system chat message.

Send a chat message on behalf of the system/server.

+

Request samples

Content type
application/json
{
  • "user": "string",
  • "body": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "sent"
}

Send a system chat message.

Send a chat message on behalf of the system/server.

Authorizations:
Request Body schema: application/json
body
string

The message text that will be sent as the system user.

Responses

Request samples

Content type
application/json
{
  • "body": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "sent"
}

Send a chat action.

Send an action that took place to the chat.

+

Request samples

Content type
application/json
{
  • "body": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "sent"
}

Send a chat action.

Send an action that took place to the chat.

Authorizations:
Request Body schema: application/json
body
required
string

The message text that will be sent as the system user.

author
string

An optional user name that performed the action.

Responses

Request samples

Content type
application/json
{
  • "body": "rolled a 15 on the dice",
  • "author": "JohnSmith"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "sent"
}

Create an access token.

Create a single access token that has access to the access scopes provided.

+

Request samples

Content type
application/json
{
  • "body": "rolled a 15 on the dice",
  • "author": "JohnSmith"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "sent"
}

Create an access token.

Create a single access token that has access to the access scopes provided.

Authorizations:
Request Body schema: application/json
name
string

The human-readable name to give this access token.

scopes
Array of strings

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "scopes": [
    ]
}

Response samples

Content type
application/json
{
  • "name": "your new token",
  • "token": "zG2xO-mHTFnelCp5xaIkYEFWcPhoOswOSRmFC1BkI="
}

Delete an access token.

Delete a single access token.

+

Request samples

Content type
application/json
{
  • "name": "string",
  • "scopes": [
    ]
}

Response samples

Content type
application/json
{
  • "name": "your new token",
  • "token": "zG2xO-mHTFnelCp5xaIkYEFWcPhoOswOSRmFC1BkI="
}

Delete an access token.

Delete a single access token.

Authorizations:
Request Body schema: application/json
token
string

The token to delete

Responses

Request samples

Content type
application/json
{
  • "token": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "deleted token"
}

Return all access tokens.

Return all of the available access tokens.

+

Request samples

Content type
application/json
{
  • "token": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "deleted token"
}

Return all access tokens.

Return all of the available access tokens.

Authorizations:

Responses

Response samples

Content type
application/json
[
  • "string"
]

Return a list of currently connected clients

Return a list of currently connected clients with optional geo details.

+

Response samples

Content type
application/json
[
  • "string"
]

Set external action URLs.

Set a collection of external action URLs that are displayed in the UI.

+
Authorizations:
Request Body schema: application/json
Array ()
url
string

URL of the external action content.

+
title
string

The title to put on the external action button.

+
description
string

Optional additional description to display in the UI.

+
icon
string

The URL to an image to place on the external action button.

+
color
string

Optional color to use for drawing the action button.

+
openExternally
boolean

If set this action will open in a new browser tab instead of an internal modal.

+

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Return a list of currently connected clients

Return a list of currently connected clients with optional geo details.

Authorizations:

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Historical Chat Messages

Used to get the backlog of chat messages.

-
Authorizations:

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update the visibility of chat messages.

Pass an array of IDs you want to change the chat visibility of.

+

Response samples

Content type
application/json
[
  • {
    }
]

Historical Chat Messages

Used to get the backlog of chat messages.

+
Authorizations:

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update the visibility of chat messages.

Pass an array of IDs you want to change the chat visibility of.

Authorizations:
Request Body schema: application/json
visible
boolean

Are these messages visible.

idArray
Array of strings

Responses

Request samples

Content type
application/json
{
  • "visible": true,
  • "idArray": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "message": "context specific success message"
}

Server

Information

The client configuration. Information useful for the user interface.

-

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "summary": "string",
  • "logo": "string",
  • "tags": [
    ],
  • "socialHandles": [],
  • "extraPageContent": "<p>This page is <strong>super</strong> cool!",
  • "version": "Owncast v0.0.3-macOS (ef3796a033b32a312ebf5b334851cbf9959e7ecb)"
}

Current Status

This endpoint is used to discover when a server is broadcasting, the number of active viewers as well as other useful information for updating the user interface.

-

Responses

Response samples

Content type
application/json
{
  • "lastConnectTime": "2020-10-03T21:36:22-05:00",
  • "lastDisconnectTime": null,
  • "online": true,
  • "overallMaxViewerCount": 420,
  • "sessionMaxViewerCount": 12,
  • "viewerCount": 7
}

Yellow Pages Information

Information to be used in the Yellow Pages service, a global directory of Owncast servers.

-

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "logo": "string",
  • "nsfw": true,
  • "tags": [
    ],
  • "online": true,
  • "viewerCount": 0,
  • "overallMaxViewerCount": 0,
  • "sessionMaxViewerCount": 0,
  • "lastConnectTime": "2019-08-24T14:15:22Z"
}
+

Request samples

Content type
application/json
{
  • "visible": true,
  • "idArray": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "message": "context specific success message"
}

Server

Information

The client configuration. Information useful for the user interface.

+

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "summary": "string",
  • "logo": "string",
  • "tags": [
    ],
  • "socialHandles": [],
  • "extraPageContent": "<p>This page is <strong>super</strong> cool!",
  • "version": "Owncast v0.0.3-macOS (ef3796a033b32a312ebf5b334851cbf9959e7ecb)"
}

Current Status

This endpoint is used to discover when a server is broadcasting, the number of active viewers as well as other useful information for updating the user interface.

+

Responses

Response samples

Content type
application/json
{
  • "lastConnectTime": "2020-10-03T21:36:22-05:00",
  • "lastDisconnectTime": null,
  • "online": true,
  • "overallMaxViewerCount": 420,
  • "sessionMaxViewerCount": 12,
  • "viewerCount": 7
}

Yellow Pages Information

Information to be used in the Yellow Pages service, a global directory of Owncast servers.

+

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "logo": "string",
  • "nsfw": true,
  • "tags": [
    ],
  • "online": true,
  • "viewerCount": 0,
  • "overallMaxViewerCount": 0,
  • "sessionMaxViewerCount": 0,
  • "lastConnectTime": "2019-08-24T14:15:22Z"
}