{ "swagger": "2.0", "info": { "description": "This is a documentation for Eaas api-experiments", "version": "0.1.0", "title": "Eaas Representations", "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "basePath": "/", "tags": [ { "name": "representations", "externalDocs": { "description": "Find out more", "url": "http://swagger.io" } } ], "schemes": [ "https", "http" ], "paths": { "/entries/{entryID}/representations": { "post": { "tags": [ "representations" ], "summary": "Add a new representation", "description": "", "consumes": [ "multipart/form-data", "application/json" ], "produces": [ "application/json" ], "parameters": [ { "name": "entryID", "in": "path", "required": true, "type": "integer", "format": "int64" }, { "name": "media", "in": "formData", "description": "representation file", "required": true, "type":"file" }, { "name": "storage_type", "in": "formData", "description": "storage type(s3-efs-nas)", "required": false, "type":"string" } ], "responses": { "201": { "description": "Success, representation created" }, "422":{ "description": "Unprocessable Entity" } }, "security": [ { "basicAuth": [] } ] } }, "/entries/{entryID}/representations/{representationID}": { "get": { "tags": [ "representations" ], "summary": "Find representation by ID", "description": "Returns a single representation", "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "entryID", "required": true, "type": "integer", "format": "int64" }, { "in": "path", "name": "representationID", "required": true, "type": "integer", "format": "int64" } ], "responses": { "200": { "description": "Success" }, "400": { "description": "Bad request" }, "404": { "description": "Not found" } }, "security": [ { "basicAuth": [] } ] }, "put": { "tags": [ "representations" ], "summary": "Updates a representation", "description": "", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "parameters": [ { "name": "entryID", "in": "path", "required": true, "type": "integer", "format": "int64" }, { "name": "representationID", "in": "path", "required": true, "type": "integer", "format": "int64" }, { "name": "media", "in": "formData", "required": true, "type": "file" }, { "name": "storage_type", "in": "formData", "required": true, "type": "string" } ], "responses": { "201": { "description": "Updated successfully" }, "400": { "description": "Bad request" }, "404": { "description": "Not found" }, "422": { "description": "Unprocessable Entity" } }, "security": [ { "basicAuth": [] } ] }, "delete": { "tags": [ "representations" ], "summary": "Delete representation by ID", "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "entryID", "required": true, "type": "integer", "format": "int64" }, { "in": "path", "name": "representationID", "required": true, "type": "integer", "format": "int64" } ], "responses": { "204": { "description": "Deleted successfully" }, "400": { "description": "Bad request" }, "404": { "description": "Not found" } }, "security": [ { "basicAuth": [] } ] } }, "/entries/{entryID}/representations/{representationID}/media": { "get": { "tags": [ "representations" ], "summary": "Find representation media by ID", "description": "Returns a single representation media file", "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "entryID", "required": true, "type": "integer", "format": "int64" }, { "in": "path", "name": "representationID", "required": true, "type": "integer", "format": "int64" } ], "responses": { "200": { "description": "Success" }, "400": { "description": "Bad request" }, "404": { "description": "Not found" } }, "security": [ { "basicAuth": [] } ] } } }, "securityDefinitions": { "basicAuth":{ "type": "basic" } }, "externalDocs": { "description": "Find out more about Swagger", "url": "http://swagger.io" } }