summaryrefslogtreecommitdiffstats
path: root/docs/api-reference
diff options
context:
space:
mode:
Diffstat (limited to 'docs/api-reference')
-rw-r--r--docs/api-reference/bp-processor.rst10
-rw-r--r--docs/api-reference/media/api-doc-template.txt (renamed from docs/api-reference/api-doc-template.rst)3
-rw-r--r--docs/api-reference/media/cds-bp-processor-api-swagger.json292
3 files changed, 216 insertions, 89 deletions
diff --git a/docs/api-reference/bp-processor.rst b/docs/api-reference/bp-processor.rst
index eb29b093c..efb56b117 100644
--- a/docs/api-reference/bp-processor.rst
+++ b/docs/api-reference/bp-processor.rst
@@ -11,7 +11,7 @@ Introduction
This section shows all resources and endpoints which CDS BP processor currently provides through a swagger file
which is automatically created during CDS build process by Swagger Maven Plugin. A corresponding Postman collection is
also included. Endpoints can also be described using this template
-:download:`api-doc-template.rst <api-doc-template.rst>` but this is not the preferred way to describe the CDS API.
+:download:`api-doc-template.rst <media/api-doc-template.txt>` but this is not the preferred way to describe the CDS API.
You can find a sample workflow tutorial :ref:`below <workflow-tutorial>` which will show how to use the endpoints
in the right order. This will give you a better understanding of the CDS Blueprint Processor API.
@@ -83,9 +83,6 @@ HTTP Status 202 OK
"mappings": {
"dispatcherHandlers": {
"webHandler": [
-
- ...
-
{
"predicate": "{GET /api/v1/blueprint-model, produces [application/json]}",
"handler": "org.onap.ccsdk.cds.blueprintsprocessor.designer.api.BlueprintModelController#allBlueprintModel()",
@@ -144,9 +141,6 @@ HTTP Status 202 OK
}
}
}
-
- ...
-
]
}
},
@@ -247,4 +241,4 @@ Take care that the last step will fail if you don't have a netconf server set up
:width: 500pt
.. |saveResponseImage| image:: media/save-response-postman.png
- :width: 500pt \ No newline at end of file
+ :width: 500pt
diff --git a/docs/api-reference/api-doc-template.rst b/docs/api-reference/media/api-doc-template.txt
index a0dc0cec5..a983a8cfe 100644
--- a/docs/api-reference/api-doc-template.rst
+++ b/docs/api-reference/media/api-doc-template.txt
@@ -175,9 +175,6 @@ Related topics
.. toctree::
:maxdepth: 1
- topic1
- topic2
-
Method 2 Endpoint 1
~~~~~~~~~~~~~~~~~~~~
diff --git a/docs/api-reference/media/cds-bp-processor-api-swagger.json b/docs/api-reference/media/cds-bp-processor-api-swagger.json
index 606d0b861..de7e94c6a 100644
--- a/docs/api-reference/media/cds-bp-processor-api-swagger.json
+++ b/docs/api-reference/media/cds-bp-processor-api-swagger.json
@@ -998,32 +998,6 @@
}
}
},
- "/api/v1/model-type/" : {
- "post" : {
- "tags" : [ "Model Type Catalog" ],
- "summary" : "Save a model type",
- "description" : "Save a model type by model type definition provided.",
- "operationId" : "ModelTypeController_saveModelType_POST.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "consumes" : [ "application/json" ],
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "in" : "body",
- "name" : "body",
- "required" : false,
- "schema" : {
- "$ref" : "#/definitions/ModelType"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "$ref" : "#/definitions/ModelType"
- }
- }
- }
- }
- },
"/api/v1/model-type/by-definition/{definitionType}" : {
"get" : {
"tags" : [ "Model Type Catalog" ],
@@ -1179,7 +1153,7 @@
"tags" : [ "Resources" ],
"summary" : "Delete resources using resolution key",
"description" : "Delete all the resources associated to a resolution-key using blueprint metadata, artifact name and the resolution-key.",
- "operationId" : "ResourceController_deleteByBlueprintNameAndBlueprintVersionAndArtifactNameAndResolutionKey_DELETE.org.onap.ccsdk.cds.blueprintsprocessor.resource.api",
+ "operationId" : "ResourceController_deleteResolutions_DELETE.org.onap.ccsdk.cds.blueprintsprocessor.resource.api",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "bpName",
@@ -1203,14 +1177,106 @@
"name" : "resolutionKey",
"in" : "query",
"description" : "Resolution Key associated with the resolution",
+ "required" : false,
+ "type" : "string"
+ }, {
+ "name" : "resourceType",
+ "in" : "query",
+ "description" : "resourceType associated with the resolution, must be used with resourceId",
+ "required" : false,
+ "type" : "string"
+ }, {
+ "name" : "resourceId",
+ "in" : "query",
+ "description" : "Resolution Key associated with the resolution, must be used with resourceType",
+ "required" : false,
+ "type" : "string"
+ }, {
+ "name" : "lastN",
+ "in" : "query",
+ "description" : "Only delete last N occurrences",
+ "required" : false,
+ "type" : "integer",
+ "format" : "int32"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "object"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/resources/occurrences" : {
+ "get" : {
+ "tags" : [ "Resources" ],
+ "summary" : "Get the map of resolved resources with 'occurrence' as the keys to the resolved resources ",
+ "description" : "With optional 'occurrence' options, subset of stored resolved resources can be retrieved using the blueprint name, blueprint version, artifact name and the resolution-key.",
+ "operationId" : "ResourceController_getOccurrences_GET.org.onap.ccsdk.cds.blueprintsprocessor.resource.api",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "bpName",
+ "in" : "query",
+ "description" : "Name of the CBA.",
"required" : true,
"type" : "string"
+ }, {
+ "name" : "bpVersion",
+ "in" : "query",
+ "description" : "Version of the CBA.",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "artifactName",
+ "in" : "query",
+ "description" : "Artifact name for which to retrieve a resolved resource.",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "resolutionKey",
+ "in" : "query",
+ "description" : "Resolution Key associated with the resolution.",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "firstN",
+ "in" : "query",
+ "description" : "Number of earlier N occurrences of the resolutions.",
+ "required" : false,
+ "type" : "integer",
+ "format" : "int32"
+ }, {
+ "name" : "lastN",
+ "in" : "query",
+ "description" : "Number of latest N occurrences of the resolutions.",
+ "required" : false,
+ "type" : "integer",
+ "format" : "int32"
+ }, {
+ "name" : "begin",
+ "in" : "query",
+ "description" : "For Range option - 'begin' is the start occurrence of range of the resolutions.",
+ "required" : false,
+ "type" : "integer",
+ "format" : "int32"
+ }, {
+ "name" : "end",
+ "in" : "query",
+ "description" : "For Range option - 'end' is the end occurrence of the range of the resolutions.",
+ "required" : false,
+ "type" : "integer",
+ "format" : "int32"
} ],
"responses" : {
"200" : {
"description" : "successful operation",
"schema" : {
- "$ref" : "#/definitions/Unit"
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ResourceResolution"
+ }
}
}
}
@@ -1258,7 +1324,80 @@
"200" : {
"description" : "successful operation",
"schema" : {
- "$ref" : "#/definitions/ResourceResolution"
+ "type" : "object"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/template/occurrences" : {
+ "get" : {
+ "tags" : [ "Resource template" ],
+ "summary" : "Get the map of resolved templates with 'occurrence' as the keys to the resolved templates ",
+ "description" : "With optional 'occurrence' options, subset of stored resolved templates can be retrieved using the blueprint name, blueprint version, artifact name and the resolution-key.",
+ "operationId" : "TemplateController_getOccurrences_GET.org.onap.ccsdk.cds.blueprintsprocessor.resource.api",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "bpName",
+ "in" : "query",
+ "description" : "Name of the CBA.",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "bpVersion",
+ "in" : "query",
+ "description" : "Version of the CBA.",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "artifactName",
+ "in" : "query",
+ "description" : "Artifact name for which to retrieve a resolved resource.",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "resolutionKey",
+ "in" : "query",
+ "description" : "Resolution Key associated with the resolution.",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "firstN",
+ "in" : "query",
+ "description" : "Number of earlier N occurrences of the templates.",
+ "required" : false,
+ "type" : "integer",
+ "format" : "int32"
+ }, {
+ "name" : "lastN",
+ "in" : "query",
+ "description" : "Number of latest N occurrences of the templates.",
+ "required" : false,
+ "type" : "integer",
+ "format" : "int32"
+ }, {
+ "name" : "begin",
+ "in" : "query",
+ "description" : "For Range option - 'begin' is the start occurrence of range of the templates.",
+ "required" : false,
+ "type" : "integer",
+ "format" : "int32"
+ }, {
+ "name" : "end",
+ "in" : "query",
+ "description" : "For Range option - 'end' is the end occurrence of the range of the templates.",
+ "required" : false,
+ "type" : "integer",
+ "format" : "int32"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/TemplateResolution"
+ }
}
}
}
@@ -1612,19 +1751,13 @@
"JsonNode" : {
"type" : "object",
"properties" : {
- "array" : {
- "type" : "boolean"
- },
- "null" : {
- "type" : "boolean"
- },
"float" : {
"type" : "boolean"
},
- "bigInteger" : {
+ "array" : {
"type" : "boolean"
},
- "bigDecimal" : {
+ "null" : {
"type" : "boolean"
},
"valueNode" : {
@@ -1655,25 +1788,31 @@
"type" : "string",
"enum" : [ "ARRAY", "BINARY", "BOOLEAN", "MISSING", "NULL", "NUMBER", "OBJECT", "POJO", "STRING" ]
},
+ "object" : {
+ "type" : "boolean"
+ },
"number" : {
"type" : "boolean"
},
- "binary" : {
+ "bigDecimal" : {
"type" : "boolean"
},
- "boolean" : {
+ "bigInteger" : {
"type" : "boolean"
},
"double" : {
"type" : "boolean"
},
+ "long" : {
+ "type" : "boolean"
+ },
"int" : {
"type" : "boolean"
},
- "long" : {
+ "boolean" : {
"type" : "boolean"
},
- "object" : {
+ "binary" : {
"type" : "boolean"
}
}
@@ -1839,6 +1978,13 @@
"type" : "integer",
"format" : "int64"
},
+ "number" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "sort" : {
+ "$ref" : "#/definitions/Sort"
+ },
"size" : {
"type" : "integer",
"format" : "int32"
@@ -1849,12 +1995,11 @@
"type" : "object"
}
},
- "number" : {
- "type" : "integer",
- "format" : "int32"
+ "first" : {
+ "type" : "boolean"
},
- "sort" : {
- "$ref" : "#/definitions/Sort"
+ "last" : {
+ "type" : "boolean"
},
"pageable" : {
"$ref" : "#/definitions/Pageable"
@@ -1863,12 +2008,6 @@
"type" : "integer",
"format" : "int32"
},
- "last" : {
- "type" : "boolean"
- },
- "first" : {
- "type" : "boolean"
- },
"empty" : {
"type" : "boolean"
}
@@ -1885,6 +2024,13 @@
"type" : "integer",
"format" : "int64"
},
+ "number" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "sort" : {
+ "$ref" : "#/definitions/Sort"
+ },
"size" : {
"type" : "integer",
"format" : "int32"
@@ -1895,12 +2041,11 @@
"$ref" : "#/definitions/BlueprintModelSearch"
}
},
- "number" : {
- "type" : "integer",
- "format" : "int32"
+ "first" : {
+ "type" : "boolean"
},
- "sort" : {
- "$ref" : "#/definitions/Sort"
+ "last" : {
+ "type" : "boolean"
},
"pageable" : {
"$ref" : "#/definitions/Pageable"
@@ -1909,12 +2054,6 @@
"type" : "integer",
"format" : "int32"
},
- "last" : {
- "type" : "boolean"
- },
- "first" : {
- "type" : "boolean"
- },
"empty" : {
"type" : "boolean"
}
@@ -1923,18 +2062,12 @@
"Pageable" : {
"type" : "object",
"properties" : {
- "offset" : {
- "type" : "integer",
- "format" : "int64"
- },
"sort" : {
"$ref" : "#/definitions/Sort"
},
- "paged" : {
- "type" : "boolean"
- },
- "unpaged" : {
- "type" : "boolean"
+ "offset" : {
+ "type" : "integer",
+ "format" : "int64"
},
"pageNumber" : {
"type" : "integer",
@@ -1943,6 +2076,12 @@
"pageSize" : {
"type" : "integer",
"format" : "int32"
+ },
+ "paged" : {
+ "type" : "boolean"
+ },
+ "unpaged" : {
+ "type" : "boolean"
}
}
},
@@ -2206,13 +2345,13 @@
"Sort" : {
"type" : "object",
"properties" : {
- "unsorted" : {
+ "empty" : {
"type" : "boolean"
},
- "sorted" : {
+ "unsorted" : {
"type" : "boolean"
},
- "empty" : {
+ "sorted" : {
"type" : "boolean"
}
}
@@ -2265,9 +2404,6 @@
}
}
},
- "Unit" : {
- "type" : "object"
- },
"WorkFlowSpecRequest" : {
"type" : "object",
"required" : [ "blueprintName", "workflowName" ],