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