Chore: Fix typo in INFO
[externalapi/nbi.git] / docs / offeredapis / api_serviceCatalog / swagger.yaml
1 #    Copyright (c) 2018 Orange
2 #
3 #    Licensed under the Apache License, Version 2.0 (the "License");
4 #    you may not use this file except in compliance with the License.
5 #    You may obtain a copy of the License at
6 #
7 #        http://www.apache.org/licenses/LICENSE-2.0
8 #
9 #    Unless required by applicable law or agreed to in writing, software
10 #    distributed under the License is distributed on an "AS IS" BASIS,
11 #    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 #    See the License for the specific language governing permissions and
13 #    limitations under the License.swagger: "2.0"
14 swagger: "2.0"
15 info:
16   description: "# About the ONAP Service Catalog API\n The Service Catalog API is based on a subset of the TM Forum 633 Service Catalog Management API.\n## API Overview\n### General Description \nThis Service Catalog API is used to retrieve as well as create the Service Specifications that ONAP supports. As Services are designed and distributed in ONAP SDC, the Service Catalog API allows external systems such as the Business Support Systems (BSS) to discover and create these Services\n\nThe Service Design Center (SDC) of ONAP allows for the design of Services that can be orchestrated by ONAP. ONAP SDC provides the tools to design the Services composition and topology, which is then represented in TOSCA. This Service Catalog API allows a REST API JSON representation of the Service, including the required attributes needed for Service Instantiation of this Service Topology.\n### Relationship and Dependencies\n This Service Catalog API is related to the TM Forum 633 Service Catalog Management API and also to MEF LSO LEGATO Service Catalog API.\n\nThis API takes a subset of the Service Catalog Management API, namely the ServiceSpecification resource, and maps this standard resource to the ONAP SDC Service Templates/Topology. By doing this we allow a well known, standardized JSON REST representation of the Service Templates available in ONAP to be potentially ordered via Service Orders. \n\n### API Structure and Approach\nThe Service Catalog API can be used to get the details of a specific ONAP Service Template, or can be used to search/list the Service Templates that are available. \n## Getting Started with the API (Hello World)\nThe Service Catalog API is available via two schemes, http and https. For interacting with the API the simplest method is via http. To interact with the this API via https, your Client would be required to load the neccessary https certificate. \n\nThe default installation of ONAP via OOM, will configure the use of two Node ports for External APIs. NodePorts are used to allow client applications, that run outside of Kubernetes, access to ONAP components deployed by OOM. For this Service Catalog API, the External API Framework has a http Node port of 30274. For https, the Node port is 30292.\n\n From outside ONAP, a client can interact with External API by first getting the IP that the NBI docker container is running on, and then using the appropriate nodeport according to the access scheme. For example to access this Service Catalog API to retrieve a list of all Service Specifications available in ONAP you can use http method GET to http://{nbi_ip}:30274/nbi/api/v4/serviceSpecification/ \n### SDK quick intro\nThere are many tools that can be used to view and edit this swagger file like swagger editor, Atom and senya. For example this swagger file can be loaded into https://editor.swagger.io/. This UI acts both as an online editor and viewer. \n### How to start the client side implementation\n* Code generation, is available via the Generate Client option in the swagger editor. Client stubs can be generated in multiple languages, for example java, go, python etc. These Client stub code can be incorporated in the Application you wish to access the Service Catalog API from.\n\n### How to start the server side implementation\n* Not applicable, the service side for this API will be the NBI container running the External API Framework Springboot application.\n\n## API Description\nIncludes summary of information drawn from API definitions in OpenAPI / Swagger files\n### Resource Endpoint / Resource Quick Reference\nGET /serviceSpecification/ : This operation returns a list service specifications from a catalog\n\nPOST /serviceSpecification/ : This operation creates a service specification in catalog\n\nGET /serviceSpecification/{id} : This operation returns the service specifications from a catalog associated with this id. Note the id maps to the uuid of the SDC Service Template in the SDC catalog\n\nGET /serviceSpecification/{id}/specificationInputSchema : This operation returns a service specification Input schema by its id from a catalog. Note again the id corresponds to the uuid of the Service Template in SDC.\n\n### Data Schema\n#### Main API Entities\nDescribe the major entities used in the API\n\nThe main entity of the API is the ServiceSpecification resource. This entity is the top level entity of the API, and is returned as either a single instance when queried with id, or as JSON arroy of ServiceSpecification entities when queried as a list.\n\nThe major child enties are relatedParty which points to the designer of the Template in SDC. The resourceSpecification which point to child resources for the Service Template. The serviceSpecCharacteristics entities are used to describe the attributes that can be supplied to instantiate a Service Instance of this Service Template.\n#### Payload data structures\nIf any, describe the appropriate data structures that are included within payload of the API.\n\nNot applicable\n### Security on the API\nAuthentication; Authorization; Credentials/access token; etc.\n\n https certificate required if using https. No authentication on http requests.In production this API should be behind an API Gateway with the necessary authentication\n### Response Codes\nThe meaning of Status Codes & Errors\n\nSee response codes for each API resource in the API section below\n### Rate Limits and Thresholds\nRequests per unit time allowed; Pagination\n\n No rate limits or thresholds, in production this API should be behind an API Gateway with the necessary limits.\n### Validation constraints\nDescribe any behavioral and structural validation constraints\n\nNot applicable\n### Assumptions\nFor example, any Pre/Post conditions\n\n For this API to function and return Service Specifications, SDC is required to be running and Service models designed in the SDC catalog\n## API Interactions and Flows\n### Interaction Examples\nIllustrate sequence of client calls to this API, possibly based on Use Cases, presented with diagrams, tables, etc\n\nThe Service Catalog API flow of use can generally follow the sequence below\n\n\n#### Call ONAP to discover what available services it can offer\n\n```\ncurl -X GET \"http://serverRoot:30274/nbi/api/v4/serviceSpecification/\" -H \"accept: application/json;charset=utf-8\"\n```\n#### Example Response Values\n```\n[\n  {\r\n        \"id\": \"0ec83a1f-51e7-44e7-b773-3f37ddb937cd\",\r\n        \"name\": \"EPLServiceTemplate\",\r\n        \"invariantUUID\": \"ddf31f35-8e71-4f5a-a383-4241b87ca7a7\",\r\n        \"category\": \"Network L4+\",\r\n        \"distributionStatus\": \"DISTRIBUTED\",\r\n        \"version\": \"1.0\",\r\n        \"lifecycleStatus\": \"CERTIFIED\",\r\n        \"relatedParty\": {\r\n            \"id\": \"jm0007\",\r\n            \"role\": \"lastUpdater\"\r\n        }\r\n    }\n]\n```\n#### Using the id returned from the list of Service Specifications, drill into any specific Service Specificaton you want to orchestrate/order using\n\n```\ncurl -X GET \"http://serverRoot:30274/nbi/api/v4/serviceSpecification/0ec83a1f-51e7-44e7-b773-3f37ddb937cd\" -H \"accept: application/json;charset=utf-8\"\n```\n#### Example Response Values\n```\n{\r\n    \"id\": \"0ec83a1f-51e7-44e7-b773-3f37ddb937cd\",\r\n    \"name\": \"EPLServiceTemplate\",\r\n    \"invariantUUID\": \"ddf31f35-8e71-4f5a-a383-4241b87ca7a7\",\r\n    \"toscaModelURL\": \"\/sdc\/v1\/catalog\/services\/0ec83a1f-51e7-44e7-b773-3f37ddb937cd\/toscaModel\",\r\n    \"category\": \"Network L4+\",\r\n    \"distributionStatus\": \"DISTRIBUTED\",\r\n    \"version\": \"1.0\",\r\n    \"lifecycleStatus\": \"CERTIFIED\",\r\n    \"relatedParty\": {\r\n        \"id\": \"jm0007\",\r\n        \"name\": \"Joni Mitchell\",\r\n        \"role\": \"lastUpdater\"\r\n    },\r\n    \"resourceSpecification\": [\r\n        {\r\n            \"id\": \"ec910118-ba94-4517-98b5-5bc10f277f4a\",\r\n            \"version\": \"1.0\",\r\n            \"name\": \"TestVF_1579291137027\",\r\n            \"resourceInstanceName\": \"TestVF_1579291137027 0\",\r\n            \"modelCustomizationName\": \"TestVF_1579291137027 0\",\r\n            \"resourceInvariantUUID\": \"df329320-fe21-49c2-96a8-7217ac7143de\",\r\n            \"resourceType\": \"VF\",\r\n            \"@type\": \"ONAPresource\",\r\n            \"modelCustomizationId\": \"ad5fb501-e472-4d79-a303-1a4a56c0fa75\"\r\n        }\r\n    ],\r\n    \"href\": \"serviceSpecification\/0ec83a1f-51e7-44e7-b773-3f37ddb937cd\",\r\n    \"attachment\": [],\r\n    \"@type\": \"ONAPservice\",\r\n    \"instantiationType\": \"A-la-carte\",\r\n    \"serviceSpecCharacteristic\": {\r\n        \"name\": \"TestService_1579291137027_ServiceCharacteristics\",\r\n        \"description\": \"This object describes all the inputs needed from the client to interact with the TestService_1579291137027 Service Topology\",\r\n        \"valueType\": \"object\",\r\n        \"@type\": \"ONAPServiceCharacteristic\",\r\n        \"@schemaLocation\": \"null\",\r\n        \"serviceSpecCharacteristicValue\": {\r\n            \"valueType\": \"object\",\r\n            \"@schemaLocation\": \"\/serviceSpecification\/0ec83a1f-51e7-44e7-b773-3f37ddb937cd\/specificationInputSchema\",\r\n            \"@type\": \"TestService_1579291137027_ServiceCharacteristic\"\r\n        }\r\n    }\r\n}\n```\n\n#### To access Json Schema of the Parameters required to instantiate the Service from this Service Specification\n\n```\ncurl -X GET \"http://serverRoot:30274/nbi/api/v4/serviceSpecification/0ec83a1f-51e7-44e7-b773-3f37ddb937cd/specificationInputSchema\" -H \"accept: application/json;charset=utf-8\"\n```\n#### Example Response Values\n```\n{\r\n  \"ServiceCharacteristics\" : {\r\n    \"required\" : [ \"mscmevcendpointa_evcendpoint_endPointId\", \"mscmevcendpointz_evcendpoint_endPointId\", \"mscmsubscriberunia_subscriberuni_uniIdentifier\", \"mscmsubscriberuniz_subscriberuni_uniIdentifier\" ],\r\n    \"properties\" : {\r\n      \"mscmevcendpointa_evcendpoint_map\" : {\r\n        \"type\" : \"string\",\r\n        \"description\" : \"\"\r\n      },\r\n      \"mscmsubscriberunia_subscriberuni_uniIdentifier\" : {\r\n        \"type\" : \"string\",\r\n        \"description\" : \"String that is used to allow the Sub-scriber and Service Provider to uniquely identify the UNI for oper-ations purposes.\"\r\n      },\r\n      \"mscmevc0_evc_evcType\" : {\r\n        \"type\" : \"string\",\r\n        \"description\" : \"Point-to-Point, Multipoint-to-Mul-tipoint, or Rooted-Multipoint.\"\r\n      },\r\n      \"mscmevcendpointz_evcendpoint_map\" : {\r\n        \"type\" : \"string\",\r\n        \"description\" : \"\"\r\n      },\r\n      \"mscmevcendpointz_evcendpoint_endPointUni\" : {\r\n        \"type\" : \"string\",\r\n        \"description\" : \"Specify the UNI where the EvcEndPoint is located. The EvcEndPoint is said to be at this Uni.\"\r\n      },\r\n      \"mscmevcendpointz_evcendpoint_ingressBwp\" : {\r\n        \"type\" : \"string\",\r\n        \"description\" : \"\"\r\n      },\r\n      \"mscmsubscriberuniz_subscriberuni_uniIdentifier\" : {\r\n        \"type\" : \"string\",\r\n        \"description\" : \"String that is used to allow the Sub-scriber and Service Provider to uniquely identify the UNI for oper-ations purposes.\"\r\n      },\r\n      \"mscmevcendpointz_evcendpoint_endPointId\" : {\r\n        \"type\" : \"string\",\r\n        \"description\" : \"A string that is used to allow the Subscriber and Service Provider to uniquely identify the EvcEndPoint for operations purposes.\"\r\n      },\r\n      \"mscmevcendpointa_evcendpoint_endPointId\" : {\r\n        \"type\" : \"string\",\r\n        \"description\" : \"A string that is used to allow the Subscriber and Service Provider to uniquely identify the EvcEndPoint for operations purposes.\"\r\n      },\r\n      \"mscmevcendpointa_evcendpoint_ingressBwp\" : {\r\n        \"type\" : \"string\",\r\n        \"description\" : \"\"\r\n      },\r\n\"mscmevc0_evc_listOfEvcEps\" : {\r\n        \"type\" : \"array\",\r\n        \"description\" : \"A list of EVC EP ID Service Attribute values.\"\r\n      },\r\n      \"mscmevc0_evc_evcId\" : {\r\n        \"type\" : \"string\",\r\n        \"description\" : \"\"\r\n      },\r\n      \"mscmevcendpointa_evcendpoint_endPointUni\" : {\r\n        \"type\" : \"string\",\r\n        \"description\" : \"Specify the UNI where the EvcEndPoint is located. The EvcEndPoint is said to be at this Uni.\"\r\n      }\r\n    }\r\n  }\r\n\n```\n\n## Tutorials\nReference any tutorials or use cases. May use links.\n\nTo learn how the  BBS use case used these APIs, please find the Low Level Designs at:\nhttps://wiki.onap.org/pages/viewpage.action?pageId=48532377\n\n## API Mapping Details\nIncludes:\n* Mapping between use cases/requirements and API calls. The BBS Use case used the Service Catalog API to learn the details of the Broad Service. This ServiceSpecification was then included in a Product Ordering as a Service Candidate from the BSS system.\n\n## Glossary\n### API Version\n\nThe version number has major, minor and revision numbers. E.g. v4.1.0 Only the major version number (without the minor number and revision number) is held in the URL. APIs are described with a major version with “v” following the API Name, e.g.: nbi/api/v4/serviceSpecification. The schema associated with a REST API must have its version number aligned with that of the REST API.\n\nThe major version number is incremented for an incompatible change. The minor version number is incremented for a compatible change. For minor modifications of the API, version numbering must not be updated, provided the following backward compatibility rules are respected:\n* New elements in a data type must be optional (minOccurs=0)\n* Changes in the cardinality of an attribute in a data type must be from mandatory to optional or from lower to greater\n* New attributes defined in an element must be optional (absence of use=”required”)\n* If new enumerated values are included, the former ones and its meaning must be kept\n* If new operations are added, the existing operations must be kept\n* New parameters added to existing operations must be optional and existing parameters must be kept\n\nFor major modifications of the API, not backward compatible and forcing client implementations to be changed, the major version number must be updated."
17   version: "4.1.0"
18   title: "ServiceCatalog API"
19   contact:
20     name: "ONAP"
21     url: "https://onap.readthedocs.io"
22     email: "onap-discuss@lists.onap.org"
23   license:
24     name: "Apache 2.0"
25     url: "http://www.apache.org/licenses/LICENSE-2.0"
26   x-planned-retirement-date: "205001"
27   x-component: "NBI"
28   x-logo:
29     url: "/redoc/logo.png"
30     backgroundColor: "#FFFFFF"
31 host: "serverRoot:30274"
32 basePath: "/nbi/api/v4"
33 schemes:
34   - "http"
35   - "https"
36 produces:
37   - "application/json;charset=utf-8"
38 tags:
39   - name: "ServiceSpecification"
40     description: ""
41 paths:
42   x-interface:
43     api-version: "4.1.0"
44     last-mod-release: "Frankfurt"
45   /serviceSpecification:
46     get:
47       tags:
48         - "ServiceSpecification"
49       produces:
50         - "application/json;charset=utf-8"
51       operationId: "serviceSpecification_Find"
52       summary: "List service specifications"
53       description: "This operation returns service specifications from a catalog.\n\
54         Only a predefined set of attribute is proposed : Based on SDC limitations,\
55         \ only attributes category and distributionStatus are available for serviceSpecification\
56         \ filtering\nFields attribute could be used to filter attributes retrieved"
57       deprecated: false
58       parameters:
59         - name: "fields"
60           required: false
61           in: "query"
62           description: "Field selection - used to filtering the attributes to be retreived"
63           type: "string"
64         - name: "category"
65           required: false
66           in: "query"
67           description: "Service Category (filter)"
68           type: "string"
69         - name: "distributionStatus"
70           required: false
71           in: "query"
72           description: "Service distribution status (filter)"
73           type: "string"
74       responses:
75         "200":
76           description: "Ok"
77           schema:
78             type: "array"
79             items:
80               $ref: "#/definitions/ServiceSpecification"
81         "400":
82           description: "Bad Request\n\nList of supported error codes:\n- 20: Invalid\
83             \ URL parameter value\n- 21: Missing body\n- 22: Invalid body\n- 23: Missing\
84             \ body field\n- 24: Invalid body field\n- 25: Missing header\n- 26: Invalid\
85             \ header value\n- 27: Missing query-string parameter\n- 28: Invalid query-string\
86             \ parameter value"
87           schema:
88             $ref: "#/definitions/ErrorRepresentation"
89         "401":
90           description: "Unauthorized\n\nList of supported error codes:\n- 40: Missing\
91             \ credentials\n- 41: Invalid credentials\n- 42: Expired credentials"
92           schema:
93             $ref: "#/definitions/ErrorRepresentation"
94         "403":
95           description: "Forbidden\n\nList of supported error codes:\n- 50: Access\
96             \ denied\n- 51: Forbidden requester\n- 52: Forbidden user\n- 53: Too many\
97             \ requests"
98           schema:
99             $ref: "#/definitions/ErrorRepresentation"
100         "404":
101           description: "Not Found\n\nList of supported error codes:\n- 60: Resource\
102             \ not found"
103           schema:
104             $ref: "#/definitions/ErrorRepresentation"
105         "422":
106           description: "Unprocessable entity\n\nFunctional error"
107           schema:
108             $ref: "#/definitions/ErrorRepresentation"
109         "500":
110           description: "Internal Server Error\n\nList of supported error codes:\n\
111             - 1: Internal error"
112           schema:
113             $ref: "#/definitions/ErrorRepresentation"
114         "503":
115           description: "Service Unavailable\n\nList of supported error codes:\n- 5:\
116             \ The service is temporarily unavailable\n- 6: Orange API is over capacity,\
117             \ retry later !"
118           schema:
119             $ref: "#/definitions/ErrorRepresentation"
120     post:
121       tags:
122         - "ServiceSpecification"
123       consumes:
124         - "application/json;charset=utf-8"
125       produces:
126         - "application/json;charset=utf-8"
127       operationId: "serviceSpecification_Create"
128       summary: "Create service specification"
129       description: "This operation creates a service specification in catalog.\n\
130         Only a predefined set of attributes are proposed : Attributes not supported \
131         \ due to SDC limitations are excluded"
132       deprecated: false
133       parameters:
134         - in: header
135           name: "USER_ID"
136           description: "The catalog user id"
137           required: true
138           type: "string"
139         - in: body
140           name: ServiceSpecificationRequest
141           description: Request payload in json format
142           required: true
143           schema:
144             $ref: '#/definitions/ServiceSpecificationRequest'
145       responses:
146         "201":
147           description: "Created"
148           schema:
149             $ref: "#/definitions/ServiceSpecificationResponse"
150         "400":
151           description: "Bad Request\n\nList of supported error codes:\n- 20: Invalid\
152             \ URL parameter value\n- 21: Missing body\n- 22: Invalid body\n- 23: Missing\
153             \ body field\n- 24: Invalid body field\n- 25: Missing header\n- 26: Invalid\
154             \ header value"
155           schema:
156             $ref: "#/definitions/ErrorRepresentation"
157         "401":
158           description: "Unauthorized\n\nList of supported error codes:\n- 40: Missing\
159             \ credentials\n- 41: Invalid credentials"
160           schema:
161             $ref: "#/definitions/ErrorRepresentation"
162         "403":
163           description: "Forbidden\n\nList of supported error codes:\n- 50: Access\
164             \ denied\n- 51: Forbidden requester\n- 52: Forbidden user\n- 53: Too many\
165             \ requests"
166           schema:
167             $ref: "#/definitions/ErrorRepresentation"
168         "404":
169           description: "Not Found\n\nList of supported error codes:\n- 60: Resource\
170             \ not found"
171           schema:
172             $ref: "#/definitions/ErrorRepresentation"
173         "422":
174           description: "Unprocessable entity\n\nFunctional error"
175           schema:
176             $ref: "#/definitions/ErrorRepresentation"
177         "500":
178           description: "Internal Server Error\n\nList of supported error codes:\n\
179             - 1: Internal error"
180           schema:
181             $ref: "#/definitions/ErrorRepresentation"
182         "503":
183           description: "Service Unavailable\n\nList of supported error codes:\n- 5:\
184             \ The service is temporarily unavailable\n"
185           schema:
186             $ref: "#/definitions/ErrorRepresentation"
187   /serviceSpecification/{id}:
188     get:
189       tags:
190         - "ServiceSpecification"
191       produces:
192         - "application/json;charset=utf-8"
193       operationId: "serviceSpecification_Get"
194       summary: "Retrieve a service specification"
195       description: "This operation returns a service specification by its id from\
196         \ a catalog. Attribute selection is enabled using the fields attribute."
197       deprecated: false
198       parameters:
199         - name: "id"
200           required: true
201           in: "path"
202           description: "The Id of the ServiceSpecification"
203           type: "string"
204         - name: "fields"
205           required: false
206           in: "query"
207           description: "Attribute selection"
208           type: "string"
209       responses:
210         "200":
211           description: "Ok"
212           schema:
213             $ref: "#/definitions/ServiceSpecification"
214         "400":
215           description: "Bad Request\n\nList of supported error codes:\n- 20: Invalid\
216             \ URL parameter value\n- 21: Missing body\n- 22: Invalid body\n- 23: Missing\
217             \ body field\n- 24: Invalid body field\n- 25: Missing header\n- 26: Invalid\
218             \ header value\n- 27: Missing query-string parameter\n- 28: Invalid query-string\
219             \ parameter value"
220           schema:
221             $ref: "#/definitions/ErrorRepresentation"
222         "401":
223           description: "Unauthorized\n\nList of supported error codes:\n- 40: Missing\
224             \ credentials\n- 41: Invalid credentials\n- 42: Expired credentials"
225           schema:
226             $ref: "#/definitions/ErrorRepresentation"
227         "403":
228           description: "Forbidden\n\nList of supported error codes:\n- 50: Access\
229             \ denied\n- 51: Forbidden requester\n- 52: Forbidden user\n- 53: Too many\
230             \ requests"
231           schema:
232             $ref: "#/definitions/ErrorRepresentation"
233         "404":
234           description: "Not Found\n\nList of supported error codes:\n- 60: Resource\
235             \ not found"
236           schema:
237             $ref: "#/definitions/ErrorRepresentation"
238         "422":
239           description: "Unprocessable entity\n\nFunctional error"
240           schema:
241             $ref: "#/definitions/ErrorRepresentation"
242         "500":
243           description: "Internal Server Error\n\nList of supported error codes:\n\
244             - 1: Internal error"
245           schema:
246             $ref: "#/definitions/ErrorRepresentation"
247         "503":
248           description: "Service Unavailable\n\nList of supported error codes:\n- 5:\
249             \ The service is temporarily unavailable\n- 6: Orange API is over capacity,\
250             \ retry later !"
251           schema:
252             $ref: "#/definitions/ErrorRepresentation"
253   /serviceSpecification/{id}/specificationInputSchema:
254     get:
255       tags:
256         - "ServiceSpecification"
257       produces:
258         - "application/json;charset=utf-8"
259       operationId: "specificationInputSchemaGet"
260       summary: "Retrieve a service specification Input Schema"
261       description: "This operation returns a service specification Input schema by its id from\
262         \ a catalog. Attribute selection is enabled using the fields attribute."
263       deprecated: false
264       parameters:
265         - name: "id"
266           required: true
267           in: "path"
268           description: "The Id of the ServiceSpecification"
269           type: "string"
270         - name: "fields"
271           required: false
272           in: "query"
273           description: "Attribute selection"
274           type: "string"
275       responses:
276         "200":
277           description: "Ok"
278           schema:
279             $ref: "#/definitions/SpecificationInputSchema"
280         "400":
281           description: "Bad Request\n\nList of supported error codes:\n- 20: Invalid\
282             \ URL parameter value\n- 21: Missing body\n- 22: Invalid body\n- 23: Missing\
283             \ body field\n- 24: Invalid body field\n- 25: Missing header\n- 26: Invalid\
284             \ header value\n- 27: Missing query-string parameter\n- 28: Invalid query-string\
285             \ parameter value"
286           schema:
287             $ref: "#/definitions/ErrorRepresentation"
288         "401":
289           description: "Unauthorized\n\nList of supported error codes:\n- 40: Missing\
290             \ credentials\n- 41: Invalid credentials\n- 42: Expired credentials"
291           schema:
292             $ref: "#/definitions/ErrorRepresentation"
293         "403":
294           description: "Forbidden\n\nList of supported error codes:\n- 50: Access\
295             \ denied\n- 51: Forbidden requester\n- 52: Forbidden user\n- 53: Too many\
296             \ requests"
297           schema:
298             $ref: "#/definitions/ErrorRepresentation"
299         "404":
300           description: "Not Found\n\nList of supported error codes:\n- 60: Resource\
301             \ not found"
302           schema:
303             $ref: "#/definitions/ErrorRepresentation"
304         "422":
305           description: "Unprocessable entity\n\nFunctional error"
306           schema:
307             $ref: "#/definitions/ErrorRepresentation"
308         "500":
309           description: "Internal Server Error\n\nList of supported error codes:\n\
310             - 1: Internal error"
311           schema:
312             $ref: "#/definitions/ErrorRepresentation"
313         "503":
314           description: "Service Unavailable\n\nList of supported error codes:\n- 5:\
315             \ The service is temporarily unavailable\n- 6: Orange API is over capacity,\
316             \ retry later !"
317           schema:
318             $ref: "#/definitions/ErrorRepresentation"
319
320 definitions:
321   LifecycleStatusValues:
322     description: "Service lifecycle value from ONAP SDC"
323     type: "string"
324     enum:
325       - "NOT_CERTIFIED_CHECKOUT"
326       - "NOT_CERTIFIED_CHECKIN"
327       - "READY_FOR_CERTIFICATION"
328       - "CERTIFICATION_IN_PROGRESS"
329       - "CERTIFIED"
330   DistributionStatus:
331     description: "Service distribution status from ONAP."
332     type: "string"
333     enum:
334       - "DISTRIBUTION_NOT_APPROVED"
335       - "DISTRIBUTION_APPROVED"
336       - "DISTRIBUTED"
337       - "DISTRIBUTION_REJECTED"
338   ErrorRepresentation:
339     description: "This class is used to describe error.\nfor nbi Beijing release we\
340       \ do not manage additional error for serviceCatalog"
341     required:
342       - "code"
343       - "reason"
344     type: "object"
345     properties:
346       code:
347         description: "Application related code (as defined in the API or from a common\
348           \ list)"
349         type: "integer"
350         format: "int32"
351       reason:
352         description: "Text that explains the reason for error. This can be shown to\
353           \ a client user."
354         type: "string"
355       message:
356         description: "Text that provide more details and corrective actions related\
357           \ to the error. This can be shown to a client user"
358         type: "string"
359       status:
360         description: "http error code extension like 400-2"
361         type: "string"
362       referenceErrror:
363         description: "url pointing to documentation describing the error"
364         type: "string"
365       '@type':
366         description: "The class type of a REST resource."
367         type: "string"
368       '@schemaLocation':
369         description: "it provides a link to the schema describing a REST resource."
370         type: "string"
371   TimePeriod:
372     description: "A time period"
373     type: "object"
374     properties:
375       startDateTime:
376         description: "Start date and time of the period"
377         type: "string"
378         format: "date-time"
379       endDateTime:
380         description: "End date and time of the period"
381         type: "string"
382         format: "date-time"
383   RelatedPartyRef:
384     description: "Party linked to the service catalog.\nin nbi we retrieve information\
385       \ about last updater of the service in SDC"
386     type: "object"
387     properties:
388       id:
389         description: "Unique identifier of the related party. Filled with lastUpdaterUserId"
390         type: "string"
391       role:
392         description: "Role payed by the related party\nOnly role 'lastUpdater' is\
393           \ retrieved in Beijing release"
394         type: "string"
395       name:
396         description: "Name of the related party - Filled with lastUpdatedFullName"
397         type: "string"
398   ServiceSpecification:
399     description: "ServiceSpecification is a class that offers characteristics to describe\
400       \ a type of service. Functionally, it acts as a template by which Services may\
401       \ be instantiated. By sharing the same specification, these services would therefore\
402       \ share the same set of characteristics.\nthe service information are retrieved\
403       \ in SDC"
404     required:
405       - "invariantUUID"
406     type: "object"
407     properties:
408       id:
409         description: "Unique identifier of the service specification. Filled with\
410           \ SDC Service uuid"
411         type: "string"
412       href:
413         description: "Reference of the service specification"
414         type: "string"
415       name:
416         description: "Name of the service specification- Filled with SDC Service name"
417         type: "string"
418       description:
419         description: "A narrative that explains in detail what the service specification\
420           \ is - Filled with SDC Service description"
421         type: "string"
422       '@type':
423         description: "This attribute allows to dynamically extends TMF class. Valued\
424           \ with 'ONAPservice'. We used this features to add following attributes:\n\
425           invariantUUID\ntoscaModelURL\ntoscaResourceName\ncategory (1)\nsubcategory\
426           \ (1)\ndistributionStatus"
427         type: "string"
428         default: "ONAPservice"
429       '@schemaLocation':
430         description: "Not used"
431         type: "string"
432       '@baseType':
433         description: "Not used"
434         type: "string"
435       invariantUUID:
436         description: "Additional attribute (not in the TMF API) - extended through\
437           \ @type - invariantUUID"
438         type: "string"
439       toscaModelURL:
440         description: "Additional attribute (not in the TMF API) - extended through\
441           \ @type - toscaModelURL"
442         type: "string"
443       toscaResourceName:
444         description: "Additional attribute (not in the TMF API) - extended through\
445           \ @type - toscaResourceName"
446         type: "string"
447       category:
448         description: "Additional attribute - extended through @type - category\nPlease\
449           \ note that this attribute is managed in TMF - in future release we'll introduce\
450           \ category resource"
451         type: "string"
452       subcategory:
453         description: "Additional attribute - extended through @type - category\nPlease\
454           \ note that this attribute is managed in TMF - in future release we'll introduce\
455           \ category resourc"
456         type: "string"
457       distributionStatus:
458         $ref: "#/definitions/DistributionStatus"
459       version:
460         description: "Service specification version - Filled with SDC Service version"
461         type: "string"
462       lifecycleStatus:
463         $ref: "#/definitions/LifecycleStatusValues"
464       targetServiceSchema:
465         $ref: "#/definitions/TargetServiceSchemaRef"
466       attachment:
467         type: "array"
468         items:
469           $ref: "#/definitions/Attachment"
470       relatedParty:
471         type: "array"
472         items:
473           $ref: "#/definitions/RelatedPartyRef"
474       resourceSpecification:
475         type: "array"
476         items:
477           $ref: "#/definitions/ResourceSpecificationRef"
478       serviceSpecCharacteristic:
479         type: "array"
480         items:
481           $ref: "#/definitions/ServiceSpecCharacteristic"
482   ServiceSpecificationRequest:
483     description: "ServiceSpecification is a class that offers characteristics to describe\
484       \ a type of service. Functionally, it acts as a template by which Services may\
485       \ be instantiated. By sharing the same specification, these services would therefore\
486       \ share the same set of characteristics."
487     type: "object"
488     required:
489       - name
490       - description
491       - category
492       - relatedParty
493     properties:
494       name:
495         description: "Name of the service specification"
496         type: "string"
497       description:
498         description: "A narrative that explains in detail what the service specification"
499         type: "string"
500       '@type':
501         description: "This attribute allows to dynamically extends TMF class. Valued\
502           \ with 'ONAPservice'. We use this feature to add following attributes:\n\
503           toscaModelURL\ntoscaResourceName\ncategory (1)\nsubcategory\
504           \ (1)\ndistributionStatus"
505         type: "string"
506         default: "ONAPservice"
507       '@schemaLocation':
508         description: "Not used"
509         type: "string"
510       '@baseType':
511         description: "Not used"
512         type: "string"
513       toscaModelURL:
514         description: "Additional attribute (not in the TMF API) - extended through\
515           \ @type - toscaModelURL"
516         type: "string"
517       toscaResourceName:
518         description: "Additional attribute (not in the TMF API) - extended through\
519           \ @type - toscaResourceName"
520         type: "string"
521       category:
522         description: "Additional attribute - extended through @type - category\nPlease\
523           \ note that this attribute is managed in TMF - in future release we'll introduce\
524           \ category resource"
525         type: "string"
526       subcategory:
527         description: "Additional attribute - extended through @type - category\nPlease\
528           \ note that this attribute is managed in TMF - in future release we'll introduce\
529           \ category resource"
530         type: "string"
531       version:
532         description: "Service specification version"
533         type: "string"
534       lifecycleStatus:
535         $ref: "#/definitions/LifecycleStatusValues"
536       targetServiceSchema:
537         $ref: "#/definitions/TargetServiceSchemaRef"
538       attachment:
539         type: "array"
540         items:
541           $ref: "#/definitions/Attachment"
542       relatedParty:
543         type: "array"
544         items:
545           $ref: "#/definitions/RelatedPartyRef"
546       resourceSpecification:
547         type: "array"
548         items:
549           $ref: "#/definitions/ResourceSpecificationRef"
550       serviceSpecCharacteristic:
551         type: "array"
552         items:
553           $ref: "#/definitions/ServiceSpecCharacteristicRequest"
554   ServiceSpecificationResponse:
555     description: "ServiceSpecification is a class that offers characteristics to describe\
556       \ a type of service. Functionally, it acts as a template by which Services may\
557       \ be instantiated. By sharing the same specification, these services would therefore\
558       \ share the same set of characteristics."
559     type: "object"
560     properties:
561       name:
562         description: "Name of the service specification"
563         type: "string"
564       id:
565         description: "id of the created service specification"
566         type: "string"
567       href:
568         description: "reference to the created service specification"
569         type: "string"
570       description:
571         description: ""
572         type: "string"
573       '@type':
574         description: "This attribute allows to dynamically extends TMF class. Valued\
575           \ with 'ONAPservice'. We use this feature to add following attributes:\n\
576           toscaModelURL\ntoscaResourceName\ncategory (1)\nsubcategory\
577           \ (1)\ndistributionStatus"
578         type: "string"
579         default: "ONAPservice"
580       '@schemaLocation':
581         description: "Not used"
582         type: "string"
583       '@baseType':
584         description: "Not used"
585         type: "string"
586       toscaModelURL:
587         description: "Additional attribute (not in the TMF API) - extended through\
588           \ @type - toscaModelURL"
589         type: "string"
590       toscaResourceName:
591         description: "Additional attribute (not in the TMF API) - extended through\
592           \ @type - toscaResourceName"
593         type: "string"
594       category:
595         description: "Additional attribute - extended through @type - category\nPlease\
596           \ note that this attribute is managed in TMF - in future release we'll introduce\
597           \ category resource"
598         type: "string"
599       subcategory:
600         description: "Additional attribute - extended through @type - category\nPlease\
601           \ note that this attribute is managed in TMF - in future release we'll introduce\
602           \ category resource"
603         type: "string"
604       version:
605         description: "Service specification version"
606         type: "string"
607       lifecycleStatus:
608         $ref: "#/definitions/LifecycleStatusValues"
609       targetServiceSchema:
610         $ref: "#/definitions/TargetServiceSchemaRef"
611       attachment:
612         type: "array"
613         items:
614           $ref: "#/definitions/Attachment"
615       relatedParty:
616         type: "array"
617         items:
618           $ref: "#/definitions/RelatedPartyRef"
619       resourceSpecification:
620         type: "array"
621         items:
622           $ref: "#/definitions/ResourceSpecificationRef"
623       serviceSpecCharacteristic:
624         type: "array"
625         items:
626           $ref: "#/definitions/ServiceSpecCharacteristicRequest"
627   ServiceSpecCharacteristic:
628     description: "A characteristic quality or distinctive feature of a ServiceSpecification.\
629       \ \nServiceSpecCharacteristics are retrieved in the serviceTosca file in the\
630       \ topology_template section in the inputs section."
631     type: "object"
632     properties:
633       name:
634         description: "Name of the characteristic - Filled with parameter_name"
635         type: "string"
636       description:
637         description: "A narrative that explains in detail what the characteristic\
638           \ is - Filled with parameter_description"
639         type: "string"
640       valueType:
641         description: "A kind of value that the characteristic can take on, from Dublin\
642           \ from Dublin we use the object type to describe service characteristic values"
643         type: "string"
644       '@type':
645         description: "This attribute allows to dynamically extends TMF class. Valued\
646           \ with: 'ONAPserviceCharacteristic'. We do not used this feature in nbi"
647         type: "string"
648       '@schemaLocation':
649         description: "An url pointing to type description - we do not use it"
650         type: "string"
651       required:
652         description: "A parameter to define if the characteristic is mandatory - Filled\
653           \ from parameter_required – if not fielded by default ‘true’"
654         type: "boolean"
655         default: true
656       status:
657         description: "Status of the characteristic - filled with status_value"
658         type: "string"
659       serviceSpecCharacteristicValue:
660         type: "array"
661         items:
662           $ref: "#/definitions/ServiceSpecCharacteristicValue"
663   ServiceSpecCharacteristicValueRequest:
664     description: "A json schema of the service specification input \
665       \ characteristic values"
666     type: "object"
667     properties:
668       'valueType':
669         description: "This attribute describes the type of value"
670         type: "string"
671       'isDefault':
672         description: "To describe whether the attribute is to be included by default"
673         type: "boolean"
674       'value':
675         description: "Value of the attribute"
676         type: "string"
677   ServiceSpecCharacteristicRequest:
678     description: "A characteristic quality or distinctive feature of a ServiceSpecification."
679     type: "object"
680     properties:
681       'name':
682         description: "Name of the characteristic"
683         type: "string"
684       'description':
685         description: "A narrative that explains in detail what the characteristic\
686           \ is"
687         type: "string"
688       'valueType':
689         description: "A kind of value that the characteristic can take on, from Dublin\
690           \ from Dublin we use the object type to describe service characteristic values"
691         type: "string"
692       '@type':
693         description: "This attribute allows to dynamically extends TMF class. Valued\
694           \ with: 'ONAPserviceCharacteristic'. We do not used this feature in nbi"
695         type: "string"
696       '@schemaLocation':
697         description: "An url pointing to type description - we do not use it"
698         type: "string"
699       'required':
700         description: "A parameter to define if the characteristic is mandatory"
701         type: "boolean"
702         default: true
703       serviceSpecCharacteristicValue:
704         type: "array"
705         items:
706           $ref: "#/definitions/ServiceSpecCharacteristicValueRequest"
707   Attachment:
708     description: "An attachment is a file uses to describe the service.\nIn nbi we\
709       \ use attachment to retrieve ONAP artifacts."
710     type: "object"
711     properties:
712       id:
713         description: "Unique identifier of the attachment - filled with artifactUUID."
714         type: "string"
715       name:
716         description: "Name of the attachment - filled with artifactName"
717         type: "string"
718       description:
719         description: "Description of the attachment - filled with artifactDescription"
720         type: "string"
721       '@type':
722         description: "This attribute allows to dynamically extends TMF class. Valued\
723           \ with 'ONAPartifact'. We used this features to add following attributes:\
724           \ \nartifactLabel\nartifactGroupType\nartifactTimeout\nartifactChecksum\n\
725           artifactVersion\ngeneratedFromUUID"
726         type: "string"
727         default: "ONAPartifact"
728       artifactLabel:
729         description: "Additional attribute (not in the TMF API) - extended through\
730           \ @type - artifactLabel"
731         type: "string"
732       artifactGroupType:
733         description: "Additional attribute (not in the TMF API) - extended through\
734           \ @type - artifactGroupType"
735         type: "string"
736       artifactTimeout:
737         description: "Additional attribute (not in the TMF API) - extended through\
738           \ @type - artifactTimeout"
739         type: "string"
740       artifactChecksum:
741         description: "Additional attribute (not in the TMF API) - extended through\
742           \ @type - artifactChecksum"
743         type: "string"
744       artifactVersion:
745         description: "Additional attribute (not in the TMF API) - extended through\
746           \ @type - artifactVersion"
747         type: "string"
748       generatedFromUUID:
749         description: "Additional attribute (not in the TMF API) - extended through\
750           \ @type - generatedFromUUID"
751         type: "string"
752       url:
753         description: "Uniform Resource Locator, is a web page address - filled with\
754           \ artifactURL"
755         type: "string"
756       mimeType:
757         description: "Filled with artifactType"
758         type: "string"
759   ServiceSpecCharacteristicValue:
760     description: "A number or text that can be assigned to a service specification\
761       \ characteristic.\nServiceSpecCharacteristicValue are retrieved in the service\
762       \ Tosca file"
763     type: "object"
764     properties:
765       '@type':
766         description: "This attribute allows to dynamically extends TMF class. Valued\
767           \ with: 'ServiceSpecName_ServiceCharacteristic'."
768         type: "string"
769       '@schemaLocation':
770         description: "An url pointing to type description - we use it in nbi\
771           \ for specifying the specificationInputSchema url"
772         type: "string"
773       valueType:
774         description: "A kind of value that the characteristic can take on,\
775           \ from Dublin release we use an object valueType to\
776           \ group the Tosca Model Inputs, the object schema is described\
777           \ by the specificationInputSchema url"
778         type: "string"
779   SpecificationInputSchema:
780     description: "A json schema of the service specification input characteristics\
781       \ \n. The Inputs in the schema files are obtained the service Tosca file Inputs"
782     type: "object"
783     properties:
784       ServiceCharacteristics:
785         $ref: "#/definitions/SchemaForServiceCharacteristics"
786   SchemaForServiceCharacteristics:
787     description: "The object describing the schema of the service specification input characteristics.\
788       \ \n. The Inputs in the schema files are obtained the service Tosca file Inputs"
789     type: "object"
790     properties:
791       required:
792         description: "defines the parameter key names that are mandatory to send"
793         type: "array"
794         items:
795           type: "string"
796       properties:
797         description: "defines all the input key names and types for the Service Instantiation"
798         type: "object"
799   ResourceSpecificationRef:
800     description: "A list of resourceSpec identified to deliver the service.\nfor nbi\
801       \ we retrieve resource information available in service description (through\
802       \ SDC api) bu as well information retrieved in the TOSCA file."
803     type: "object"
804     properties:
805       id:
806         description: "Unique identifier of the resource specification - filled with\
807           \ resourceUUID"
808         type: "string"
809       version:
810         description: "Version for this resource specification - filled with resourceVersion"
811         type: "string"
812       name:
813         description: "Name of the resource specification - filled with resourceName"
814         type: "string"
815       '@type':
816         description: "This attribute allows to dynamically extends TMF class. Valued\
817           \ with: 'ONAPresource'. We used this features to add following attributes:\n\
818           resourceInstanceName\nresourceInvariantUUID\nresourceType\nmodelCustomizationName\n\
819           modelCustomizationId"
820         type: "string"
821         default: "ONAPresource"
822       resourceInstanceName:
823         description: "Additional attribute (not in the TMF API) - extended through\
824           \ @type - resourceInstanceName"
825         type: "string"
826       resourceInvariantUUID:
827         description: "Additional attribute (not in the TMF API) - extended through\
828           \ @type - resourceInvariantUUID"
829         type: "string"
830       resourceType:
831         description: "Additional attribute (not in the TMF API) - extended through\
832           \ @type - resoucreType"
833         type: "string"
834       modelCustomizationName:
835         description: "Additional attribute (not in the TMF API) - extended through\
836           \ @type - Retrieved in the TOSCA file : attribute name in topology_template/node_template\
837           \ for the resource"
838         type: "string"
839       modelCustomizationId:
840         description: "Additional attribute (not in the TMF API) - extended through\
841           \ @type - Retrieved in the TOSCA file : attribute customizationUUID in topology_template/node_template\
842           \ for the resource"
843         type: "string"
844   TargetServiceSchemaRef:
845     description: "Target Service Schema"
846     required:
847       - "@type"
848       - "@schemaLocation"
849     type: "object"
850     properties:
851       '@type':
852         description: ""
853         type: "string"
854       '@schemaLocation':
855         description: ""
856         type: "string"