summaryrefslogtreecommitdiffstats
path: root/docs/sections/apis/mod-onboardingapi.json
diff options
context:
space:
mode:
Diffstat (limited to 'docs/sections/apis/mod-onboardingapi.json')
-rw-r--r--docs/sections/apis/mod-onboardingapi.json597
1 files changed, 597 insertions, 0 deletions
diff --git a/docs/sections/apis/mod-onboardingapi.json b/docs/sections/apis/mod-onboardingapi.json
new file mode 100644
index 00000000..8e8ce9af
--- /dev/null
+++ b/docs/sections/apis/mod-onboardingapi.json
@@ -0,0 +1,597 @@
+{
+ "swagger": "2.0",
+ "basePath": "/onboarding",
+ "paths": {
+ "/components": {
+ "post": {
+ "responses": {
+ "500": {
+ "description": "Internal Server Error"
+ },
+ "409": {
+ "description": "Component already exists",
+ "schema": {
+ "$ref": "#/definitions/Error message"
+ }
+ },
+ "400": {
+ "description": "Bad Request",
+ "schema": {
+ "$ref": "#/definitions/Error message"
+ }
+ },
+ "200": {
+ "description": "Success",
+ "schema": {
+ "$ref": "#/definitions/Component post"
+ }
+ }
+ },
+ "description": "Add a Component to the Catalog",
+ "operationId": "post_component",
+ "parameters": [{
+ "name": "payload",
+ "required": true,
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/Component Spec"
+ }
+ }, {
+ "name": "X-Fields",
+ "in": "header",
+ "type": "string",
+ "format": "mask",
+ "description": "An optional fields mask to support partial object fetching - https://flask-restplus.readthedocs.io/en/stable/mask.html"
+ }],
+ "tags": ["onboarding"]
+ },
+ "get": {
+ "responses": {
+ "500": {
+ "description": "Internal Server Error"
+ },
+ "200": {
+ "description": "Success",
+ "schema": {
+ "$ref": "#/definitions/Component List"
+ }
+ }
+ },
+ "description": "Get list of Components in the catalog",
+ "operationId": "get_components",
+ "parameters": [{
+ "name": "name",
+ "in": "query",
+ "type": "string",
+ "description": "Name of component to filter for"
+ }, {
+ "name": "version",
+ "in": "query",
+ "type": "string",
+ "description": "Version of component to filter for"
+ }, {
+ "name": "X-Fields",
+ "in": "header",
+ "type": "string",
+ "format": "mask",
+ "description": "An optional fields mask to support partial object fetching - https://flask-restplus.readthedocs.io/en/stable/mask.html"
+ }],
+ "tags": ["onboarding"]
+ }
+ },
+ "/components/{component_id}": {
+ "parameters": [{
+ "name": "component_id",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ }],
+ "put": {
+ "responses": {
+ "500": {
+ "description": "Internal Server Error"
+ },
+ "404": {
+ "description": "Component not found in Catalog",
+ "schema": {
+ "$ref": "#/definitions/Error message"
+ }
+ },
+ "400": {
+ "description": "Bad Request",
+ "schema": {
+ "$ref": "#/definitions/Error message"
+ }
+ },
+ "200": {
+ "description": "Success, Component replaced"
+ }
+ },
+ "description": "Replace a Component Spec in the Catalog",
+ "operationId": "put_component",
+ "parameters": [{
+ "name": "payload",
+ "required": true,
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/Component Spec"
+ }
+ }],
+ "tags": ["onboarding"]
+ },
+ "get": {
+ "responses": {
+ "500": {
+ "description": "Internal Server Error"
+ },
+ "404": {
+ "description": "Component not found in Catalog",
+ "schema": {
+ "$ref": "#/definitions/Error message"
+ }
+ },
+ "200": {
+ "description": "Success",
+ "schema": {
+ "$ref": "#/definitions/component fields by id"
+ }
+ }
+ },
+ "description": "Get a Component",
+ "operationId": "get_component",
+ "parameters": [{
+ "name": "X-Fields",
+ "in": "header",
+ "type": "string",
+ "format": "mask",
+ "description": "An optional fields mask to support partial object fetching - https://flask-restplus.readthedocs.io/en/stable/mask.html"
+ }],
+ "tags": ["onboarding"]
+ },
+ "patch": {
+ "responses": {
+ "500": {
+ "description": "Internal Server Error"
+ },
+ "404": {
+ "description": "Component not found in Catalog",
+ "schema": {
+ "$ref": "#/definitions/Error message"
+ }
+ },
+ "403": {
+ "description": "Forbidden Request",
+ "schema": {
+ "$ref": "#/definitions/Error message"
+ }
+ },
+ "400": {
+ "description": "Bad Request",
+ "schema": {
+ "$ref": "#/definitions/Error message"
+ }
+ },
+ "200": {
+ "description": "Success, Component status updated"
+ }
+ },
+ "description": "Update a Component's status in the Catalog",
+ "operationId": "patch_component",
+ "parameters": [{
+ "name": "payload",
+ "required": true,
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/Patch Spec"
+ }
+ }],
+ "tags": ["onboarding"]
+ }
+ },
+ "/dataformats": {
+ "post": {
+ "responses": {
+ "500": {
+ "description": "Internal Server Error"
+ },
+ "409": {
+ "description": "Data Format already exists",
+ "schema": {
+ "$ref": "#/definitions/Error message"
+ }
+ },
+ "400": {
+ "description": "Bad Request",
+ "schema": {
+ "$ref": "#/definitions/Error message"
+ }
+ },
+ "200": {
+ "description": "Success",
+ "schema": {
+ "$ref": "#/definitions/Data Format post"
+ }
+ }
+ },
+ "description": "Add a Data Format to the Catalog",
+ "operationId": "post_dataformat",
+ "parameters": [{
+ "name": "payload",
+ "required": true,
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/Data Format Spec"
+ }
+ }, {
+ "name": "X-Fields",
+ "in": "header",
+ "type": "string",
+ "format": "mask",
+ "description": "An optional fields mask to support partial object fetching - https://flask-restplus.readthedocs.io/en/stable/mask.html"
+ }],
+ "tags": ["onboarding"]
+ },
+ "get": {
+ "responses": {
+ "500": {
+ "description": "Internal Server Error"
+ },
+ "200": {
+ "description": "Success",
+ "schema": {
+ "$ref": "#/definitions/Data Format List"
+ }
+ }
+ },
+ "description": "Get list of Data Formats in the catalog",
+ "operationId": "get_dataformats",
+ "parameters": [{
+ "name": "X-Fields",
+ "in": "header",
+ "type": "string",
+ "format": "mask",
+ "description": "An optional fields mask to support partial object fetching - https://flask-restplus.readthedocs.io/en/stable/mask.html"
+ }],
+ "tags": ["onboarding"]
+ }
+ },
+ "/dataformats/{dataformat_id}": {
+ "parameters": [{
+ "name": "dataformat_id",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ }],
+ "put": {
+ "responses": {
+ "500": {
+ "description": "Internal Server Error"
+ },
+ "404": {
+ "description": "Data Format not found in Catalog",
+ "schema": {
+ "$ref": "#/definitions/Error message"
+ }
+ },
+ "400": {
+ "description": "Bad Request",
+ "schema": {
+ "$ref": "#/definitions/Error message"
+ }
+ },
+ "200": {
+ "description": "Success, Data Format added"
+ }
+ },
+ "description": "Replace a Data Format Spec in the Catalog",
+ "operationId": "put_dataformat",
+ "parameters": [{
+ "name": "payload",
+ "required": true,
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/Data Format Spec"
+ }
+ }],
+ "tags": ["onboarding"]
+ },
+ "get": {
+ "responses": {
+ "500": {
+ "description": "Internal Server Error"
+ },
+ "404": {
+ "description": "Data Format not found in Catalog",
+ "schema": {
+ "$ref": "#/definitions/Error message"
+ }
+ },
+ "200": {
+ "description": "Success",
+ "schema": {
+ "$ref": "#/definitions/dataformat fields by id"
+ }
+ }
+ },
+ "description": "Get a Data Format",
+ "operationId": "get_dataformat",
+ "parameters": [{
+ "name": "X-Fields",
+ "in": "header",
+ "type": "string",
+ "format": "mask",
+ "description": "An optional fields mask to support partial object fetching - https://flask-restplus.readthedocs.io/en/stable/mask.html"
+ }],
+ "tags": ["onboarding"]
+ },
+ "patch": {
+ "responses": {
+ "500": {
+ "description": "Internal Server Error"
+ },
+ "404": {
+ "description": "Data Format not found in Catalog",
+ "schema": {
+ "$ref": "#/definitions/Error message"
+ }
+ },
+ "403": {
+ "description": "Forbidden Request",
+ "schema": {
+ "$ref": "#/definitions/Error message"
+ }
+ },
+ "400": {
+ "description": "Bad Request",
+ "schema": {
+ "$ref": "#/definitions/Error message"
+ }
+ },
+ "200": {
+ "description": "Success, Data Format status updated"
+ }
+ },
+ "description": "Update a Data Format's status in the Catalog",
+ "operationId": "patch_dataformat",
+ "parameters": [{
+ "name": "payload",
+ "required": true,
+ "in": "body",
+ "schema": {
+ "$ref": "#/definitions/Patch Spec"
+ }
+ }],
+ "tags": ["onboarding"]
+ }
+ }
+ },
+ "info": {
+ "title": "DCAE Onboarding HTTP API",
+ "version": "2.12.0"
+ },
+ "produces": ["application/json"],
+ "consumes": ["application/json"],
+ "tags": [{
+ "name": "onboarding",
+ "description": "Default namespace"
+ }],
+ "definitions": {
+ "Component Spec": {
+ "properties": {
+ "owner": {
+ "type": "string"
+ },
+ "spec": {
+ "type": "object",
+ "description": "The Component Spec schema is here -> https://git.onap.org/dcaegen2/platform/cli/plain/component-json-schemas/component-specification/dcae-cli-v2/component-spec-schema.json"
+ }
+ }
+ },
+ "Error message": {
+ "properties": {
+ "message": {
+ "type": "string",
+ "description": ". . . . .Details about the unsuccessful API request"
+ }
+ },
+ "type": "object"
+ },
+ "Component post": {
+ "required": ["componentUrl"],
+ "properties": {
+ "componentUrl": {
+ "type": "string",
+ "description": ". . . . Url to the Component Specification"
+ }
+ },
+ "type": "object"
+ },
+ "Component List": {
+ "properties": {
+ "components": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/component fields"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "component fields": {
+ "required": ["componentType", "componentUrl", "description", "id", "modified", "name", "owner", "status", "version", "whenAdded"],
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": ". . . . ID of the component"
+ },
+ "name": {
+ "type": "string",
+ "description": ". . . . Name of the component"
+ },
+ "version": {
+ "type": "string",
+ "description": ". . . . Version of the component"
+ },
+ "owner": {
+ "type": "string",
+ "description": ". . . . ID of who added the component"
+ },
+ "whenAdded": {
+ "type": "string",
+ "format": "date-time",
+ "description": ". . . . When component was added to the Catalog"
+ },
+ "modified": {
+ "type": "string",
+ "format": "date-time",
+ "description": ". . . . When component was last modified"
+ },
+ "status": {
+ "type": "string",
+ "description": ". . . . Status of the component"
+ },
+ "description": {
+ "type": "string",
+ "description": ". . . . Description of the component"
+ },
+ "componentType": {
+ "type": "string",
+ "description": ". . . . only \"docker\""
+ },
+ "componentUrl": {
+ "type": "string",
+ "description": ". . . . Url to the Component Specification"
+ }
+ },
+ "type": "object"
+ },
+ "Patch Spec": {
+ "required": ["owner", "status"],
+ "properties": {
+ "owner": {
+ "type": "string",
+ "description": "User ID"
+ },
+ "status": {
+ "type": "string",
+ "description": ". . . . .[published] is the only status change supported right now",
+ "example": "published",
+ "enum": ["published", "revoked"]
+ }
+ },
+ "type": "object"
+ },
+ "component fields by id": {
+ "allOf": [{
+ "$ref": "#/definitions/component fields"
+ }, {
+ "required": ["spec"],
+ "properties": {
+ "spec": {
+ "type": "object",
+ "description": "The Component Specification (json)"
+ }
+ },
+ "type": "object"
+ }]
+ },
+ "Data Format Spec": {
+ "properties": {
+ "owner": {
+ "type": "string"
+ },
+ "spec": {
+ "type": "object",
+ "description": "The Data Format Spec schema is here -> https://git.onap.org/dcaegen2/platform/cli/plain/component-json-schemas/data-format/dcae-cli-v1/data-format-schema.json"
+ }
+ }
+ },
+ "Data Format post": {
+ "required": ["dataFormatUrl"],
+ "properties": {
+ "dataFormatUrl": {
+ "type": "string",
+ "description": ". . . . Url to the Data Format Specification"
+ }
+ },
+ "type": "object"
+ },
+ "Data Format List": {
+ "properties": {
+ "dataFormats": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/dataformat fields"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "dataformat fields": {
+ "required": ["dataFormatUrl", "description", "id", "modified", "name", "owner", "status", "version", "whenAdded"],
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": ". . . . ID of the data format"
+ },
+ "name": {
+ "type": "string",
+ "description": ". . . . Name of the data format"
+ },
+ "version": {
+ "type": "string",
+ "description": ". . . . Version of the data format"
+ },
+ "owner": {
+ "type": "string",
+ "description": ". . . . ID of who added the data format"
+ },
+ "whenAdded": {
+ "type": "string",
+ "format": "date-time",
+ "description": ". . . . When data format was added to the Catalog"
+ },
+ "modified": {
+ "type": "string",
+ "format": "date-time",
+ "description": ". . . . When data format was last modified"
+ },
+ "status": {
+ "type": "string",
+ "description": ". . . . Status of the data format"
+ },
+ "description": {
+ "type": "string",
+ "description": ". . . . Description of the data format"
+ },
+ "dataFormatUrl": {
+ "type": "string",
+ "description": ". . . . Url to the Data Format Specification"
+ }
+ },
+ "type": "object"
+ },
+ "dataformat fields by id": {
+ "allOf": [{
+ "$ref": "#/definitions/dataformat fields"
+ }, {
+ "required": ["spec"],
+ "properties": {
+ "spec": {
+ "type": "object",
+ "description": "The Data Format Specification (json)"
+ }
+ },
+ "type": "object"
+ }]
+ }
+ },
+ "responses": {
+ "ParseError": {
+ "description": "When a mask can't be parsed"
+ },
+ "MaskError": {
+ "description": "When any error occurs on mask"
+ }
+ }
+} \ No newline at end of file