152 lines
5.4 KiB
JSON
152 lines
5.4 KiB
JSON
|
|
||
|
|
||
|
{
|
||
|
"swagger": "2.0",
|
||
|
"info": {
|
||
|
"version": "1.0.0",
|
||
|
"title": "LTI delivery service REST API"
|
||
|
},
|
||
|
"tags": [
|
||
|
{
|
||
|
"name": "LtiService",
|
||
|
"description": "Operations about LTI delivery service"
|
||
|
}
|
||
|
],
|
||
|
"paths": {
|
||
|
"/ltiDeliveryProvider/DeliveryRestService/getUrl": {
|
||
|
"get": {
|
||
|
"produces": [
|
||
|
"application/json"
|
||
|
],
|
||
|
"description": "Generate a LTI Launch URL for a valid delivery identifier",
|
||
|
"tags": [
|
||
|
"LtiSservice"
|
||
|
],
|
||
|
"parameters": [
|
||
|
{
|
||
|
"name": "deliveryId",
|
||
|
"in": "query",
|
||
|
"description": "Delivery identifier, in URI format",
|
||
|
"required": true,
|
||
|
"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": "Delivery launch URI"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"examples": {
|
||
|
"application/json": {
|
||
|
"success": true,
|
||
|
"data": "http://tao.local/ltiDeliveryProvider/DeliveryTool/launch/eyJkZWxpdmVyeSI6Imh0dHA6XC9cL3Rhby5jaHJpcy5sb2NhbFwvdGFvY2hyaXMucmRmI2kxNDY3MDM2OTQzNTA1OTcxIn0=",
|
||
|
"version": "3.1.0"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"400": {
|
||
|
"description": "Bad request if you send invalid parameters. Delivery uri is mandatory.",
|
||
|
"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"
|
||
|
}
|
||
|
},
|
||
|
"401": {
|
||
|
"description": "Unauthorized"
|
||
|
},
|
||
|
"403": {
|
||
|
"description": "User isn't authorized to access to this functionality"
|
||
|
},
|
||
|
"404": {
|
||
|
"description": "Item can't be found",
|
||
|
"examples": {
|
||
|
"application/json": {
|
||
|
"success": false,
|
||
|
"errorCode": 0,
|
||
|
"errorMsg": "Delivery not found",
|
||
|
"version": "3.1.0"
|
||
|
}
|
||
|
},
|
||
|
"schema": {
|
||
|
"$ref" : "#/definitions/errorModel"
|
||
|
}
|
||
|
},
|
||
|
"500": {
|
||
|
"description": "Internal error (should not occur)"
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"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"
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"externalDocs": {
|
||
|
"description": "taoQtiItem on Github",
|
||
|
"url": "https://github.com/oat-sa/extension-tao-itemqti"
|
||
|
}
|
||
|
}
|
||
|
|