Merge "Add docker-compose file for odu-app"
[nonrtric.git] / r-app-catalogue / api / rac-api.yaml
1 openapi: 3.0.0
2 info:
3   title: rAPP Catalogue API
4   description: The Non RT-RIC Service Catalogue provides a way for services to register
5     themselves for other services to discover.
6   version: 1.0.0
7 servers:
8 - url: /
9 paths:
10   /services:
11     get:
12       tags:
13       - rAPP Catalogue API
14       summary: Services
15       operationId: getServices
16       responses:
17         "200":
18           description: Services
19           content:
20             application/json:
21               schema:
22                 type: array
23                 items:
24                   $ref: '#/components/schemas/service'
25       deprecated: false
26   /services/{serviceName}:
27     get:
28       tags:
29       - rAPP Catalogue API
30       summary: Individual Service
31       operationId: getIndividualService
32       parameters:
33       - name: serviceName
34         in: path
35         description: serviceName
36         required: true
37         style: simple
38         explode: false
39         schema:
40           type: string
41         example: DroneIdentifier
42       responses:
43         "200":
44           description: Service
45           content:
46             application/json:
47               schema:
48                 $ref: '#/components/schemas/service'
49         "404":
50           description: Service is not found
51           content:
52             application/json:
53               schema:
54                 $ref: '#/components/schemas/error_information'
55       deprecated: false
56     put:
57       tags:
58       - rAPP Catalogue API
59       summary: Create or update a Service
60       operationId: putIndividualService
61       parameters:
62       - name: serviceName
63         in: path
64         required: true
65         style: simple
66         explode: false
67         schema:
68           type: string
69         example: DroneIdentifier
70       requestBody:
71         description: Service to create/update
72         content:
73           application/json:
74             schema:
75               $ref: '#/components/schemas/inputService'
76         required: true
77       responses:
78         "200":
79           description: Service updated
80         "201":
81           description: Service created
82           headers:
83             Location:
84               description: URL to the created Service
85               style: simple
86               explode: false
87               schema:
88                 type: string
89         "400":
90           description: Provided service is not correct
91           content:
92             application/json:
93               schema:
94                 $ref: '#/components/schemas/error_information'
95               example:
96                 detail: "Service is missing required property: version"
97                 status: 400
98       deprecated: false
99     delete:
100       tags:
101       - rAPP Catalogue API
102       summary: Remove a Service from the catalogue
103       operationId: deleteIndividualService
104       parameters:
105       - name: serviceName
106         in: path
107         required: true
108         style: simple
109         explode: false
110         schema:
111           type: string
112         example: DroneIdentifier
113       responses:
114         "204":
115           description: Service deleted
116       deprecated: false
117 components:
118   schemas:
119     inputService:
120       title: inputService
121       required:
122       - version
123       type: object
124       properties:
125         version:
126           type: string
127           description: Version of the Service
128           example: 1.0.0
129         display_name:
130           type: string
131           description: Display name for the Service
132           example: Drone Identifier
133         description:
134           type: string
135           description: Description of the Service
136           example: Detects if a UE is a drone
137       description: A Service to register
138     service:
139       title: service
140       required:
141       - name
142       - registrationDate
143       - version
144       type: object
145       properties:
146         name:
147           type: string
148           description: Unique identifier of the Service
149           example: DroneIdentifier
150         version:
151           type: string
152           description: Version of the Service
153           example: 1.0.0
154         display_name:
155           type: string
156           description: Display name for the Service
157           example: Drone Identifier
158         description:
159           type: string
160           description: Description of the Service
161           example: Detects if a UE is a drone
162         registrationDate:
163           type: string
164           description: Date when the Service was registered in the catalogue
165           example: 2020-11-03
166       description: A Service
167     error_information:
168       title: error_information
169       type: object
170       properties:
171         detail:
172           type: string
173           description: A human-readable explanation specific to this occurrence of
174             the problem.
175           example: Service not found
176         status:
177           type: integer
178           description: The HTTP status code for this occurrence of the problem.
179           format: int32
180           example: 404
181       description: Problem as defined in https://tools.ietf.org/html/rfc7807