{ "swagger": "2.0", "info": { "description": "5GTANGO, an H2020 5GPPP project", "version": "0.0.1", "title": "5GTANGO SP Gatekeeper component REST API for the Verification and Validation Platform", "termsOfService": "https://5gtango.eu/", "license": { "name": "Apache License 2.0", "url": "https://github.com/sonata-nfv/tng-gtk-common/blob/master/LICENSE" } }, "host": "tng-gtk-vnv:5000", "basePath": "/", "tags": [ { "name": "root access", "description": "Gatekeeper V&V API root access"}, { "name": "test descriptors", "description": "Gatekeeper V&V API for test descriptors"}, { "name": "test plans", "description": "Gatekeeper V&V API for test plans"}, { "name": "test results", "description": "Gatekeeper V&V API for test results"} ], "paths": { "/": { "get": { "tags": ["root access"], "summary": "Returns something usefull on access to root", "operationId": "returnRootAccess", "consumes": ["*/*"], "produces": ["text/html; charset=utf-8"], "parameters": [], "responses": { "200": { "description": "OK"}} } }, "/pings": { "get": { "tags": ["pings"], "summary": "Returns time since started", "operationId": "returnPong", "consumes": ["*/*"], "produces": ["application/json"], "parameters": [], "responses": { "200": { "description": "OK"}} } }, "/tests/descriptors": { "get": { "tags": ["test descriptors"], "summary": "Query test descriptors", "operationId": "testDescriptorsQuerying", "consumes": ["*/*"], "produces": ["application/json"], "parameters": [ { "name": "page_size", "in": "query", "description": "The number of test descriptors to be included in a page", "required": false, "type": "integer", "format": "int32", "minimum": 0 }, { "name": "page_number", "in": "query", "description": "The number of the page of test descriptors to be shown (starting in 0)", "required": false, "type": "integer", "format": "int32", "minimum": 0, "default": 0 } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/TestDescriptorMetadataReturn"}}}, "400": {"description": "Bad Request"} } }, "options": { "tags": ["test descriptors"], "summary": "Options for test descriptors", "operationId": "testDescriptorsOptions", "consumes": ["*/*"], "produces": ["application/json"], "parameters": [], "responses": { "200": { "description": "OK"}, "400": { "description": "Bad Request"} } } }, "/tests/descriptors/{test_descriptor_uuid}": { "get": { "tags": ["test descriptors"], "summary": "Query a specific test descriptor meta-data", "parameters": [ { "name": "test_descriptor_uuid", "in": "path", "description": "The UUID of the test descriptor which meta-data is required", "required": true, "type": "string", "format": "uuid" } ], "consumes": ["*/*"], "produces": ["application/json"], "responses": { "200": { "description": "OK", "schema":{ "$ref":"#/definitions/TestDescriptorMetadataReturn"}}, "400": { "description": "Bad request"}, "404": { "description": "Not found"} } } }, "/plans": { "get": { "tags": ["test plans"], "summary": "Find all test plan", "description": "Finding all test plans", "operationId": "listAllTestPlansUsingGET", "produces": [ "*/*" ], "parameters": [ { "name": "serviceName", "in": "query", "description": "serviceName", "required": false, "type": "string" }, { "name": "status", "in": "query", "description": "status", "required": false, "type": "string" }, { "name": "testName", "in": "query", "description": "testName", "required": false, "type": "string" }, { "name": "testUuid", "in": "query", "description": "testUuid", "required": false, "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/TestPlan" } } } }, "deprecated": false }, "post": { "tags": ["test plans"], "summary": "Create a test plan", "description": "Creating a test plan", "operationId": "saveUsingPOST", "consumes": [ "application/json" ], "produces": [ "*/*" ], "parameters": [ { "in": "body", "name": "testPlan", "description": "testPlan", "required": true, "schema": { "$ref": "#/definitions/TestPlan" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/TestPlan" } }, "400": { "description": "Bad Request" } }, "deprecated": false } }, "/plans/services": { "post": { "tags": ["test plans"], "summary": "Create a test plan by service uuid", "operationId": "buildTestPlansByServiceUsingPOST", "consumes": [ "application/json" ], "produces": [ "*/*" ], "parameters": [ { "name": "confirmRequired", "in": "query", "description": "confirmRequired", "required": false, "type": "boolean" }, { "name": "serviceUuid", "in": "query", "description": "serviceUuid", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/TestPlan" } } }, "400": { "description": "Bad Request" } }, "deprecated": false } }, "/plans/services/{nsdUuid}/tests": { "get": { "tags": [ "test plans" ], "summary": "Find all tests related with a service uuid", "operationId": "listTestsByServiceUsingGET", "produces": [ "*/*" ], "parameters": [ { "name": "nsdUuid", "in": "path", "description": "nsdUuid", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "type": "object" } } } }, "deprecated": false } }, "/plans/testAndServices": { "post": { "tags": [ "test plans" ], "summary": "Create a test plan by test uuid and service uuid", "operationId": "buildTestPlansByNsTdPairUsingPOST", "consumes": [ "application/json" ], "produces": [ "*/*" ], "parameters": [ { "name": "confirmRequired", "in": "query", "description": "confirmRequired", "required": false, "type": "boolean" }, { "name": "serviceUuid", "in": "query", "description": "serviceUuid", "required": true, "type": "string" }, { "name": "testUuid", "in": "query", "description": "testUuid", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/TestPlan" } } }, "400": { "description": "Bad Request" } }, "deprecated": false } }, "/plans/testing-tags": { "post": { "tags": [ "test plans" ], "summary": "Create a test plan by testing tag", "operationId": "buildTestPlansByTestingTagUsingPOST", "consumes": [ "application/json" ], "produces": [ "*/*" ], "parameters": [ { "name": "confirmRequired", "in": "query", "description": "confirmRequired", "required": false, "type": "boolean" }, { "name": "testingTag", "in": "query", "description": "testingTag", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/TestPlan" } } }, "400": { "description": "Bad Request" } }, "deprecated": false } }, "/plans/testing-tags/{tag}/services": { "get": { "tags": [ "test plans" ], "summary": "Find all services related with a tag", "operationId": "listServicesByTagUsingGET", "produces": [ "*/*" ], "parameters": [ { "name": "tag", "in": "path", "description": "tag", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "type": "object" } } } }, "deprecated": false } }, "/plans/testing-tags/{tag}/tests": { "get": { "tags": [ "test plans" ], "summary": "Find all tests related with a testing_tag", "operationId": "listTestsByTagUsingGET", "produces": [ "*/*" ], "parameters": [ { "name": "tag", "in": "path", "description": "tag", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "type": "object" } } } }, "deprecated": false } }, "/plans/tests": { "post": { "tags": [ "test plans" ], "summary": "Create a test plan by test uuid", "operationId": "buildTestPlansByTestUsingPOST", "consumes": [ "application/json" ], "produces": [ "*/*" ], "parameters": [ { "name": "confirmRequired", "in": "query", "description": "confirmRequired", "required": false, "type": "boolean" }, { "name": "testUuid", "in": "query", "description": "testUuid", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/TestPlan" } } }, "400": { "description": "Bad Request" } }, "deprecated": false } }, "/plans/tests/{testdUuid}/services": { "get": { "tags": [ "test plans" ], "summary": "Find all services related with a test", "operationId": "listServicesByTestUsingGET", "produces": [ "*/*" ], "parameters": [ { "name": "testdUuid", "in": "path", "description": "testdUuid", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "type": "object" } } } }, "deprecated": false } }, "/plans/{uuid}": { "get": { "tags": [ "test plans" ], "summary": "Find a test plan", "description": "Finding test plan by uuid", "operationId": "findTestPlanUsingGET", "produces": [ "*/*" ], "parameters": [ { "name": "uuid", "in": "path", "description": "uuid", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/TestPlan" } } }, "deprecated": false }, "put": { "tags": [ "test plans" ], "summary": "Update a test plan status", "description": "Updating a test plan status by uuid", "operationId": "updateUsingPUT", "consumes": [ "application/json" ], "produces": [ "*/*" ], "parameters": [ { "name": "status", "in": "query", "description": "status", "required": true, "type": "string" }, { "name": "uuid", "in": "path", "description": "uuid", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/TestPlan" } }, "400": { "description": "Bad Request" } }, "deprecated": false }, "delete": { "tags": [ "test plans" ], "summary": "Cancel a test plan", "description": "canceling test plan by uuid", "operationId": "deleteTestPlanUsingDELETE", "produces": [ "*/*" ], "parameters": [ { "name": "uuid", "in": "path", "description": "uuid", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK" } }, "deprecated": false } }, "/tests/results": { "get": { "tags": ["test results"], "summary": "Query test results", "operationId": "testResultsQuerying", "consumes": ["*/*"], "produces": ["application/json"], "parameters": [ { "name": "page_size", "in": "query", "description": "The number of test results to be included in a page", "required": false, "type": "integer", "format": "int32", "minimum": 0 }, { "name": "page_number", "in": "query", "description": "The number of the page of test results to be shown (starting in 0)", "required": false, "type": "integer", "format": "int32", "minimum": 0, "default": 0 } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/TestDescriptorMetadataReturn"}}}, "400": {"description": "Bad Request"} } }, "options": { "tags": ["test results"], "summary": "Options for test results", "operationId": "testResultsOptions", "consumes": ["*/*"], "produces": ["application/json"], "parameters": [], "responses": { "200": { "description": "OK"}, "400": { "description": "Bad Request"} } } }, "/tests/results/{test_result_uuid}": { "get": { "tags": ["test results"], "summary": "Query a specific test result meta-data", "parameters": [ { "name": "test_result_uuid", "in": "path", "description": "The UUID of the test result which meta-data is required", "required": true, "type": "string", "format": "uuid" } ], "consumes": ["*/*"], "produces": ["application/json"], "responses": { "200": { "description": "OK", "schema":{ "$ref":"#/definitions/TestDescriptorMetadataReturn"}}, "400": { "description": "Bad request"}, "404": { "description": "Not found"} } } } }, "definitions": { "TestCategories": { "type": "object", "properties": {"category_type": { "type": "string", "description": "The category of the test"}}}, "TestConfigurationParameters": { "type": "object", "properties": { "content_type": { "type": "string", "description": "The content type of the parameter"}, "parameter_definition": { "type": "string", "description": "A description of the parameter"}, "parameter_name": { "type": "string", "description": "The name of the parameter"}, "parameter_value": { "type": "string", "description": "The value of the parameter"} } }, "TestExecutionParameters": { "type": "object", "properties": { "tag_id": { "type": "string", "description": "The id of the tag"}, "test_tag": { "type": "string", "description": "The text of the tag"} } }, "TestDescriptorData":{ "type": "object", "properties": { "author": { "type": "string", "description": "The author of the Test Descriptor"}, "description": { "type": "string", "description": "A description of the Test Descriptor"}, "descriptor_schema": { "type": "string", "description": "The URL of the test descriptor schema"}, "name": { "type": "string", "description": "The name of the Test Descriptor"}, "test_category": { "type": "array", "items": {"$ref": "#/definitions/TestCategories"}}, "test_configuration_parameters": { "type": "array", "items": {"$ref": "#/definitions/TestConfigurationParameters"}}, "test_execution": { "type": "array", "items": {"$ref": "#/definitions/TestExecutionParameters"}}, "test_type": { "type": "string", "description": "The type of the test: bash, ttcn3 or python"}, "vendor": { "type": "string", "description": "The vendor of the Test Descriptor"}, "version": { "type": "string", "description": "The version of the Test Descriptor"} } }, "TestDescriptorMetadataReturn":{ "type": "object", "properties": { "uuid": { "type": "string", "description": "The UUID of the test descriptor which we need"}, "created_at": { "type": "string", "description": "The date and time on which the test descriptor was created"}, "updated_at": { "type": "string", "description": "The date and time on which the test descriptor was updated"}, "md5": { "type": "string", "description": "The MD5 of the test descriptor"}, "signature": { "type": "string", "description": "The signature of the test descriptor"}, "status": { "type": "string", "description": "The status of the test descriptor"}, "username": { "type": "string", "description": "The username of the user that has created the test descriptor"}, "testd": { "type": "array", "items": {"$ref": "#/definitions/TestDescriptorData"}} } }, "TestPlan":{} } }