558 lines
13 KiB
YAML
558 lines
13 KiB
YAML
openapi: 3.0.3
|
|
info:
|
|
title: videON Backend
|
|
description: Backend of videON
|
|
contact:
|
|
email: tormakristof@tormakristof.eu
|
|
license:
|
|
name: Apache 2.0
|
|
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
|
version: 1.0.0
|
|
servers:
|
|
- url: https://videon.k8s.kmlabz.com
|
|
tags:
|
|
- name: backend
|
|
description: videON Backend interaction
|
|
paths:
|
|
/api/users:
|
|
get:
|
|
tags:
|
|
- backend
|
|
summary: Get all users
|
|
operationId: getall
|
|
responses:
|
|
200:
|
|
description: Array of users
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/UserMetadataResponse'
|
|
404:
|
|
description: No object matching filter
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
|
|
/api/users/{username}:
|
|
get:
|
|
tags:
|
|
- backend
|
|
summary: Get a user with a name
|
|
operationId: getauser
|
|
parameters:
|
|
- name: username
|
|
in: path
|
|
description: Username of a user
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
200:
|
|
description: User's metadata
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/UserMetadata'
|
|
404:
|
|
description: No object matching filter
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
delete:
|
|
tags:
|
|
- backend
|
|
summary: Delete a user
|
|
operationId: deleteuser
|
|
parameters:
|
|
- name: username
|
|
in: path
|
|
description: Username of a user
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
200:
|
|
description: User's metadata
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/UserMetadata'
|
|
404:
|
|
description: No object matching filter
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
put:
|
|
tags:
|
|
- backend
|
|
summary: Modifies a user
|
|
operationId: modifyUser
|
|
parameters:
|
|
- name: username
|
|
in: path
|
|
description: Username of a user
|
|
required: true
|
|
schema:
|
|
type: string
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/User'
|
|
required: true
|
|
responses:
|
|
200:
|
|
description: successful operation
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/UserMetadata'
|
|
400:
|
|
description: JSON parse error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
417:
|
|
description: JSON invalid schema
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
|
|
|
|
/api/auth/signup:
|
|
post:
|
|
tags:
|
|
- backend
|
|
summary: Creates a user
|
|
operationId: createuser
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/User'
|
|
required: true
|
|
responses:
|
|
200:
|
|
description: successful operation
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/UserMetadata'
|
|
400:
|
|
description: JSON parse error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
417:
|
|
description: JSON invalid schema
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
|
|
/api/auth/login:
|
|
post:
|
|
tags:
|
|
- backend
|
|
summary: Logs on a user
|
|
operationId: logon
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/User'
|
|
required: true
|
|
responses:
|
|
200:
|
|
description: successful operation
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/LoginToken'
|
|
400:
|
|
description: JSON parse error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
417:
|
|
description: JSON invalid schema
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
|
|
/api/objects/streamerobjects/ingest:
|
|
post:
|
|
tags:
|
|
- backend
|
|
summary: Creates an ingest resource
|
|
operationId: createIngest
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/IngestObjectNeighbors'
|
|
required: true
|
|
responses:
|
|
200:
|
|
description: Streamer resource data
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/StreamerObjectData'
|
|
|
|
/api/objects/streamerobjects/restream:
|
|
post:
|
|
tags:
|
|
- backend
|
|
summary: Creates a restream resource
|
|
operationId: createRestream
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/RestreamObjectParameters'
|
|
required: true
|
|
responses:
|
|
200:
|
|
description: Streamer resource data
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/StreamerObjectData'
|
|
|
|
/api/objects/streamerobjects/encode:
|
|
post:
|
|
tags:
|
|
- backend
|
|
summary: Creates a encode resource
|
|
operationId: createEncode
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/EncodeObjectParameters'
|
|
required: true
|
|
responses:
|
|
200:
|
|
description: Streamer resource data
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/StreamerObjectData'
|
|
|
|
/api/objects/streamerobjects:
|
|
get:
|
|
tags:
|
|
- backend
|
|
summary: Gets all streamer resources
|
|
operationId: getResource
|
|
responses:
|
|
200:
|
|
description: Streamer resource data
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/StreamerObjectArray'
|
|
|
|
|
|
/api/objects/streamerobjects/{id}:
|
|
delete:
|
|
tags:
|
|
- backend
|
|
summary: Deletes a streamer resource
|
|
operationId: deleteResource
|
|
parameters:
|
|
- name: id
|
|
in: path
|
|
description: ID of a resource
|
|
required: true
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
responses:
|
|
200:
|
|
description: Streamer resource data
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/StreamerObjectData'
|
|
404:
|
|
description: ID not found
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
get:
|
|
tags:
|
|
- backend
|
|
summary: Gets a streamer resource
|
|
operationId: getAResource
|
|
parameters:
|
|
- name: id
|
|
in: path
|
|
description: ID of a resource
|
|
required: true
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
responses:
|
|
200:
|
|
description: Streamer resource data
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/StreamerObjectData'
|
|
404:
|
|
description: ID not found
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
/api/objects/streamerobjects/ingress/{id}:
|
|
put:
|
|
tags:
|
|
- backend
|
|
summary: Modifies an ingest resource
|
|
operationId: editIngress
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/IngestObjectNeighbors'
|
|
required: true
|
|
parameters:
|
|
- name: id
|
|
in: path
|
|
description: ID of a resource
|
|
required: true
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
responses:
|
|
200:
|
|
description: Streamer resource data
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/StreamerObjectData'
|
|
404:
|
|
description: ID not found
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
|
|
/api/objects/streamerobjects/restream/{id}:
|
|
put:
|
|
tags:
|
|
- backend
|
|
summary: Modifies a restream resource
|
|
operationId: editRestream
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/RestreamObjectParameters'
|
|
required: true
|
|
parameters:
|
|
- name: id
|
|
in: path
|
|
description: ID of a resource
|
|
required: true
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
responses:
|
|
200:
|
|
description: Streamer resource data
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/StreamerObjectData'
|
|
404:
|
|
description: ID not found
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
|
|
/api/objects/streamerobjects/encode/{id}:
|
|
put:
|
|
tags:
|
|
- backend
|
|
summary: Modifies an encode resource
|
|
operationId: editEncode
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/EncodeObjectParameters'
|
|
required: true
|
|
parameters:
|
|
- name: id
|
|
in: path
|
|
description: ID of a resource
|
|
required: true
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
responses:
|
|
200:
|
|
description: Streamer resource data
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/EncodeObjectParameters'
|
|
404:
|
|
description: ID not found
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
|
|
components:
|
|
schemas:
|
|
StreamerObjectData:
|
|
required:
|
|
- type
|
|
- url
|
|
- id
|
|
type: object
|
|
properties:
|
|
type:
|
|
type: string
|
|
enum:
|
|
- ingest
|
|
- encoder
|
|
- restream
|
|
url:
|
|
type: string
|
|
format: url
|
|
id:
|
|
type: string
|
|
format: uuid
|
|
inputNeighbour:
|
|
type: string
|
|
format: uuid
|
|
children:
|
|
type: array
|
|
items:
|
|
type: string
|
|
format: uuid
|
|
output_urls:
|
|
type: array
|
|
items:
|
|
type: string
|
|
bitrate:
|
|
type: integer
|
|
width:
|
|
type: integer
|
|
height:
|
|
type: integer
|
|
IngestObjectNeighbors:
|
|
required:
|
|
- outputNeighbours
|
|
type: object
|
|
properties:
|
|
outputNeighbours:
|
|
type: array
|
|
items:
|
|
type: string
|
|
format: uuid
|
|
LoginToken:
|
|
required:
|
|
- token
|
|
type: object
|
|
properties:
|
|
token:
|
|
type: string
|
|
RestreamObjectParameters:
|
|
required:
|
|
- inputNeighbours
|
|
- outputURLs
|
|
type: object
|
|
properties:
|
|
inputNeighbour:
|
|
type: string
|
|
format: uuid
|
|
outputURLs:
|
|
type: array
|
|
items:
|
|
type: string
|
|
format: url
|
|
EncodeObjectParameters:
|
|
required:
|
|
- inputNeighbours
|
|
- outputNeighbours
|
|
- bitrate
|
|
- width
|
|
- height
|
|
type: object
|
|
properties:
|
|
inputNeighbour:
|
|
type: string
|
|
format: uuid
|
|
outputNeighbours:
|
|
type: array
|
|
items:
|
|
type: string
|
|
format: uuid
|
|
bitrate:
|
|
type: integer
|
|
width:
|
|
type: integer
|
|
height:
|
|
type: integer
|
|
StreamerObjectArray:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/StreamerObjectData'
|
|
UserMetadataResponse:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/UserMetadata'
|
|
User:
|
|
required:
|
|
- name
|
|
- password
|
|
type: object
|
|
properties:
|
|
name:
|
|
type: string
|
|
password:
|
|
type: string
|
|
UserMetadata:
|
|
required:
|
|
- name
|
|
type: object
|
|
properties:
|
|
name:
|
|
type: string
|
|
creation_date:
|
|
type: string
|
|
format: date
|
|
last_logon:
|
|
type: string
|
|
format: date
|
|
stream_resources:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/StreamerObjectData'
|
|
ApiResponse:
|
|
required:
|
|
- message
|
|
- status
|
|
type: object
|
|
properties:
|
|
status:
|
|
type: string
|
|
message:
|
|
type: string |