Introduce rAPP Catalogue API
[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: Service names
15       operationId: getServiceNamesUsingGET
16       responses:
17         200:
18           description: Service names
19           content:
20             application/json:
21               schema:
22                 type: array
23                 items:
24                   type: string
25               example:
26               - DroneIdentifier
27               - Collector
28         401:
29           description: Unauthorized
30         403:
31           description: Forbidden
32         404:
33           description: Not used
34       deprecated: false
35   /services/{serviceName}:
36     get:
37       tags:
38       - rAPP Catalogue API
39       summary: Individual Service
40       operationId: getIndividualServiceUsingGET
41       parameters:
42       - name: serviceName
43         in: path
44         description: serviceName
45         required: true
46         style: simple
47         explode: false
48         schema:
49           type: string
50         example: DroneIdentifier
51       responses:
52         200:
53           description: EI Job
54           content:
55             application/json:
56               schema:
57                 $ref: '#/components/schemas/service'
58         401:
59           description: Unauthorized
60         403:
61           description: Forbidden
62         404:
63           description: Service is not found
64           content:
65             application/json:
66               schema:
67                 $ref: '#/components/schemas/error_information'
68       deprecated: false
69     put:
70       tags:
71       - rAPP Catalogue API
72       summary: Create or update a Service
73       operationId: putIndividualServiceUsingPUT
74       parameters:
75       - name: serviceName
76         in: path
77         required: true
78         style: simple
79         explode: false
80         schema:
81           type: string
82         example: DroneIdentifier
83       requestBody:
84         description: Service to create/update
85         content:
86           application/json:
87             schema:
88               $ref: '#/components/schemas/service'
89         required: true
90       responses:
91         200:
92           description: Service updated
93         201:
94           description: Service created
95         401:
96           description: Unauthorized
97         403:
98           description: Forbidden
99         404:
100           description: Provided service is not correct
101           content:
102             application/json:
103               schema:
104                 $ref: '#/components/schemas/error_information'
105               example:
106                 detail: Service is missing required property version
107                 status: 404
108       deprecated: false
109     delete:
110       tags:
111       - rAPP Catalogue API
112       summary: Remove a Service from the catalogue
113       operationId: deleteIndividualServiceUsingDELETE
114       parameters:
115       - name: serviceName
116         in: path
117         required: true
118         style: simple
119         explode: false
120         schema:
121           type: string
122         example: DroneIdentifier
123       responses:
124         200:
125           description: Not used
126         204:
127           description: Job deleted
128         401:
129           description: Unauthorized
130         403:
131           description: Forbidden
132         404:
133           description: Service is not found
134           content:
135             application/json:
136               schema:
137                 $ref: '#/components/schemas/error_information'
138       deprecated: false
139 components:
140   schemas:
141     service:
142       title: service
143       required:
144       - version
145       type: object
146       properties:
147         version:
148           type: string
149           description: Version of the Service
150           example: 1.0.0
151         display_name:
152           type: string
153           description: Display name for the Service
154           example: Drone Identifier
155         description:
156           type: string
157           description: Description of the Service
158           example: Detects if a UE is a drone
159       description: A Service
160     error_information:
161       title: error_information
162       type: object
163       properties:
164         detail:
165           type: string
166           description: A human-readable explanation specific to this occurrence of
167             the problem.
168           example: Service not found
169         status:
170           type: integer
171           description: The HTTP status code generated by the origin server for this
172             occurrence of the problem.
173           format: int32
174           example: 404
175       description: Problem as defined in https://tools.ietf.org/html/rfc7807