Add API Documentation for Casablanca
[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/5ymwb6l1dR/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/5ymwb6l1dR/plantuml&noCache=137264.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* : 3.0.0_inProgress
21
22
23 ### URI scheme
24 *Host* : serverRoot  
25 *BasePath* : /nbi/api/v3
26 *Schemes* : HTTPS
27
28
29 ### Tags
30
31 * Service
32
33
34 ### Produces
35
36 * `application/json;charset=utf-8`
37
38
39 <a name="paths"></a>
40 ## Resources
41
42 <a name="service_resource"></a>
43 ### Service
44
45 <a name="servicefind"></a>
46 #### List services
47 ```
48 GET /service
49 ```
50
51
52 ##### Description
53 This operation list service entities. 
54 Attribute selection is restricted. 
55 fields attribute may be used to filter retrieved attribute(s) for each service
56
57 Specific business errors for current operation will be encapsulated in
58
59 HTTP Response 422 Unprocessable entity
60
61
62 ##### Parameters
63
64 |Type|Name|Schema|
65 |---|---|---|
66 |**Query**|**fields**  <br>*optional*|string|
67 |**Query**|**id**  <br>*optional*|string|
68 |**Query**|**relatedParty.id**  <br>*optional*|string|
69 |**Query**|**serviceSpecification.id**  <br>*optional*|string|
70 |**Query**|**serviceSpecification.name**  <br>*optional*|string|
71
72
73 ##### Responses
74
75 |HTTP Code|Description|Schema|
76 |---|---|---|
77 |**200**|Success|< [ListService](#listservice) > array|
78 |**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)|
79 |**401**|Unauthorized<br><br>List of supported error codes:<br>- 40: Missing credentials<br>- 41: Invalid credentials<br>- 42: Expired credentials|[ErrorRepresentation](#errorrepresentation)|
80 |**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)|
81 |**404**|Not Found<br><br>List of supported error codes:<br>- 60: Resource not found|[ErrorRepresentation](#errorrepresentation)|
82 |**422**|Unprocessable entity<br><br>Functional error|[ErrorRepresentation](#errorrepresentation)|
83 |**500**|Internal Server Error<br><br>List of supported error codes:<br>- 1: Internal error|[ErrorRepresentation](#errorrepresentation)|
84 |**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)|
85
86
87 ##### Produces
88
89 * `application/json;charset=utf-8`
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 ##### Produces
133
134 * `application/json;charset=utf-8`
135
136
137 <a name="definitions"></a>
138 ## Definitions
139
140 <a name="errorrepresentation"></a>
141 ### ErrorRepresentation
142 This class is used to describe error.
143 for nbi Beijing release we do not manage additional error for serviceCatalog
144
145
146 |Name|Description|Schema|
147 |---|---|---|
148 |**@schemaLocation**  <br>*optional*|it provides a link to the schema describing a REST resource.|string|
149 |**@type**  <br>*optional*|The class type of a REST resource.|string|
150 |**code**  <br>*required*|Application related code (as defined in the API or from a common list)|integer (int32)|
151 |**message**  <br>*optional*|Text that provide more details and corrective actions related to the error. This can be shown to a client user.|string|
152 |**reason**  <br>*required*|Text that explains the reason for error. This can be shown to a client user.|string|
153 |**referenceError**  <br>*optional*|url pointing to documentation describing the error|string|
154 |**status**  <br>*optional*|http error code extension like 400-2|string|
155
156
157 <a name="listrelatedpartyref"></a>
158 ### ListRelatedPartyRef
159 This class is used to structure list of service(s) retrieved
160
161
162 |Name|Description|Schema|
163 |---|---|---|
164 |**id**  <br>*optional*|Unique identifier of a related party|string|
165 |**role**  <br>*optional*|Role played by the related party - only role “ONAPcustomer” is managed in Beijing release.|string|
166
167
168 <a name="listservice"></a>
169 ### ListService
170 This class is used to structure list of service(s) retrieved
171
172
173 |Name|Description|Schema|
174 |---|---|---|
175 |**id**  <br>*optional*|Unique identifier of the service|string|
176 |**name**  <br>*optional*|Name of the service|string|
177 |**relatedParty**  <br>*optional*||[ListRelatedPartyRef](#listrelatedpartyref)|
178 |**serviceSpecification**  <br>*optional*||[ListServiceSpecificationRef](#listservicespecificationref)|
179
180
181 <a name="listservicespecificationref"></a>
182 ### ListServiceSpecificationRef
183 This class is used to structure list of service(s) retrieved
184
185
186 |Name|Description|Schema|
187 |---|---|---|
188 |**id**  <br>*optional*|Unique identifier of the service specification|string|
189 |**name**  <br>*optional*|Name of the required service specification|string|
190
191
192 <a name="relatedpartyref"></a>
193 ### RelatedPartyRef
194 RelatedParty reference. A related party defines party or party role linked to a specific entity.
195 Only ONAP Customer is managed in Beijing release.
196
197
198 |Name|Description|Schema|
199 |---|---|---|
200 |**@referredType**  <br>*optional*|Not managed in the Beijing release.|string|
201 |**href**  <br>*optional*|Reference of a related party.<br>Not filled in Beijing release.|string|
202 |**id**  <br>*optional*|Unique identifier of a related party|string|
203 |**role**  <br>*optional*|Role played by the related party.<br>Filled with 'ONAPcustomer'|string|
204
205
206 <a name="service"></a>
207 ### Service
208 Instantiated service (service_instance) in AAI
209
210
211 |Name|Description|Schema|
212 |---|---|---|
213 |**@baseType**  <br>*optional*|Not managed in Beijing release|string|
214 |**@schemaLocation**  <br>*optional*|Not managed in Beijing release|string|
215 |**@type**  <br>*optional*|This attribute allows to dynamically extends TMF class. Not used in Beijing release.|string|
216 |**characteristic**  <br>*optional*||< [ServiceCharacteristic](#servicecharacteristic) > array|
217 |**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|
218 |**href**  <br>*optional*|Reference of the service<br>Not managed in Beijing release|string|
219 |**id**  <br>*optional*|Unique identifier of the service - Valued with service-instance-id|string|
220 |**name**  <br>*optional*|Name of the service - Valued with service-instance-name|string|
221 |**relatedParty**  <br>*optional*||< [RelatedPartyRef](#relatedpartyref) > array|
222 |**serviceSpecification**  <br>*optional*||[ServiceSpecificationRef](#servicespecificationref)|
223 |**state**  <br>*optional*|State of the service. Not managed in Beijing release|string|
224 |**supportingResource**  <br>*optional*||< [SupportingResource](#supportingresource) > array|
225 |**type**  <br>*optional*|Service type - valued with 'service-instance'|string|
226
227
228 <a name="servicecharacteristic"></a>
229 ### ServiceCharacteristic
230 A list of name value pairs that define the service characteristics
231 Not managed in Beijing release.
232
233
234 |Name|Description|Schema|
235 |---|---|---|
236 |**name**  <br>*required*|Name of the characteristic<br>Not managed in Beijing release.|string|
237 |**value**  <br>*optional*||[Value](#value)|
238 |**valueType**  <br>*optional*|Type of value for this characteristic.<br>Not managed in Beijing release.|string|
239
240
241 <a name="servicespecificationref"></a>
242 ### ServiceSpecificationRef
243 Service specification reference: ServiceSpecification of this service (catalog information)
244
245
246 |Name|Description|Schema|
247 |---|---|---|
248 |**@referredType**  <br>*optional*|This attribute allows to dynamically extends TMF class. Valued with 'ONAPservice'. We used this features to add following attribute: invariantUUID|string|
249 |**@schemaLocation**  <br>*optional*|Not managed in Beijing release|string|
250 |**href**  <br>*optional*|Reference of the service specification.<br>not managed in Beijing release.|string|
251 |**id**  <br>*optional*|Unique identifier of the service specification. valued to model-version-id|string|
252 |**invariantUUID**  <br>*optional*|Additional attribute (not in the TMF API) - extended through @referredType - model-invariant-id|string|
253 |**name**  <br>*optional*|Name of the required service specification|string|
254 |**version**  <br>*optional*|Service specification version.<br>Not managed in Beijing release|string|
255
256
257 <a name="supportingresource"></a>
258 ### SupportingResource
259 Supporting resource - A supportingResource will be retrieved for each relationship of the relationship-list where related-link describe a vnf
260
261
262 |Name|Description|Schema|
263 |---|---|---|
264 |**@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|
265 |**@schemaLocation**  <br>*optional*|Not managed in Beijing release.|string|
266 |**href**  <br>*optional*|Reference of the supporting resource|string|
267 |**id**  <br>*optional*|Unique identifier of the supporting resource - Valued to vnf-id|string|
268 |**modelCustomisationId**  <br>*optional*|Additional attribute (not in the TMF API) - extended through @referredType - valued with model-customisation-id|string|
269 |**modelInvariantId**  <br>*optional*|Additional attribute (not in the TMF API) - extended through @referredType - valued with model-invariant-id|string|
270 |**modelVersionId**  <br>*optional*|Additional attribute (not in the TMF API) - extended through @referredType - valued with model-verson-id|string|
271 |**name**  <br>*optional*|Name of the supporting resource - Valued with vnf_-name|string|
272 |**role**  <br>*optional*|Not managed in Beijing release.|string|
273 |**status**  <br>*optional*|Additional attribute (not in the TMF API) - extended through @referredType - valued with prov-status|string|
274
275
276 <a name="value"></a>
277 ### Value
278 Structure used to describe characteristic value.
279 Not managed in Beijing release.
280
281
282 |Name|Description|Schema|
283 |---|---|---|
284 |**@schemaLocation**  <br>*optional*|Not managed in Beijing release.|string|
285 |**@type**  <br>*optional*|Not managed in Beijing release.|string|
286 |**serviceCharacteristicValue**  <br>*optional*|Not managed in Beijing release.|string|
287