{"swagger": "2.0", "basePath": "http://tng-project.5gtango.eu/api", "paths": {"/v1/pings": {"get": {"responses": {"200": {"description": "Success", "schema": {"$ref": "#/definitions/PingGet"}}}, "summary": "Health check: Respond with current uptime", "operationId": "get_ping", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v1"]}}, "/v1/projects": {"post": {"responses": {"200": {"description": "Success", "schema": {"$ref": "#/definitions/ProjectsPost"}}}, "summary": "Create a new project and generate descriptors with the given args", "operationId": "post_projects", "parameters": [{"name": "author", "in": "query", "type": "string", "description": "Service author", "default": "eu.tango"}, {"name": "vendor", "in": "query", "type": "string", "description": "Service vendor", "default": "eu.tango"}, {"name": "name", "in": "query", "type": "string", "description": "Service name", "default": "example-service"}, {"name": "description", "in": "query", "type": "string", "description": "Service description", "default": "Example description"}, {"name": "vnfs", "in": "query", "type": "integer", "description": "Number of VNFs in the service", "default": 1}, {"name": "image_names", "in": "query", "type": "string", "description": "List of VNF image names (space-separated)"}, {"name": "image_types", "in": "query", "type": "string", "description": "List of VNF image types (space-separated)"}, {"name": "only_tango", "in": "query", "type": "boolean", "description": "Generate only 5GTANGO descriptors", "default": false}, {"name": "only_osm", "in": "query", "type": "boolean", "description": "Generate only OSM descriptors", "default": false}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v1"]}, "get": {"responses": {"200": {"description": "Success", "schema": {"$ref": "#/definitions/ProjectsGet"}}}, "summary": "Get list of projects", "operationId": "get_projects", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v1"]}}, "/v1/projects/{project_uuid}": {"parameters": [{"name": "project_uuid", "in": "path", "required": true, "type": "string"}], "delete": {"responses": {"404": {"description": "Project not found"}, "200": {"description": "Success", "schema": {"$ref": "#/definitions/ProjectDelete"}}}, "summary": "Delete the specified project", "operationId": "delete_project", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v1"]}, "get": {"responses": {"404": {"description": "Project not found"}, "200": {"description": "Success", "schema": {"$ref": "#/definitions/ProjectGet"}}}, "summary": "Get the UUID and manifest of the specified project", "operationId": "get_project", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v1"]}}, "/v1/projects/{project_uuid}/download": {"parameters": [{"name": "project_uuid", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"404": {"description": "Project not found"}, "200": {"description": "OK"}}, "operationId": "get_project_download", "deprecated": true, "tags": ["v1"]}}, "/v1/projects/{project_uuid}/files": {"parameters": [{"name": "project_uuid", "in": "path", "required": true, "type": "string"}], "delete": {"responses": {"404": {"description": "Project or file not found"}, "200": {"description": "Success", "schema": {"$ref": "#/definitions/FilesDelete"}}}, "summary": "Delete the specified project", "operationId": "delete_project_files", "parameters": [{"name": "filename", "in": "query", "type": "string", "required": true, "description": "Filename of the file to remove"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v1"]}, "post": {"responses": {"404": {"description": "Project not found"}, "200": {"description": "Success", "schema": {"$ref": "#/definitions/FilesPost"}}}, "summary": "Upload and add a file to the specified project", "operationId": "post_project_files", "parameters": [{"name": "file", "in": "formData", "type": "file", "required": true, "description": "Uploaded file to add to project"}, {"name": "file_type", "in": "query", "type": "string", "description": "MIME type of an uploaded file"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "consumes": ["multipart/form-data"], "tags": ["v1"]}, "get": {"responses": {"404": {"description": "Project not found"}, "200": {"description": "Success", "schema": {"$ref": "#/definitions/FilesGet"}}}, "summary": "Get a list of files in the specified project", "operationId": "get_project_files", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v1"]}}, "/v1/projects/{project_uuid}/package": {"parameters": [{"name": "project_uuid", "in": "path", "required": true, "type": "string"}], "post": {"responses": {"503": {"description": "tng-sdk-package not installed"}, "404": {"description": "Project not found"}, "200": {"description": "Success", "schema": {"$ref": "#/definitions/PackagePost"}}}, "summary": "Package (and validate) the specified project using tng-sdk-package (if installed)", "operationId": "post_project_package", "parameters": [{"name": "skip_validation", "in": "query", "type": "boolean", "description": "If true, skip validation when packaging. Else validate first.", "default": false}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["v1"]}}, "/v1/projects/{project_uuid}/{file_name}": {"parameters": [{"name": "project_uuid", "in": "path", "required": true, "type": "string"}, {"name": "file_name", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"200": {"description": "Success"}}, "summary": "Get/download the specified file from the specified project", "operationId": "get_project_specific_file", "tags": ["v1"]}}}, "info": {"title": "5GTANGO tng-project API", "version": "0.1", "description": "5GTANGO tng-project REST API for project management."}, "produces": ["application/json"], "consumes": ["application/json"], "tags": [{"name": "default", "description": "Default namespace"}, {"name": "v1", "description": "tng-project API v1"}], "definitions": {"PingGet": {"required": ["alive_since"], "properties": {"alive_since": {"type": "string", "description": "system uptime"}}, "type": "object"}, "ProjectsPost": {"required": ["files", "uuid"], "properties": {"uuid": {"type": "string", "description": "project UUID"}, "error_msg": {"type": "string", "description": "error message"}, "files": {"type": "array", "description": "list of files along with access points", "items": {"type": "string"}}}, "type": "object"}, "ProjectsGet": {"required": ["projects"], "properties": {"projects": {"type": "array", "description": "list of all project UUIDs", "items": {"type": "string"}}}, "type": "object"}, "ProjectDelete": {"required": ["project_uuid"], "properties": {"project_uuid": {"type": "string", "description": "project UUID"}}, "type": "object"}, "ProjectGet": {"required": ["error_msg", "manifest", "project_uuid"], "properties": {"project_uuid": {"type": "string", "description": "project UUID"}, "manifest": {"type": "string", "description": "project manifest"}, "error_msg": {"type": "string", "description": "error message"}}, "type": "object"}, "FilesDelete": {"properties": {"project_uuid": {"type": "string", "description": "project UUID"}, "removed_file": {"type": "string", "description": "deleted file"}, "error_msg": {"type": "string", "description": "error message"}}, "type": "object"}, "FilesPost": {"properties": {"project_uuid": {"type": "string", "description": "project UUID"}, "filename": {"type": "string", "description": "added file"}, "error_msg": {"type": "string", "description": "error message"}}, "type": "object"}, "FilesGet": {"properties": {"project_uuid": {"type": "string", "description": "project UUID"}, "files": {"type": "array", "description": "list of all project files", "items": {"$ref": "#/definitions/File"}}, "error_msg": {"type": "string", "description": "error message"}}, "type": "object"}, "File": {"properties": {"path": {"type": "string"}, "type": {"type": "string"}, "tags": {"type": "array", "items": {"type": "string"}}}, "type": "object"}, "PackagePost": {"properties": {"project_uuid": {"type": "string", "description": "Project UUID"}, "package_name": {"type": "string", "description": "Name of the created package"}, "package_path": {"type": "string", "description": "Path of the created package"}, "error_msg": {"type": "string", "description": "Error message"}}, "type": "object"}}, "responses": {"ParseError": {"description": "When a mask can't be parsed"}, "MaskError": {"description": "When any error occurs on mask"}}, "host": "tng-project.5gtango.eu"}