{ "swagger": "2.0", "info": { "version": "1.0.0", "title": "" }, "securityDefinitions": { "basicAuth": { "type": "basic" } }, "security": [ { "basicAuth": [] } ], "tags": [ { "name": "taoDelivery", "description": "Operations about delivery executions" } ], "basePath": "/taoDelivery", "paths": { "/RestExecution/unstop": { "post": { "produces": [ "application/json" ], "description": "Unstop execution from the terminated state", "tags": [ "executions" ], "parameters": [ { "name": "deliveryExecution", "in": "query", "description": "Execution identifier, in URI format", "required": true, "type": "string" }, { "name": "reason", "in": "query", "description": "Unstop reason, free text description", "required": false, "type": "string" } ], "responses": { "200": { "description": "Successful response", "schema": { "title": "response", "format": "json", "type": "object", "required": [ "success", "version", "data" ], "properties": { "success": { "type": "boolean", "description": "True on success" }, "version": { "type": "string", "description": "Tao version" }, "data": { "type": "string", "description": "Unstop successful" } } }, "examples": { "application/json": { "success": true, "data": "Unstop successful", "version": "3.1.0" } } }, "400": { "$ref": "#/responses/genericValidationError" }, "401": { "$ref": "#/responses/genericAuthenticationError" }, "403": { "$ref": "#/responses/genericAuthorizationError" }, "404": { "$ref": "#/responses/executionNotFoundError" }, "500": { "$ref": "#/responses/genericInternalError" } } } }, "/DeliveryExecutionState": { "put": { "produces": [ "application/json" ], "consumes": [ "application/json" ], "tags": [ "executions" ], "parameters": [ { "name": "uri", "in": "query", "description": "Execution identifier, in URI format", "required": true, "type": "string" }, { "name": "state", "in": "body", "description": "State to set the execution to", "required": true, "schema": { "type": "object", "required": [ "value" ], "properties": { "value": { "type": "string", "enum": [ "http://www.tao.lu/Ontologies/TAODelivery.rdf#DeliveryExecutionStatusActive", "http://www.tao.lu/Ontologies/TAODelivery.rdf#DeliveryExecutionStatusPaused", "http://www.tao.lu/Ontologies/TAODelivery.rdf#DeliveryExecutionStatusFinished" ] } } } } ], "responses": { "200": { "description": "Successful response", "schema": { "type": "array", "items": { "type": "string" }, "example": [] } }, "400": { "$ref": "#/responses/genericValidationError" }, "401": { "$ref": "#/responses/genericAuthenticationError" }, "403": { "$ref": "#/responses/genericAuthorizationError" }, "404": { "$ref": "#/responses/executionNotFoundError" }, "500": { "$ref": "#/responses/genericInternalError" } } } }, "/DeliveryExecution": { "get": { "description": "Get Delivery Execution Details", "produces": [ "application/json" ], "tags": [ "executions" ], "parameters": [ { "name": "execution", "in": "query", "description": "Delivery Execution URI format", "required": true, "type": "string", "format": "string" } ], "responses": { "200": { "description": "Successful response return delivery execution details", "schema": { "title": "response", "format": "json", "type": "object", "required": [ "success", "version", "data" ], "properties": { "success": { "type": "boolean", "description": "True on success" }, "version": { "type": "string", "description": "Tao version" }, "data": { "type": "object", "properties": { "http://www.tao.lu/Ontologies/TAODelivery.rdf#DeliveryExecutionDelivery": { "type": "string", "description": "Delivery Uri" }, "http://www.tao.lu/Ontologies/TAODelivery.rdf#DeliveryExecutionSubject": { "type": "string", "description": "Test Taker Uri" }, "http://www.tao.lu/Ontologies/TAODelivery.rdf#DeliveryExecutionStart": { "type": "string", "description": "Delivery execution start time" }, "http://www.tao.lu/Ontologies/TAODelivery.rdf#DeliveryExecutionEnd": { "type": "string", "description": "Delivery execution end time" }, "http://www.tao.lu/Ontologies/TAODelivery.rdf#StatusOfDeliveryExecution": { "type": "string", "description": "Delivery execution status" }, "http://www.tao.lu/Ontologies/TAODelivery.rdf#DeliveryExecutionMetadata": { "type": "object", "description": "Delivery metadata collection", "properties": { "metadataId": { "type": "string", "description": "Metadata Id" }, "metadataContent": { "type": "string", "description": "Metadata content" } } } } } } }, "examples": { "application/json": { "success": true, "data": { "http://www.tao.lu/Ontologies/TAODelivery.rdf#DeliveryExecutionDelivery": "Delivery of QTI Interactions", "http://www.tao.lu/Ontologies/TAODelivery.rdf#DeliveryExecutionSubject": "https://tao.docker.localhost/ontologies/tao.rdf#i62ea71dcaeb9c48dac0bee9e5e171d4", "http://www.tao.lu/Ontologies/TAODelivery.rdf#DeliveryExecutionStart": "0.45403300 1659531796", "http://www.tao.lu/Ontologies/TAODelivery.rdf#DeliveryExecutionEnd": "0.31138800 1659531811", "http://www.tao.lu/Ontologies/TAODelivery.rdf#StatusOfDeliveryExecution": "Finished", "http://www.tao.lu/Ontologies/TAODelivery.rdf#DeliveryExecutionMetadata": { "metaDataId": { "metadataId": "metaDataId", "metadataContent": "Content" } } }, "version": "2022.07" } } }, "404": { "description": "Delivery with a given delivery execution id does not exist" } } } } }, "definitions": { "errorModel": { "type": "object", "description": "contain error", "required": [ "success", "version", "errorCode", "errorMsg" ], "properties": { "success": { "type": "boolean", "description": "false on failure", "default": false }, "version": { "type": "string", "description": "tao version", "default": "3.1.0" }, "errorCode": { "type": "integer", "description": "error code", "default": 0 }, "errorMsg": { "type": "string", "description": "error description" } } } }, "responses": { "genericValidationError": { "description": "Bad request if you send invalid parameters.", "examples": { "application/json": { "success": false, "errorCode": 0, "errorMsg": "At least one mandatory parameter was required but found missing in your request", "version": "3.1.0" } }, "schema": { "$ref": "#/definitions/errorModel" } }, "genericAuthenticationError": { "description": "Not authenticated" }, "genericAuthorizationError": { "description": "User isn't authorized to access to this functionality" }, "executionNotFoundError": { "description": "Delivery can't be found", "examples": { "application/json": { "success": false, "errorCode": 0, "errorMsg": "Delivery Execution not found", "version": "3.1.0" } }, "schema": { "$ref": "#/definitions/errorModel" } }, "genericInternalError": { "description": "Internal error (should not occur)" } }, "externalDocs": { "description": "taoDelivery on Github", "url": "https://github.com/oat-sa/extension-tao-delivery" } }