223c13b42ca27f5c71aa09f28ace75281e738b33
[externalapi/nbi.git] / docs / offeredapis / serviceInventory / markDown.md
1 # This work is licensed under a Creative Commons Attribution 4.0 International License.
2 # http://creativecommons.org/licenses/by/4.0
3 # Copyright 2018 Orange
4
5 # API ServiceInventory
6
7
8 <a name="overview"></a>
9 ## Overview
10
11 ### Api URL
12
13 [Swagger UI](https://api-designer.sso.infra.ftgroup/swagger-ui/?url=https://api-designer.sso.infra.ftgroup/api/1.0/apis/5an735gnX0/swagger.json)
14
15
16 [plant UML UI](https://plantuml.rd.francetelecom.fr/proxy?fmt=svg&src=https://api-designer.sso.infra.ftgroup/api/1.0/apis/5an735gnX0/plantuml&noCache=304710.0)
17
18 serviceInventory API designed for ONAP Beijing Release.
19 This API is build from TMF open API18.0 (applying TMF Guideline 3.0)
20 only operation GET (by id & byList) for resource serviceSpecification is available
21
22
23 ### Version information
24 *Version* : 1.0.0_inProgress
25
26
27 ### URI scheme
28 *Host* : serverRoot  
29 *BasePath* : /nbi/api/v1  
30 *Schemes* : HTTPS
31
32
33 ### Tags
34
35 * Service
36
37
38 ### Consumes
39
40 * `application/json;charset=utf-8`
41
42
43 ### Produces
44
45 * `application/json;charset=utf-8`
46
47
48 <a name="paths"></a>
49 ## Resources
50
51 <a name="service_resource"></a>
52 ### Service
53
54 <a name="servicefind"></a>
55 #### List services
56 ```
57 GET /service
58 ```
59
60
61 ##### Description
62 This operation list service entities. 
63 Attribute selection is restricted. 
64 fields attribute may be used to filter retrieved attribute(s) for each service
65
66 Specific business errors for current operation will be encapsulated in
67
68 HTTP Response 422 Unprocessable entity
69
70
71 ##### Parameters
72
73 |Type|Name|Schema|
74 |---|---|---|
75 |**Query**|**fields**  <br>*optional*|string|
76 |**Query**|**id**  <br>*optional*|string|
77 |**Query**|**relatedParty.id**  <br>*optional*|string|
78 |**Query**|**serviceSpecification.id**  <br>*optional*|string|
79 |**Query**|**serviceSpecification.name**  <br>*optional*|string|
80
81
82 ##### Responses
83
84 |HTTP Code|Description|Schema|
85 |---|---|---|
86 |**200**|Success|< [ListService](#listservice) > array|
87 |**400**|Bad Request<br><br>List of supported error codes:<br>- 20: Invalid URL parameter value<br>- 21: Missing body<br>- 22: Invalid body<br>- 23: Missing body field<br>- 24: Invalid body field<br>- 25: Missing header<br>- 26: Invalid header value<br>- 27: Missing query-string parameter<br>- 28: Invalid query-string parameter value|[ErrorRepresentation](#errorrepresentation)|
88 |**401**|Unauthorized<br><br>List of supported error codes:<br>- 40: Missing credentials<br>- 41: Invalid credentials<br>- 42: Expired credentials|[ErrorRepresentation](#errorrepresentation)|
89 |**403**|Forbidden<br><br>List of supported error codes:<br>- 50: Access denied<br>- 51: Forbidden requester<br>- 52: Forbidden user<br>- 53: Too many requests|[ErrorRepresentation](#errorrepresentation)|
90 |**404**|Not Found<br><br>List of supported error codes:<br>- 60: Resource not found|[ErrorRepresentation](#errorrepresentation)|
91 |**422**|Unprocessable entity<br><br>Functional error|[ErrorRepresentation](#errorrepresentation)|
92 |**500**|Internal Server Error<br><br>List of supported error codes:<br>- 1: Internal error|[ErrorRepresentation](#errorrepresentation)|
93 |**503**|Service Unavailable<br><br>List of supported error codes:<br>- 5: The service is temporarily unavailable<br>- 6: Orange API is over capacity, retry later !|[ErrorRepresentation](#errorrepresentation)|
94
95
96 <a name="serviceget"></a>
97 #### Retrieve a service
98 ```
99 GET /service/{id}
100 ```
101
102
103 ##### Description
104 This operation retrieves a service entity. 
105 Attribute selection is enabled for all first level attributes.
106
107 Specific business errors for current operation will be encapsulated in
108
109 HTTP Response 422 Unprocessable entity
110
111
112 ##### Parameters
113
114 |Type|Name|Schema|
115 |---|---|---|
116 |**Path**|**id**  <br>*required*|string|
117 |**Query**|**relatedParty.id**  <br>*optional*|string|
118 |**Query**|**serviceSpecification.id**  <br>*optional*|string|
119 |**Query**|**serviceSpecification.name**  <br>*optional*|string|
120
121
122 ##### Responses
123
124 |HTTP Code|Description|Schema|
125 |---|---|---|
126 |**200**|Success|[Service](#service)|
127 |**400**|Bad Request<br><br>List of supported error codes:<br>- 20: Invalid URL parameter value<br>- 21: Missing body<br>- 22: Invalid body<br>- 23: Missing body field<br>- 24: Invalid body field<br>- 25: Missing header<br>- 26: Invalid header value<br>- 27: Missing query-string parameter<br>- 28: Invalid query-string parameter value|[ErrorRepresentation](#errorrepresentation)|
128 |**401**|Unauthorized<br><br>List of supported error codes:<br>- 40: Missing credentials<br>- 41: Invalid credentials<br>- 42: Expired credentials|[ErrorRepresentation](#errorrepresentation)|
129 |**403**|Forbidden<br><br>List of supported error codes:<br>- 50: Access denied<br>- 51: Forbidden requester<br>- 52: Forbidden user<br>- 53: Too many requests|[ErrorRepresentation](#errorrepresentation)|
130 |**404**|Not Found<br><br>List of supported error codes:<br>- 60: Resource not found|[ErrorRepresentation](#errorrepresentation)|
131 |**422**|Unprocessable entity<br><br>Functional error|[ErrorRepresentation](#errorrepresentation)|
132 |**500**|Internal Server Error<br><br>List of supported error codes:<br>- 1: Internal error|[ErrorRepresentation](#errorrepresentation)|
133 |**503**|Service Unavailable<br><br>List of supported error codes:<br>- 5: The service is temporarily unavailable<br>- 6: Orange API is over capacity, retry later !|[ErrorRepresentation](#errorrepresentation)|
134
135
136 <a name="definitions"></a>
137 ## Definitions
138
139 <a name="errorrepresentation"></a>
140 ### ErrorRepresentation
141 This class is used to describe error.
142 for nbi Beijing release we do not manage additional error for serviceCatalog
143
144
145 |Name|Description|Schema|
146 |---|---|---|
147 |**@schemaLocation**  <br>*optional*|it provides a link to the schema describing a REST resource.|string|
148 |**@type**  <br>*optional*|The class type of a REST resource.|string|
149 |**code**  <br>*required*|Application related code (as defined in the API or from a common list)|integer (int32)|
150 |**message**  <br>*optional*|Text that provide more details and corrective actions related to the error. This can be shown to a client user.|string|
151 |**reason**  <br>*required*|Text that explains the reason for error. This can be shown to a client user.|string|
152 |**referenceError**  <br>*optional*|url pointing to documentation describing the error|string|
153 |**status**  <br>*optional*|http error code extension like 400-2|string|
154
155
156 <a name="listrelatedpartyref"></a>
157 ### ListRelatedPartyRef
158 This class is used to structure list of service(s) retrieved
159
160
161 |Name|Description|Schema|
162 |---|---|---|
163 |**id**  <br>*optional*|Unique identifier of a related party|string|
164 |**role**  <br>*optional*|Role played by the related party - only role “ONAPcustomer” is managed in Beijing release.|string|
165
166
167 <a name="listservice"></a>
168 ### ListService
169 This class is used to structure list of service(s) retrieved
170
171
172 |Name|Description|Schema|
173 |---|---|---|
174 |**id**  <br>*optional*|Unique identifier of the service|string|
175 |**name**  <br>*optional*|Name of the service|string|
176 |**relatedParty**  <br>*optional*||[ListRelatedPartyRef](#listrelatedpartyref)|
177 |**serviceSpecification**  <br>*optional*||[ListServiceSpecificationRef](#listservicespecificationref)|
178
179
180 <a name="listservicespecificationref"></a>
181 ### ListServiceSpecificationRef
182 This class is used to structure list of service(s) retrieved
183
184
185 |Name|Description|Schema|
186 |---|---|---|
187 |**id**  <br>*optional*|Unique identifier of the service specification|string|
188 |**name**  <br>*optional*|Name of the required service specification|string|
189
190
191 <a name="relatedpartyref"></a>
192 ### RelatedPartyRef
193 RelatedParty reference. A related party defines party or party role linked to a specific entity.
194 Only ONAP Customer is managed in Beijing release.
195
196
197 |Name|Description|Schema|
198 |---|---|---|
199 |**@referredType**  <br>*optional*|Not managed in the Beijing release.|string|
200 |**href**  <br>*optional*|Reference of a related party.<br>Not filled in Beijing release.|string|
201 |**id**  <br>*optional*|Unique identifier of a related party|string|
202 |**role**  <br>*optional*|Role played by the related party.<br>Filled with 'ONAPcustomer'|string|
203
204
205 <a name="service"></a>
206 ### Service
207 Instantiated service (service_instance) in AAI
208
209
210 |Name|Description|Schema|
211 |---|---|---|
212 |**@baseType**  <br>*optional*|Not managed in Beijing release|string|
213 |**@schemaLocation**  <br>*optional*|Not managed in Beijing release|string|
214 |**@type**  <br>*optional*|This attribute allows to dynamically extends TMF class. Not used in Beijing release.|string|
215 |**characteristic**  <br>*optional*||< [ServiceCharacteristic](#servicecharacteristic) > array|
216 |**hasStarted**  <br>*optional*|This is a Boolean attribute that, if TRUE, signifies that this Service has already been started. If the value of this attribute is FALSE, then this signifies that this Service has NOT been Started<br>Not managed in Beijing release|boolean|
217 |**href**  <br>*optional*|Reference of the service<br>Not managed in Beijing release|string|
218 |**id**  <br>*optional*|Unique identifier of the service - Valued with service-instance-id|string|
219 |**name**  <br>*optional*|Name of the service - Valued with service-instance-name|string|
220 |**relatedParty**  <br>*optional*||< [RelatedPartyRef](#relatedpartyref) > array|
221 |**serviceSpecification**  <br>*optional*||[ServiceSpecificationRef](#servicespecificationref)|
222 |**state**  <br>*optional*||[stateValues](#statevalues)|
223 |**supportingResource**  <br>*optional*||< [SupportingResource](#supportingresource) > array|
224 |**type**  <br>*optional*|Service type - valued with 'service-instance'|string|
225
226
227 <a name="servicecharacteristic"></a>
228 ### ServiceCharacteristic
229 A list of name value pairs that define the service characteristics
230 Not managed in Beijing release.
231
232
233 |Name|Description|Schema|
234 |---|---|---|
235 |**name**  <br>*required*|Name of the characteristic<br>Not managed in Beijing release.|string|
236 |**value**  <br>*optional*||[Value](#value)|
237 |**valueType**  <br>*optional*|Type of value for this characteristic.<br>Not managed in Beijing release.|string|
238
239
240 <a name="servicespecificationref"></a>
241 ### ServiceSpecificationRef
242 Service specification reference: ServiceSpecification of this service (catalog information)
243
244
245 |Name|Description|Schema|
246 |---|---|---|
247 |**@referredType**  <br>*optional*|This attribute allows to dynamically extends TMF class. Valued with 'ONAPservice'. We used this features to add following attribute: invariantUUID|string|
248 |**@schemaLocation**  <br>*optional*|Not managed in Beijing release|string|
249 |**href**  <br>*optional*|Reference of the service specification.<br>not managed in Beijing release.|string|
250 |**id**  <br>*optional*|Unique identifier of the service specification. valued to model-version-id|string|
251 |**invariantUUID**  <br>*optional*|Additional attribute (not in the TMF API) - extended through @referredType - model-invariant-id|string|
252 |**name**  <br>*optional*|Name of the required service specification|string|
253 |**version**  <br>*optional*|Service specification version.<br>Not managed in Beijing release|string|
254
255
256 <a name="supportingresource"></a>
257 ### SupportingResource
258 Supporting resource - A supportingResource will be retrieved for each relationship of the relationship-list where related-link describe a vnf
259
260
261 |Name|Description|Schema|
262 |---|---|---|
263 |**@referredType**  <br>*optional*|This attribute allows to dynamically extends TMF class. Valued with 'ONAP resource'. We used this features to add following attributes:<br>    status        <br>    modelInvariantId<br>   modelVersionId<br>   modelCustomisationId|string|
264 |**@schemaLocation**  <br>*optional*|Not managed in Beijing release.|string|
265 |**href**  <br>*optional*|Reference of the supporting resource|string|
266 |**id**  <br>*optional*|Unique identifier of the supporting resource - Valued to vnf-id|string|
267 |**modelCustomisationId**  <br>*optional*|Additional attribute (not in the TMF API) - extended through @referredType - valued with model-customisation-id|string|
268 |**modelInvariantId**  <br>*optional*|Additional attribute (not in the TMF API) - extended through @referredType - valued with model-invariant-id|string|
269 |**modelVersionId**  <br>*optional*|Additional attribute (not in the TMF API) - extended through @referredType - valued with model-verson-id|string|
270 |**name**  <br>*optional*|Name of the supporting resource - Valued with vnf_-name|string|
271 |**role**  <br>*optional*|Not managed in Beijing release.|string|
272 |**status**  <br>*optional*|Additional attribute (not in the TMF API) - extended through @referredType - valued with prov-status|string|
273
274
275 <a name="value"></a>
276 ### Value
277 Structure used to describe characteristic value.
278 Not managed in Beijing release.
279
280
281 |Name|Description|Schema|
282 |---|---|---|
283 |**@schemaLocation**  <br>*optional*|Not managed in Beijing release.|string|
284 |**@type**  <br>*optional*|Not managed in Beijing release.|string|
285 |**serviceCharacteristicValue**  <br>*optional*|Not managed in Beijing release.|string|
286
287
288 <a name="statevalues"></a>
289 ### stateValues
290 *Type* : enum (feasibilityChecked, designed, reserved, inactive, active, terminated)
291