Introduce rAPP Catalogue API
[nonrtric.git] / r-app-catalogue / api / rac-api.json
1 {
2   "openapi": "3.0.0",
3   "info": {
4     "title": "rAPP Catalogue API",
5     "description": "The Non RT-RIC Service Catalogue provides a way for services to register themselves for other services to discover.",
6     "version": "1.0.0"
7   },
8   "paths": {
9     "/services": {
10       "get": {
11         "summary": "Service names",
12         "deprecated": false,
13         "operationId": "getServiceNamesUsingGET",
14         "responses": {
15           "200": {
16             "description": "Service names",
17             "content": {
18               "application/json": {
19                 "schema": {
20                   "type": "array",
21                   "items": {
22                     "type": "string"
23                   }
24                 },
25                 "example": [
26                   "DroneIdentifier",
27                   "Collector"
28                 ]
29               }
30             }
31           },
32           "401": {
33             "description": "Unauthorized"
34           },
35           "403": {
36             "description": "Forbidden"
37           },
38           "404": {
39             "description": "Not used"
40           }
41         },
42         "tags": [
43           "rAPP Catalogue API"
44         ]
45       }
46     },
47     "/services/{serviceName}": {
48       "get": {
49         "summary": "Individual Service",
50         "deprecated": false,
51         "operationId": "getIndividualServiceUsingGET",
52         "responses": {
53           "200": {
54             "description": "EI Job",
55             "content": {
56               "application/json": {
57                 "schema": {
58                   "$ref": "#/components/schemas/service"
59                 }
60               }
61             }
62           },
63           "401": {
64             "description": "Unauthorized"
65           },
66           "403": {
67             "description": "Forbidden"
68           },
69           "404": {
70             "description": "Service is not found",
71             "content": {
72               "application/json": {
73                 "schema": {
74                   "$ref": "#/components/schemas/error_information"
75                 }
76               }
77             }
78           }
79         },
80         "parameters": [
81           {
82             "in": "path",
83             "name": "serviceName",
84             "description": "serviceName",
85             "schema": {
86               "type": "string"
87             },
88             "required": true,
89             "example": "DroneIdentifier"
90           }
91         ],
92         "tags": [
93           "rAPP Catalogue API"
94         ]
95       },
96       "put": {
97         "summary": "Create or update a Service",
98         "deprecated": false,
99         "operationId": "putIndividualServiceUsingPUT",
100         "responses": {
101           "200": {
102             "description": "Service updated"
103           },
104           "201": {
105             "description": "Service created"
106           },
107           "401": {
108             "description": "Unauthorized"
109           },
110           "403": {
111             "description": "Forbidden"
112           },
113           "404": {
114             "description": "Provided service is not correct",
115             "content": {
116               "application/json": {
117                 "schema": {
118                   "$ref": "#/components/schemas/error_information"
119                 },
120                 "example": {
121                   "detail": "Service is missing required property version",
122                   "status": 404
123                 }
124               }
125             }
126           }
127         },
128         "parameters": [
129           {
130             "name": "serviceName",
131             "in": "path",
132             "required": true,
133             "schema": {
134               "type": "string"
135             },
136             "example": "DroneIdentifier"
137           }
138         ],
139         "requestBody": {
140           "description": "Service to create/update",
141           "required": true,
142           "content": {
143             "application/json": {
144               "schema": {
145                 "$ref": "#/components/schemas/service"
146               }
147             }
148           }
149         },
150         "tags": [
151           "rAPP Catalogue API"
152         ]
153       },
154       "delete": {
155         "summary": "Remove a Service from the catalogue",
156         "deprecated": false,
157         "operationId": "deleteIndividualServiceUsingDELETE",
158         "responses": {
159           "200": {
160             "description": "Not used"
161           },
162           "204": {
163             "description": "Job deleted"
164           },
165           "401": {
166             "description": "Unauthorized"
167           },
168           "403": {
169             "description": "Forbidden"
170           },
171           "404": {
172             "description": "Service is not found",
173             "content": {
174               "application/json": {
175                 "schema": {
176                   "$ref": "#/components/schemas/error_information"
177                 }
178               }
179             }
180           }
181         },
182         "parameters": [
183           {
184             "name": "serviceName",
185             "in": "path",
186             "required": true,
187             "schema": {
188               "type": "string"
189             },
190             "example": "DroneIdentifier"
191           }
192         ],
193         "tags": [
194           "rAPP Catalogue API"
195         ]
196       }
197     }
198   },
199   "components": {
200     "schemas": {
201       "service": {
202         "description": "A Service",
203         "type": "object",
204         "title": "service",
205         "required": [
206           "version"
207         ],
208         "properties": {
209           "version": {
210             "description": "Version of the Service",
211             "type": "string",
212             "example": "1.0.0"
213           },
214           "display_name": {
215             "description": "Display name for the Service",
216             "type": "string",
217             "example": "Drone Identifier"
218           },
219           "description": {
220             "description": "Description of the Service",
221             "type": "string",
222             "example": "Detects if a UE is a drone"
223           }
224         }
225       },
226       "error_information": {
227         "description": "Problem as defined in https://tools.ietf.org/html/rfc7807",
228         "type": "object",
229         "title": "error_information",
230         "properties": {
231           "detail": {
232             "description": "A human-readable explanation specific to this occurrence of the problem.",
233             "type": "string",
234             "example": "Service not found"
235           },
236           "status": {
237             "format": "int32",
238             "description": "The HTTP status code generated by the origin server for this occurrence of the problem.",
239             "type": "integer",
240             "example": 404
241           }
242         }
243       }
244     }
245   }
246 }