From 6eef3f1032e268fda18750c1baf22264d9223c97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Tue, 24 Nov 2020 18:50:25 +0100 Subject: [PATCH] ability to use nginx args --- backend.yml | 131 +++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 108 insertions(+), 23 deletions(-) diff --git a/backend.yml b/backend.yml index 4c26c7d..9ecf6ff 100644 --- a/backend.yml +++ b/backend.yml @@ -188,17 +188,17 @@ paths: schema: $ref: '#/components/schemas/ApiResponse' - /api/objects/streamerobject: + /api/objects/streamerobjects/ingest: post: tags: - backend - summary: Creates a streamer resource - operationId: createResource + summary: Creates an ingest resource + operationId: createIngest requestBody: content: application/json: schema: - $ref: '#/components/schemas/StreamerObjectSimpleData' + $ref: '#/components/schemas/IngestObjectNeighbors' required: true responses: 200: @@ -207,10 +207,52 @@ paths: 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 resource + summary: Gets all streamer resources operationId: getResource responses: 200: @@ -221,7 +263,7 @@ paths: $ref: '#/components/schemas/StreamerObjectArray' - /api/objects/streamerobject/{id}: + /api/objects/streamerobjects/{id}: delete: tags: - backend @@ -283,7 +325,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/NeighbourseData' + $ref: '#/components/schemas/StreamerObjectEditable' required: true parameters: - name: id @@ -309,6 +351,31 @@ paths: components: schemas: + StreamerObjectEditable: + required: + - id + type: object + properties: + id: + type: string + format: uuid + inputNeighbours: + type: array + items: + type: string + format: uuid + outputNeighbours: + type: array + items: + type: string + format: uuid + outputURLs: + type: array + items: + type: string + format: url + ffmpeg_args: + type: string StreamerObjectData: required: - type @@ -338,28 +405,44 @@ components: items: type: string format: uuid - StreamerObjectSimpleData: - required: - - type - type: object - properties: - type: + outputURLs: + type: array + items: + type: string + format: url + ffmpeg_args: type: string - enum: - - ingest - - encoder - - restream - inputNeighbours: - type: array - items: - type: string - format: uuid + IngestObjectNeighbors: + required: + - outputNeighbours + type: object + properties: outputNeighbours: type: array items: type: string format: uuid - NeighbourseData: + RestreamObjectParameters: + required: + - inputNeighbours + - outputURLs + type: object + properties: + inputNeighbours: + type: array + items: + type: string + format: uuid + outputURLs: + type: array + items: + type: string + format: url + EncodeObjectParameters: + required: + - inputNeighbours + - outputNeighbours + - ffmpeg_args type: object properties: inputNeighbours: @@ -372,6 +455,8 @@ components: items: type: string format: uuid + ffmpeg_args: + type: string StreamerObjectArray: type: array items: