1 .. This work is licensed under a Creative Commons Attribution 4.0
2 .. International License. http://creativecommons.org/licenses/by/4.0
3 .. Copyright (C) 2020 Deutsche Telekom AG.
5 Blueprint Processor API Reference
6 ==================================
11 This section shows all resources and endpoints which CDS BP processor currently provides with sample requests/responses,
12 parameter description and other information. If there is a new API and you want do document it, you can use this template
13 :download:`rst <api-doc-template.rst>`.
18 Use Basic athentification with `ccsdkapps` as a username and password, in Header ``Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==``.
23 You can find a postman collection including sample requests here: :download:`JSON <media/bp-processor.postman_collection.json>`
28 All endpoints are accessable under ``http://{{host}}:{{port}}/api/v1/``. Host and port depends on your CDS BP processor
35 Lists all available endpoints from blueprints processor API.
41 GET ``http://{{host}}:{{port}}/actuator/mappings``
42 ....................................................
44 Lists all endpoints from blueprints processor.
49 curl --location --request GET 'http://localhost:8081/actuator/mappings' \
50 --header 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw=='
59 :caption: **sample response body**
65 "dispatcherHandlers": {
71 "predicate": "{GET /api/v1/blueprint-model, produces [application/json]}",
72 "handler": "org.onap.ccsdk.cds.blueprintsprocessor.designer.api.BlueprintModelController#allBlueprintModel()",
75 "className": "org.onap.ccsdk.cds.blueprintsprocessor.designer.api.BlueprintModelController",
76 "name": "allBlueprintModel",
77 "descriptor": "()Ljava/util/List;"
79 "handlerFunction": null,
80 "requestMappingConditions": {
88 "/api/v1/blueprint-model"
92 "mediaType": "application/json",
100 "predicate": "{GET /api/v1/blueprint-model/meta-data/{keyword}, produces [application/json]}",
101 "handler": "org.onap.ccsdk.cds.blueprintsprocessor.designer.api.BlueprintModelController#allBlueprintModelMetaData(String, Continuation)",
104 "className": "org.onap.ccsdk.cds.blueprintsprocessor.designer.api.BlueprintModelController",
105 "name": "allBlueprintModelMetaData",
106 "descriptor": "(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;"
108 "handlerFunction": null,
109 "requestMappingConditions": {
117 "/api/v1/blueprint-model/meta-data/{keyword}"
121 "mediaType": "application/json",
139 Blueprint Model Catalog API
140 ----------------------------
142 Blueprint-model resource contains all Controller Blueprints Archive (CBA) packages which are available in CDS.
143 With blueprint-model API you can manage your CBAs.
148 POST ``/blueprint-model/bootstrap``
149 ....................................
151 Loads all Model Types, Resource Dictionaries and CBAs which are included in CDS by default.
158 :caption: **sample request**
160 curl --location --request POST 'http://localhost:8081/api/v1/blueprint-model/bootstrap' \
161 --header 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' \
162 --header 'Content-Type: application/json' \
164 "loadModelType" : true,
165 "loadResourceDictionary" : true,
169 **Request Body Parameters:**
182 - Specifies if default model types should be loaded
183 * - loadResourceDictionary
186 - Specifies if default data dictionaries should be loaded
190 - Specifies if default CBAs should be loaded
193 ......................
204 Functional Description
205 ..............................
207 Before starting to work with CDS, bootstrap should be called to load all the basic models that each orginization might support.
208 Parameter values can be set as `false` to skip loading e.g. the Resource Dictioniaries but this is not recommended.
209 The loaded CBAs are already enriched, that's why CBAs can be loaded even without Data Dictionaries or Model Types. If
210 validation of a CBA fails the CBA is skipped and the call is still executed successfully. You can find the error logs e.g.
211 in the console of an IDE.
214 Technical Description
215 ...........................
217 All Model Types which are loaded by bootstrap are in folder `/components/model-catalog/definition-type/starter-type`,
218 all Resource Dictionaries in `components/model-catalog/resource-dictionary/starter-dictionary`, all CBAs in
219 `model-catalog/blueprint-model/service-blueprint`.
221 **Called class/method:** ``org.onap.ccsdk.cds.blueprintsprocessor.designer.api.BlueprintModelController#bootstrap``.
229 ../modelingconcepts/cba
230 ../modelingconcepts/data-dictionary
231 ../modelingconcepts/data-type
234 List all blueprint models
235 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
238 GET ``/blueprint-model``
239 ..............................
241 Lists all blueprint models which are saved in CDS.
247 :caption: **request**
249 curl --location --request GET 'http://{{ip_adress}}:{{port}}/api/v1/blueprint-model' \
250 --header 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw=='
259 ......................
264 :caption: **example response**
269 "id": "109e725d-5145-4f70-a2e7-ee6640e2fb5f",
270 "artifactUUId": null,
271 "artifactType": "SDNC_MODEL",
272 "artifactVersion": "1.0.0",
273 "artifactDescription": "",
274 "internalVersion": null,
275 "createdDate": "2020-11-09T19:00:20.000Z",
276 "artifactName": "vLB_CDS_RESTCONF",
278 "updatedBy": "DanielEmmarts>",
284 "id": "5cce3804-09eb-473d-b513-81f8547a7240",
285 "artifactUUId": null,
286 "artifactType": "SDNC_MODEL",
287 "artifactVersion": "1.0.0",
288 "artifactDescription": "",
289 "internalVersion": null,
290 "createdDate": "2020-11-09T19:00:20.000Z",
291 "artifactName": "vLB_CDS",
293 "updatedBy": "TomKennedy>",
299 Technical Description
300 ...........................
302 Loads all Blueprint Models which are saved in the CDS database in table `BLUEPRINT_MODEL`. Unpublished and unproceeded
303 Blueprint Models are also included.
304 **Called class/method:** ``org.onap.ccsdk.cds.blueprintsprocessor.designer.api.BlueprintModelController#allBlueprintModel()``.