1316 lines
41 KiB
JSON
1316 lines
41 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"version": "1.0.0",
|
|
"title": "Delivery compilation API"
|
|
},
|
|
"tags": [
|
|
{
|
|
"name": "delivery",
|
|
"description": "Operations about delivery"
|
|
}
|
|
],
|
|
"paths": {
|
|
"/taoDeliveryRdf/RestDelivery/generate": {
|
|
"post": {
|
|
"description": "Generate a delivery from a valid test uri",
|
|
"consumes": ["application/x-www-form-urlencoded"],
|
|
"tags": [
|
|
"delivery"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "test",
|
|
"in": "formData",
|
|
"description": "Test identifier, in URI format",
|
|
"required": true,
|
|
"type": "string"
|
|
},{
|
|
"name": "delivery-uri",
|
|
"in": "formData",
|
|
"description": "Delivery class uri where to create test delivery",
|
|
"required": false,
|
|
"type": "string"
|
|
},{
|
|
"name": "delivery-label",
|
|
"in": "formData",
|
|
"description": "If delivery-uri is specified, this parameter will be ignored. Delivery class label where to create test delivery otherwise root class will be used",
|
|
"required": false,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "remote-publish",
|
|
"in": "formData",
|
|
"description": "Publish delivery to remote env. Require taoPublishing extension.",
|
|
"required": false,
|
|
"type": "boolean"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"schema": {
|
|
"title": "response",
|
|
"format": "json",
|
|
"type": "object",
|
|
"required": [
|
|
"success",
|
|
"version"
|
|
],
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"description": "false on failure, true on success"
|
|
},
|
|
"version": {
|
|
"type": "string",
|
|
"description": "tao version"
|
|
},
|
|
"data": {
|
|
"$ref": "#/definitions/data"
|
|
},
|
|
"errorCode": {
|
|
"type": "string",
|
|
"description": "error code. it appear if success value is false"
|
|
},
|
|
"errorMsg": {
|
|
"type": "string",
|
|
"description": "error description. it appear if success value is false"
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"application/json": {
|
|
"success": true,
|
|
"data": {
|
|
"delivery": [
|
|
"http://tao.local/mytao.rdf#xxxxxxxxxxxxx1"
|
|
]
|
|
},
|
|
"version": "3.1.0"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request if you send invalid parameters. Test 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",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "You don't have permission to access this resource.",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Test uri is provided but not found.",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "Unable to find a test associated to the given uri.",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error, if delivery class label is found multiple times.",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "Exception error description",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/taoDeliveryRdf/RestDelivery/generateDeferred": {
|
|
"post": {
|
|
"description": "Generate a delivery from a valid test uri using task queue",
|
|
"consumes": ["application/x-www-form-urlencoded"],
|
|
"tags": [
|
|
"delivery"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "test",
|
|
"in": "formData",
|
|
"description": "Test identifier, in URI format",
|
|
"required": true,
|
|
"type": "string"
|
|
},{
|
|
"name": "delivery-uri",
|
|
"in": "formData",
|
|
"description": "Delivery class uri where to create test delivery",
|
|
"required": false,
|
|
"type": "string"
|
|
},{
|
|
"name": "delivery-label",
|
|
"in": "formData",
|
|
"description": "If delivery-uri is specified, this parameter will be ignored. Delivery class label where to create test delivery otherwise root class will be used",
|
|
"required": false,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "remote-publish",
|
|
"in": "formData",
|
|
"description": "Publish delivery to remote env. Require taoPublishing extension.",
|
|
"required": false,
|
|
"type": "boolean"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"schema": {
|
|
"title": "response",
|
|
"format": "json",
|
|
"type": "object",
|
|
"required": [
|
|
"success",
|
|
"version"
|
|
],
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"description": "false on failure, true on success"
|
|
},
|
|
"version": {
|
|
"type": "string",
|
|
"description": "tao version"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"reference_id" : {
|
|
"type": "string",
|
|
"description": "Identifier of the task in the task queue"
|
|
}
|
|
}
|
|
},
|
|
"errorCode": {
|
|
"type": "string",
|
|
"description": "error code. it appear if success value is false"
|
|
},
|
|
"errorMsg": {
|
|
"type": "string",
|
|
"description": "error description. it appear if success value is false"
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"application/json": {
|
|
"success": true,
|
|
"data": {
|
|
"reference_id": "http://tao.local/mytao.rdf#xxxxxxxxxxxxx"
|
|
},
|
|
"version": "3.1.0"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request if you send invalid parameters. Test 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",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "You don't have permission to access this resource.",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Test uri is provided but not found.",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "Unable to find a test associated to the given uri.",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error, if delivery class label is found multiple times.",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "Exception error description",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/taoDeliveryRdf/RestDelivery/update": {
|
|
"post": {
|
|
"description": "Update parameters of all the deliveries found by criteria given from url query",
|
|
"consumes": ["application/x-www-form-urlencoded"],
|
|
"tags": [
|
|
"delivery"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "searchParams",
|
|
"in": "query",
|
|
"description": "A valid json with search params for finding deliveries",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "http_2_www_0_w3_0_org_1_2000_1_01_1_rdf-schema_3_label",
|
|
"in": "formData",
|
|
"description": "Delivery label, or any other parameter for updating",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"schema": {
|
|
"title": "response",
|
|
"format": "json",
|
|
"type": "object",
|
|
"required": [
|
|
"success",
|
|
"version"
|
|
],
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"description": "false on failure, true on success"
|
|
},
|
|
"version": {
|
|
"type": "string",
|
|
"description": "tao version"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"reference_id" : {
|
|
"type": "string",
|
|
"description": "Identifier of the task in the task queue"
|
|
}
|
|
}
|
|
},
|
|
"errorCode": {
|
|
"type": "string",
|
|
"description": "error code. it appear if success value is false"
|
|
},
|
|
"errorMsg": {
|
|
"type": "string",
|
|
"description": "error description. it appear if success value is false"
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"application/json": {
|
|
"success": true,
|
|
"data": {
|
|
"reference_id": "http://tao.local/mytao.rdf#xxxxxxxxxxxxx"
|
|
},
|
|
"version": "3.1.0"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"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"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "You don't have permission to access this resource.",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Delivery not found.",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "Unable to find a test associated to the given uri.",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error.",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "Exception error description",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/taoDeliveryRdf/RestDelivery/updateDeferred": {
|
|
"post": {
|
|
"description": "Update parameters of all the deliveries found by criteria given from url query using task queue",
|
|
"consumes": ["application/x-www-form-urlencoded"],
|
|
"tags": [
|
|
"delivery"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "searchParams",
|
|
"in": "query",
|
|
"description": "A valid json with search params for finding deliveries",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "http_2_www_0_w3_0_org_1_2000_1_01_1_rdf-schema_3_label",
|
|
"in": "formData",
|
|
"description": "Delivery label, or any other parameter for updating",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"schema": {
|
|
"title": "response",
|
|
"format": "json",
|
|
"type": "object",
|
|
"required": [
|
|
"success",
|
|
"version"
|
|
],
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"description": "false on failure, true on success"
|
|
},
|
|
"version": {
|
|
"type": "string",
|
|
"description": "tao version"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"reference_id" : {
|
|
"type": "string",
|
|
"description": "Identifier of the task in the task queue"
|
|
}
|
|
}
|
|
},
|
|
"errorCode": {
|
|
"type": "string",
|
|
"description": "error code. it appear if success value is false"
|
|
},
|
|
"errorMsg": {
|
|
"type": "string",
|
|
"description": "error description. it appear if success value is false"
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"application/json": {
|
|
"success": true,
|
|
"data": {
|
|
"reference_id": "http://tao.local/mytao.rdf#xxxxxxxxxxxxx"
|
|
},
|
|
"version": "3.1.0"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"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"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "You don't have permission to access this resource.",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Delivery not found.",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "Unable to find a test associated to the given uri.",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error.",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "Exception error description",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/taoDeliveryRdf/RestDelivery/deleteDeferred": {
|
|
"delete": {
|
|
"description": "Delete the delivery by URI using task queue",
|
|
"tags": [
|
|
"delivery"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "uri",
|
|
"in": "query",
|
|
"description": "A valid URI",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"schema": {
|
|
"title": "response",
|
|
"format": "json",
|
|
"type": "object",
|
|
"required": [
|
|
"success",
|
|
"version"
|
|
],
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"description": "false on failure, true on success"
|
|
},
|
|
"version": {
|
|
"type": "string",
|
|
"description": "tao version"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id" : {
|
|
"type": "string",
|
|
"description": "Identifier of the task in the task queue"
|
|
}
|
|
}
|
|
},
|
|
"errorCode": {
|
|
"type": "string",
|
|
"description": "error code. it appear if success value is false"
|
|
},
|
|
"errorMsg": {
|
|
"type": "string",
|
|
"description": "error description. it appear if success value is false"
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"application/json": {
|
|
"success": true,
|
|
"data": {
|
|
"id": "http://tao.local/mytao.rdf#xxxxxxxxxxxxx"
|
|
},
|
|
"version": "3.1.0"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"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"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "You are unauthorized.",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "You don't have permission to access this resource.",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not found",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "The delivery with given URI has not been found.",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error.",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "Exception error description",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/taoDeliveryRdf/RestDelivery/get": {
|
|
"get": {
|
|
"description": "List all deliveries or a range of deliveries",
|
|
"tags": [
|
|
"delivery"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "limit",
|
|
"in": "query",
|
|
"description": "Amount of deliveries to be shown",
|
|
"required": false,
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "Start from delivery number",
|
|
"required": false,
|
|
"type": "integer"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"schema": {
|
|
"title": "response",
|
|
"format": "json",
|
|
"type": "object",
|
|
"required": [
|
|
"success",
|
|
"version"
|
|
],
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"description": "false on failure, true on success"
|
|
},
|
|
"version": {
|
|
"type": "string",
|
|
"description": "tao version"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"items" : {
|
|
"type": "array",
|
|
"description": "delivery objects",
|
|
"items": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"overallCount" : {
|
|
"type": "integer",
|
|
"description": "overall count of deliveries regardless of pagination"
|
|
}
|
|
}
|
|
},
|
|
"errorCode": {
|
|
"type": "string",
|
|
"description": "error code. it appear if success value is false"
|
|
},
|
|
"errorMsg": {
|
|
"type": "string",
|
|
"description": "error description. it appear if success value is false"
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"application/json": {
|
|
"success": true,
|
|
"data": {
|
|
"overallCount": 5,
|
|
"items": [
|
|
{
|
|
"uri": "http://tao.local/mytao.rdf#xxxxxxxxxxxxx",
|
|
"label": "Delivery Label 1"
|
|
},
|
|
{
|
|
"uri": "http://tao.local/mytao.rdf#xxxxxxxxxxxxx",
|
|
"label": "Delivery Label 2"
|
|
}
|
|
]
|
|
},
|
|
"version": "3.1.0"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request if you send invalid parameters.",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "'Offset' should be a positive integer",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "You don't have permission to access this resource.",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "You don't have permission to access this resource.",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error (should not occur)",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "Exception error description",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
},
|
|
"501": {
|
|
"description": "Method not implemented",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "Only get method is accepted to getting deliveries",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
|
|
"/taoDeliveryRdf/RestDelivery/getStatus": {
|
|
"get": {
|
|
"description": "Check status of generate delivery task. Available since Tao 3.1.",
|
|
"tags": [
|
|
"delivery"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "query",
|
|
"description": "Task identifier",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"schema": {
|
|
"title": "response",
|
|
"format": "json",
|
|
"type": "object",
|
|
"required": [
|
|
"success",
|
|
"version"
|
|
],
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"description": "false on failure, true on success"
|
|
},
|
|
"version": {
|
|
"type": "string",
|
|
"description": "tao version"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id" : {
|
|
"type": "string",
|
|
"description": "Task identifier"
|
|
},
|
|
"status" : {
|
|
"type": "string",
|
|
"description": "Task execution status"
|
|
},
|
|
"delivery" : {
|
|
"type": "string",
|
|
"description": "Generated delivery identifier"
|
|
},
|
|
"children": {
|
|
"type": "array",
|
|
"description": "Array with remote environments and statuses of publication",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"errorCode": {
|
|
"type": "string",
|
|
"description": "error code. it appear if success value is false"
|
|
},
|
|
"errorMsg": {
|
|
"type": "string",
|
|
"description": "error description. it appear if success value is false"
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"application/json": {
|
|
"success": true,
|
|
"data": {
|
|
"id": "http://tao.local/mytao.rdf#xxxxxxxxxxxxx",
|
|
"status": "Success",
|
|
"delivery": "http://tao.local/mytao.rdf#xxxxxxxxxxxxx",
|
|
"children": [
|
|
{
|
|
"id": "http://tao.local/mytao.rdf#xxxxxxxxxxxxx",
|
|
"label": "Publishing Delivery",
|
|
"status": "Success",
|
|
"report": [
|
|
{
|
|
"type": "info",
|
|
"message": "Running task http://tao.local/mytao.rdf#xxxxxxxxxxxxx"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"version": "3.1.0"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request if you send invalid parameters. Test 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",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "You don't have permission to access this resource.",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Task with given id was not found",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "Task not found.",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error (should not occur)",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "Exception error description",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/taoDeliveryRdf/RestTest/compileDeferred": {
|
|
"post": {
|
|
"description": "Import test and compile delivery using task queue",
|
|
"consumes": ["multipart/form-data"],
|
|
"tags": [
|
|
"delivery", "test"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "testPackage",
|
|
"in": "formData",
|
|
"description": "Test package archive",
|
|
"required": true,
|
|
"type": "file"
|
|
},
|
|
{
|
|
"name": "importerId",
|
|
"in": "formData",
|
|
"description": "Importer name",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"schema": {
|
|
"title": "response",
|
|
"format": "json",
|
|
"type": "object",
|
|
"required": [
|
|
"success",
|
|
"version"
|
|
],
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"description": "false on failure, true on success"
|
|
},
|
|
"version": {
|
|
"type": "string",
|
|
"description": "tao version"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"reference_id" : {
|
|
"type": "string",
|
|
"description": "Identifier of the task in the task queue"
|
|
}
|
|
}
|
|
},
|
|
"errorCode": {
|
|
"type": "string",
|
|
"description": "error code. it appear if success value is false"
|
|
},
|
|
"errorMsg": {
|
|
"type": "string",
|
|
"description": "error description. it appear if success value is false"
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"application/json": {
|
|
"success": true,
|
|
"data": {
|
|
"reference_id": "http://tao.local/mytao.rdf#xxxxxxxxxxxxx"
|
|
},
|
|
"version": "3.1.0"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"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"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "You don't have permission to access this resource.",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Test uri is provided but not found.",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "Unable to find a importer by given identifier",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error (should not occur)",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "Exception error description",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/taoDeliveryRdf/RestDelivery/createClass": {
|
|
"post": {
|
|
"description": "Create a delivery class",
|
|
"consumes": ["application/x-www-form-urlencoded"],
|
|
"tags": [
|
|
"delivery"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "delivery-label",
|
|
"in": "formData",
|
|
"description": "Delivery class label to create",
|
|
"required": true,
|
|
"type": "string"
|
|
},{
|
|
"name": "delivery-parent",
|
|
"in": "formData",
|
|
"description": "Parent delivery class uri. If not specified root delivery class will be used",
|
|
"required": false,
|
|
"type": "string"
|
|
},{
|
|
"name": "delivery-comment",
|
|
"in": "formData",
|
|
"description": "The comment of new created class",
|
|
"required": false,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"schema": {
|
|
"title": "response",
|
|
"format": "json",
|
|
"type": "object",
|
|
"required": [
|
|
"success",
|
|
"version"
|
|
],
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean",
|
|
"description": "false on failure, true on success"
|
|
},
|
|
"version": {
|
|
"type": "string",
|
|
"description": "tao version"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"message" : {
|
|
"type": "string",
|
|
"description": "A message to explain if class is newly created or it already exists"
|
|
},
|
|
"delivery-uri" : {
|
|
"type": "string",
|
|
"description": "The uri of newly created delivery class"
|
|
}
|
|
}
|
|
},
|
|
"errorCode": {
|
|
"type": "string",
|
|
"description": "error code. it appear if success value is false"
|
|
},
|
|
"errorMsg": {
|
|
"type": "string",
|
|
"description": "error description. it appear if success value is false"
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"application/json": {
|
|
"success": true,
|
|
"data": {
|
|
"delivery-uri": "http://tao.local/mytao.rdf#xxxxxxxxxxxxx"
|
|
},
|
|
"version": "3.1.0"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request if you send invalid parameters. delivery-label 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",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "You don't have permission to access this resource.",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error, if delivery-parent if not a valid delivery class.",
|
|
"examples": {
|
|
"application/json": {
|
|
"success": false,
|
|
"errorCode": 0,
|
|
"errorMsg": "Exception error description",
|
|
"version": "3.1.0"
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/errorModel"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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"
|
|
},
|
|
"errorCode": {
|
|
"type": "integer",
|
|
"description": "error code"
|
|
},
|
|
"errorMsg": {
|
|
"type": "string",
|
|
"description": "error description"
|
|
}
|
|
}
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"description": "Generated delivery URI , it appear if success value is true",
|
|
"properties": {
|
|
"delivery": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"externalDocs": {
|
|
"description": "taoDeliveryRdf on Github",
|
|
"url": "https://github.com/oat-sa/extension-tao-delivery-rdf"
|
|
}
|
|
}
|