blob: 569fa19f378f085be2402bc4d9567f9e3587c4cf [file] [log] [blame]
egernugb0ee0382024-04-17 10:08:38 +01001# ============LICENSE_START=======================================================
2# Copyright (C) 2024 Nordix Foundation
3# ================================================================================
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16# SPDX-License-Identifier: Apache-2.0
17# ============LICENSE_END=========================================================
18
19openapi: 3.0.3
20info:
21 title: NCMP Data Subjob API
22 description: Support datajobs through one or more subjob for each DMI and Data Producer Identifier combination
23 version: 1.0.0
24servers:
25 - url: /dmi
26tags:
27 - description: DMI plugin rest apis
28 name: dmi-datajob
29paths:
leventecsanyi636c2282024-08-15 13:52:21 +020030 /v1/cmreadJob:
egernugb0ee0382024-04-17 10:08:38 +010031 post:
32 description: Create a read request
egernugd9a46152024-05-14 14:02:07 +010033 operationId: readDataJob
egernugb0ee0382024-04-17 10:08:38 +010034 parameters:
leventecsanyi636c2282024-08-15 13:52:21 +020035 - $ref: '#/components/parameters/destinationInQuery'
egernugb0ee0382024-04-17 10:08:38 +010036 requestBody:
37 description: Operation body
38 content:
39 application/3gpp-json-patch+json:
40 schema:
egernugd9a46152024-05-14 14:02:07 +010041 $ref: '#/components/schemas/SubjobReadRequest'
42 tags:
43 - dmi-datajob
44 responses:
egernugdaf2ba82024-05-29 10:22:59 +010045 "501":
46 $ref: '#/components/responses/NotImplemented'
leventecsanyi636c2282024-08-15 13:52:21 +020047 /v1/cmwriteJob:
egernugd9a46152024-05-14 14:02:07 +010048 post:
49 description: Create a write request
50 operationId: writeDataJob
51 parameters:
leventecsanyi636c2282024-08-15 13:52:21 +020052 - $ref: '#/components/parameters/destinationInQuery'
egernugd9a46152024-05-14 14:02:07 +010053 requestBody:
54 description: Operation body
55 content:
56 application/3gpp-json-patch+json:
57 schema:
58 $ref: '#/components/schemas/SubjobWriteRequest'
egernugb0ee0382024-04-17 10:08:38 +010059 tags:
60 - dmi-datajob
61 responses:
egernugdaf2ba82024-05-29 10:22:59 +010062 "501":
63 $ref: '#/components/responses/NotImplemented'
leventecsanyi636c2282024-08-15 13:52:21 +020064 /v1/cmwriteJob/dataProducer/{dataProducerId}/dataProducerJob/{dataProducerJobId}/status:
leventecsanyi7f49c702024-07-24 15:42:32 +020065 get:
66 description: Retrieve the status of a specific data job.
67 operationId: getDataJobStatus
68 parameters:
leventecsanyi636c2282024-08-15 13:52:21 +020069 - $ref: '#/components/parameters/dataProducerIdInPath'
leventecsanyi7f49c702024-07-24 15:42:32 +020070 - $ref: '#/components/parameters/dataProducerJobIdInPath'
leventecsanyi7f49c702024-07-24 15:42:32 +020071 tags:
72 - dmi-datajob
73 responses:
74 "501":
75 $ref: '#/components/responses/NotImplemented'
leventecsanyi658f4d42024-08-05 15:46:59 +020076 /v1/cmwriteJob/dataProducer/{dataProducerId}/dataProducerJob/{dataProducerJobId}/result:
leventecsanyiee4242c2024-07-26 13:25:12 +020077 get:
78 description: Retrieve the result of a data job.
79 operationId: getDataJobResult
80 parameters:
leventecsanyi658f4d42024-08-05 15:46:59 +020081 - $ref: '#/components/parameters/dataProducerIdInPath'
leventecsanyiee4242c2024-07-26 13:25:12 +020082 - $ref: '#/components/parameters/dataProducerJobIdInPath'
leventecsanyiee4242c2024-07-26 13:25:12 +020083 - $ref: '#/components/parameters/destinationInQuery'
84 tags:
85 - dmi-datajob
86 responses:
87 "501":
88 $ref: '#/components/responses/NotImplemented'
egernugdaf2ba82024-05-29 10:22:59 +010089
egernugb0ee0382024-04-17 10:08:38 +010090components:
91 parameters:
92 requestIdInPath:
93 description: Identifier for the overall Datajob
94 in: path
95 name: requestId
96 required: true
97 schema:
98 example: some-identifier
99 type: string
leventecsanyi7f49c702024-07-24 15:42:32 +0200100 dataProducerJobIdInPath:
101 description: Identifier for the data producer job
102 in: path
103 name: dataProducerJobId
104 required: true
105 schema:
106 example: some-producer-job-identifier
107 type: string
leventecsanyi636c2282024-08-15 13:52:21 +0200108 dataProducerIdInPath:
109 name: dataProducerId
110 in: path
111 description: Identifier for the data producer
112 required: true
113 schema:
114 type: string
115 example: some-data-producer-identifier
leventecsanyi7f49c702024-07-24 15:42:32 +0200116 dataProducerIdInQuery:
117 name: dataProducerId
118 in: query
119 description: Identifier for the data producer
120 required: true
121 schema:
122 type: string
123 example: some-data-producer-identifier
leventecsanyiee4242c2024-07-26 13:25:12 +0200124 destinationInQuery:
125 name: destination
126 in: query
127 description: The destination of the results (Kafka topic name or s3 bucket name)
128 required: true
129 schema:
130 type: string
131 example: some-destination
egernugb0ee0382024-04-17 10:08:38 +0100132 schemas:
egernugdaf2ba82024-05-29 10:22:59 +0100133 ErrorMessage:
134 type: object
135 title: Error
136 properties:
137 status:
138 type: string
139 message:
140 type: string
141 details:
142 type: string
egernugd9a46152024-05-14 14:02:07 +0100143 SubjobReadRequest:
egernugb0ee0382024-04-17 10:08:38 +0100144 type: object
145 required:
146 - dataProducerId
147 - data
148 properties:
149 dataAcceptType:
150 description: Defines the data response accept type
151 example: application/vnd.3gpp.object-tree-hierarchical+json
152 type: string
153 dataContentType:
154 description: Defines the data request content type
155 example: application/3gpp-json-patch+json
156 type: string
157 dataProducerId:
158 description: ID of the producer registered by DMI for the paths in the operations in this request
159 example: my-data-producer-identifier
160 type: string
161 data:
egernugd9a46152024-05-14 14:02:07 +0100162 example:
163 op: read
164 operationId: 1
165 path: SubNetwork=Europe/SubNetwork=Ireland/MeContext=NR03gNodeBRadio00003/ManagedElement=NR03gNodeBRadio00003/GNBCUCPFunction=2
166 attributes: userLabel
167 scope:
168 scopeTyp: BASE_ONLY
169 type: array
170 items:
egernugb0ee0382024-04-17 10:08:38 +0100171 type: object
egernugd9a46152024-05-14 14:02:07 +0100172 required:
173 - path
174 - op
175 properties:
176 path:
177 description: Defines the resource on which operation is executed
178 example: SubNetwork=Europe/SubNetwork=Ireland/MeContext=NR03gNodeBRadio00003/ManagedElement=NR03gNodeBRadio00003
179 type: string
180 op:
181 description: Describes the operation to execute
182 example: read
183 type: string
184 operationId:
185 description: Unique identifier for the operation within the request
186 example: 1
187 type: string
188 attributes:
189 description: This parameter specifies the attributes of the scoped resources that are returned
190 type: array
191 items:
192 example: cellId
193 type: string
194 fields:
195 description: This parameter specifies the attribute fields of the scoped resources that are returned
196 type: array
197 items:
198 type: string
199 filter:
200 description: This parameter is used to filter the scoped Managed Objects. Only Managed Objects passing the filter criteria will be fetched
201 example: NRCellDU/attributes/administrativeState==LOCKED
202 type: string
203 scopeType:
204 description: ScopeType selects MOs depending on relationships with Base Managed Object
205 example: BASE_ONLY
206 type: string
207 scopeLevel:
208 description: Only used when the scope type is BASE_NTH_LEVEL to specify amount of levels to search
209 example: 0
210 type: integer
211 moduleSetTag:
212 description: Module set identifier
213 example: my-module-set-tag
214 type: string
215 cmHandleProperties:
216 description: Private properties of the cm handle for the given path
217 $ref: '#/components/schemas/CmHandleProperties'
218 SubjobWriteRequest:
219 type: object
220 required:
221 - dataProducerId
222 - data
223 properties:
224 dataAcceptType:
225 description: Defines the data response accept type
226 example: application/vnd.3gpp.object-tree-hierarchical+json
227 type: string
228 dataContentType:
229 description: Defines the data request content type
230 example: application/3gpp-json-patch+json
231 type: string
232 dataProducerId:
233 description: ID of the producer registered by DMI for the paths in the operations in this request
234 example: my-data-producer-identifier
235 type: string
leventecsanyi636c2282024-08-15 13:52:21 +0200236 dataJobId:
237 description: Identifier for the overall Data Job
238 example: my-data-producer-identifier
239 type: string
egernugd9a46152024-05-14 14:02:07 +0100240 data:
241 example:
242 op: add
243 path: SubNetwork=Europe/SubNetwork=Ireland/MeContext=NR03gNodeBRadio00003/ManagedElement=NR03gNodeBRadio00003/GNBCUCPFunction=1/EUtraNetwork=1/EUtranFrequency=12
244 value:
245 id: 12
246 attributes:
247 userLabel: label12
248 type: array
249 items:
250 type: object
251 required:
252 - path
253 - op
254 properties:
255 path:
256 description: Defines the resource on which operation is executed
257 example: SubNetwork=Europe/SubNetwork=Ireland/MeContext=NR03gNodeBRadio00003/ManagedElement=NR03gNodeBRadio00003
258 type: string
259 op:
260 description: Describes the operation to execute
261 example: add
262 type: string
263 operationId:
264 description: Unique identifier for the operation within the request
265 example: 1
266 type: string
267 moduleSetTag:
268 description: Module set identifier
269 example: my-module-set-tag
270 type: string
271 cmHandleProperties:
272 description: Private properties of the cm handle for the given path
273 $ref: '#/components/schemas/CmHandleProperties'
274 value:
275 description: Value dependent on the op specified. Resource for an add. Object for a replace. ActionParameters for an action.
276 type: object
277 oneOf:
278 - $ref: '#/components/schemas/Resource'
279 - $ref: '#/components/schemas/ActionParameters'
280 - $ref: '#/components/schemas/Object'
egernugb0ee0382024-04-17 10:08:38 +0100281 CmHandleProperties:
282 description: Private properties of the cm handle for the given path
283 type: object
284 Resource:
285 type: object
286 properties:
287 id:
288 description: Identifier of the resource object
289 example: resource-identifier
290 type: string
291 attributes:
292 description: Key value map representing the objects class attributes and values
293 type: object
294 additionalProperties:
295 example: 'userLabel: label11'
296 type: string
297 ActionParameters:
298 description: The input of the action in the form of key value pairs
299 type: object
300 additionalProperties:
301 type: string
302 Object:
303 type: object
leventecsanyiaa4d6e22024-07-18 13:45:35 +0200304 SubjobWriteResponse:
305 type: object
306 required:
307 - subJobId
308 - dmiServiceName
309 - dataProducerId
310 properties:
311 subJobId:
312 description: Unique identifier for the sub-job
313 example: my-sub-job-id
314 type: string
315 dmiServiceName:
316 description: Name of the relevant DMI Service
317 example: my-dmi-service
318 type: string
319 dataProducerId:
320 description: ID of the producer registered by DMI for the paths in the operations in this request
321 example: my-data-producer-identifier
322 type: string
egernugdaf2ba82024-05-29 10:22:59 +0100323 responses:
324 NotImplemented:
325 description: Not Implemented
326 content:
327 application/json:
328 schema:
329 $ref: '#/components/schemas/ErrorMessage'
330 example:
331 status: 501
332 message: Not Implemented
333 details: Method Not Implemented