mirror of
https://github.com/owncast/owncast.git
synced 2024-12-18 07:12:33 +03:00
Update OpenApi spec to reflect v0.1.0. For #2431
This commit is contained in:
parent
063dbccebc
commit
7858ee3d44
1 changed files with 222 additions and 24 deletions
246
openapi.yaml
246
openapi.yaml
|
@ -1,8 +1,8 @@
|
||||||
openapi: 3.0.1
|
openapi: 3.0.1
|
||||||
info:
|
info:
|
||||||
title: Owncast
|
title: Owncast
|
||||||
description: Owncast is a self-hosted live video and web chat server for use with existing popular broadcasting software.
|
description: Owncast is a self-hosted live video and web chat server for use with existing popular broadcasting software. <br/><br/>Take note that only APIs listed specifically for external use, 3rd parties or for integration purposes are encouraged for external use. Internal APIs may change at any time and are used by the server and frontend itself.
|
||||||
version: '0.0.13'
|
version: '0.1.0'
|
||||||
contact:
|
contact:
|
||||||
name: Gabe Kangas
|
name: Gabe Kangas
|
||||||
email: gabek@real-ity.com
|
email: gabek@real-ity.com
|
||||||
|
@ -43,6 +43,16 @@ components:
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/Follower'
|
$ref: '#/components/schemas/Follower'
|
||||||
|
|
||||||
|
StreamKeyArray:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/StreamKey'
|
||||||
|
|
||||||
|
ChatMessageArray:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/ChatMessage'
|
||||||
|
|
||||||
Client:
|
Client:
|
||||||
type: object
|
type: object
|
||||||
description: A single representation of a client.
|
description: A single representation of a client.
|
||||||
|
@ -96,6 +106,7 @@ components:
|
||||||
type: boolean
|
type: boolean
|
||||||
message:
|
message:
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
InstanceDetails:
|
InstanceDetails:
|
||||||
type: object
|
type: object
|
||||||
description: User-facing details about this server.
|
description: User-facing details about this server.
|
||||||
|
@ -240,6 +251,7 @@ components:
|
||||||
message:
|
message:
|
||||||
type: string
|
type: string
|
||||||
description: 'The log entry contents'
|
description: 'The log entry contents'
|
||||||
|
|
||||||
Webhook:
|
Webhook:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -341,11 +353,43 @@ components:
|
||||||
FEDIVERSE_ENGAGEMENT_REPOST,
|
FEDIVERSE_ENGAGEMENT_REPOST,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
StreamKey:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
description: The key used for authing a stream.
|
||||||
|
example: yklw5Imng
|
||||||
|
comment:
|
||||||
|
type: string
|
||||||
|
description: The user-facing description or explanation of this single key
|
||||||
|
example: Used by Tim.
|
||||||
|
|
||||||
|
ChatMessage:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
user:
|
||||||
|
$ref: '#/components/schemas/User'
|
||||||
|
body:
|
||||||
|
type: string
|
||||||
|
description: Escaped HTML of the chat message content.
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
description: Unique ID of the chat message.
|
||||||
|
visible:
|
||||||
|
type: boolean
|
||||||
|
description: 'Should chat message be visibly rendered.'
|
||||||
|
timestamp:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
|
||||||
securitySchemes:
|
securitySchemes:
|
||||||
AdminBasicAuth:
|
AdminBasicAuth:
|
||||||
type: http
|
type: http
|
||||||
scheme: basic
|
scheme: basic
|
||||||
description: The username for admin basic auth is `admin` and the password is the stream key.
|
description: The username for admin basic auth is `admin`. Defaults to abc123.
|
||||||
AccessToken:
|
AccessToken:
|
||||||
type: http
|
type: http
|
||||||
scheme: bearer
|
scheme: bearer
|
||||||
|
@ -512,6 +556,20 @@ paths:
|
||||||
sessionMaxViewerCount: 12
|
sessionMaxViewerCount: 12
|
||||||
viewerCount: 7
|
viewerCount: 7
|
||||||
|
|
||||||
|
/api/customjavascript:
|
||||||
|
get:
|
||||||
|
summary: Custom Javascript to execute.
|
||||||
|
description: Returns custom Javascript that was set in the Owncast admin to be run in the Owncast frontend.
|
||||||
|
tags: ['Server']
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: ''
|
||||||
|
content:
|
||||||
|
application/javascript:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: console.log("Hello World");
|
||||||
|
|
||||||
/api/chat/register:
|
/api/chat/register:
|
||||||
post:
|
post:
|
||||||
summary: Register a chat user
|
summary: Register a chat user
|
||||||
|
@ -560,24 +618,7 @@ paths:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: array
|
$ref: '#/components/schemas/ChatMessageArray'
|
||||||
items:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
user:
|
|
||||||
$ref: '#/components/schemas/User'
|
|
||||||
body:
|
|
||||||
type: string
|
|
||||||
description: Escaped HTML of the chat message content.
|
|
||||||
id:
|
|
||||||
type: string
|
|
||||||
description: Unique ID of the chat message.
|
|
||||||
visible:
|
|
||||||
type: boolean
|
|
||||||
description: 'Should chat message be visibly rendered.'
|
|
||||||
timestamp:
|
|
||||||
type: string
|
|
||||||
format: date-time
|
|
||||||
|
|
||||||
/api/yp:
|
/api/yp:
|
||||||
get:
|
get:
|
||||||
|
@ -617,6 +658,23 @@ paths:
|
||||||
nullable: true
|
nullable: true
|
||||||
format: date-time
|
format: date-time
|
||||||
|
|
||||||
|
/img/emoji/:
|
||||||
|
get:
|
||||||
|
parameters:
|
||||||
|
- name: name
|
||||||
|
in: path
|
||||||
|
description: Emoji image name
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: test.svg
|
||||||
|
summary: Get Emoji Image
|
||||||
|
description: Get an emoji image.
|
||||||
|
tags: ['Chat']
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: 'Returns a single image'
|
||||||
|
|
||||||
/api/emoji:
|
/api/emoji:
|
||||||
get:
|
get:
|
||||||
summary: Get Custom Emoji
|
summary: Get Custom Emoji
|
||||||
|
@ -1000,10 +1058,9 @@ paths:
|
||||||
'200':
|
'200':
|
||||||
$ref: '#/components/responses/BasicResponse'
|
$ref: '#/components/responses/BasicResponse'
|
||||||
|
|
||||||
/api/admin/config/key:
|
/api/admin/config/adminpass:
|
||||||
post:
|
post:
|
||||||
summary: Set the stream key.
|
summary: Set the admin password.
|
||||||
description: Set the stream key. Also used as the admin password.
|
|
||||||
tags: ['Admin']
|
tags: ['Admin']
|
||||||
security:
|
security:
|
||||||
- AdminBasicAuth: []
|
- AdminBasicAuth: []
|
||||||
|
@ -1016,6 +1073,21 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ConfigValue'
|
$ref: '#/components/schemas/ConfigValue'
|
||||||
|
|
||||||
|
/api/admin/config/streamkeys:
|
||||||
|
post:
|
||||||
|
summary: Set the stream keys.
|
||||||
|
tags: ['Admin']
|
||||||
|
security:
|
||||||
|
- AdminBasicAuth: []
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
$ref: '#/components/responses/BasicResponse'
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/StreamKeyArray'
|
||||||
|
|
||||||
/api/admin/config/pagecontent:
|
/api/admin/config/pagecontent:
|
||||||
post:
|
post:
|
||||||
summary: Set the custom page content.
|
summary: Set the custom page content.
|
||||||
|
@ -1085,6 +1157,24 @@ paths:
|
||||||
example:
|
example:
|
||||||
value: The best in Desert Bus Streaming
|
value: The best in Desert Bus Streaming
|
||||||
|
|
||||||
|
/api/admin/config/offlinemessage:
|
||||||
|
post:
|
||||||
|
summary: Set the offline message.
|
||||||
|
description: Set the message that is displayed when a stream is not live.
|
||||||
|
tags: ['Admin']
|
||||||
|
security:
|
||||||
|
- AdminBasicAuth: []
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
$ref: '#/components/responses/BasicResponse'
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ConfigValue'
|
||||||
|
example:
|
||||||
|
value: Come back on Friday at 2pm, I'll be streaming then.
|
||||||
|
|
||||||
/api/admin/config/logo:
|
/api/admin/config/logo:
|
||||||
post:
|
post:
|
||||||
summary: Set the server logo.
|
summary: Set the server logo.
|
||||||
|
@ -1349,6 +1439,7 @@ paths:
|
||||||
url: https://github.com/owncast/owncast
|
url: https://github.com/owncast/owncast
|
||||||
- platform: mastodon
|
- platform: mastodon
|
||||||
url: https://mastodon.social/@gabek
|
url: https://mastodon.social/@gabek
|
||||||
|
|
||||||
/api/admin/config/customstyles:
|
/api/admin/config/customstyles:
|
||||||
post:
|
post:
|
||||||
summary: Custom CSS styles to be used in the web front endpoints.
|
summary: Custom CSS styles to be used in the web front endpoints.
|
||||||
|
@ -1365,6 +1456,43 @@ paths:
|
||||||
example:
|
example:
|
||||||
value: 'body { color: orange; background: black; }'
|
value: 'body { color: orange; background: black; }'
|
||||||
|
|
||||||
|
/api/admin/config/customjavascript:
|
||||||
|
post:
|
||||||
|
summary: Custom Javascript to be inserted into the frontend
|
||||||
|
description: Save a string containing Javascript to be inserted in to the web frontend page.
|
||||||
|
tags: ['Admin']
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
$ref: '#/components/responses/BasicResponse'
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/javascript:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ConfigValue'
|
||||||
|
example:
|
||||||
|
value: console.log('Hello world.');
|
||||||
|
|
||||||
|
/api/admin/config/appearance:
|
||||||
|
post:
|
||||||
|
summary: Save a map of variables and values to be used in the frontend.
|
||||||
|
description: These values will override the default values in the frontend.
|
||||||
|
tags: ['Admin']
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
$ref: '#/components/responses/BasicResponse'
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
value:
|
||||||
|
type: object
|
||||||
|
example:
|
||||||
|
value:
|
||||||
|
theme-color-components-primary-button-background: '#ff0000'
|
||||||
|
theme-color-components-chat-background: '#000000'
|
||||||
|
|
||||||
/api/admin/viewersOverTime:
|
/api/admin/viewersOverTime:
|
||||||
get:
|
get:
|
||||||
summary: Viewers Over Time
|
summary: Viewers Over Time
|
||||||
|
@ -1441,6 +1569,21 @@ paths:
|
||||||
- time: '2020-10-03T21:43:00.381996-05:00'
|
- time: '2020-10-03T21:43:00.381996-05:00'
|
||||||
value: 11
|
value: 11
|
||||||
|
|
||||||
|
/api/admin/config/hideviewercount:
|
||||||
|
post:
|
||||||
|
summary: Enable or disable showing the viewer count.
|
||||||
|
tags: ['Admin']
|
||||||
|
security:
|
||||||
|
- AdminBasicAuth: []
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
$ref: '#/components/responses/BasicResponse'
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/BooleanValue'
|
||||||
|
|
||||||
/api/admin/config/federation/enable:
|
/api/admin/config/federation/enable:
|
||||||
post:
|
post:
|
||||||
summary: Enable or disable federated social features.
|
summary: Enable or disable federated social features.
|
||||||
|
@ -1568,6 +1711,33 @@ paths:
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/FederatedAction'
|
$ref: '#/components/schemas/FederatedAction'
|
||||||
|
|
||||||
|
/api/admin/emoji/upload:
|
||||||
|
post:
|
||||||
|
summary: Upload a single emoji image.
|
||||||
|
tags: ['Admin']
|
||||||
|
security:
|
||||||
|
- AdminBasicAuth: []
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
$ref: '#/components/responses/BasicResponse'
|
||||||
|
|
||||||
|
/api/admin/emoji/delete:
|
||||||
|
post:
|
||||||
|
summary: Delete a single emoji image.
|
||||||
|
tags: ['Admin']
|
||||||
|
security:
|
||||||
|
- AdminBasicAuth: []
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
$ref: '#/components/responses/BasicResponse'
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
example:
|
||||||
|
name: test.svg
|
||||||
|
|
||||||
/api/integrations/streamtitle:
|
/api/integrations/streamtitle:
|
||||||
post:
|
post:
|
||||||
summary: Set the stream title.
|
summary: Set the stream title.
|
||||||
|
@ -2050,6 +2220,34 @@ paths:
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/User'
|
$ref: '#/components/schemas/User'
|
||||||
|
|
||||||
|
/api/moderation/chat/user/:
|
||||||
|
get:
|
||||||
|
tags: ['Moderation']
|
||||||
|
parameters:
|
||||||
|
- name: name
|
||||||
|
in: path
|
||||||
|
description: User ID
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: USER-ID
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: User
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
user:
|
||||||
|
$ref: '#/components/schemas/User'
|
||||||
|
connectClients:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Client'
|
||||||
|
messages:
|
||||||
|
$ref: '#/components/schemas/ChatMessageArray'
|
||||||
|
|
||||||
/api/admin/followers:
|
/api/admin/followers:
|
||||||
get:
|
get:
|
||||||
tags: ['Admin']
|
tags: ['Admin']
|
||||||
|
|
Loading…
Reference in a new issue