blob: 09e23a9e88da8bdb9c5dbc9d70ef57c1b7491773 [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'
leventecsanyiee4242c2024-07-26 13:25:12 +020076 /v1/dataJob/{requestId}/dataProducerJob/{dataProducerJobId}/result:
77 get:
78 description: Retrieve the result of a data job.
79 operationId: getDataJobResult
80 parameters:
81 - $ref: '#/components/parameters/requestIdInPath'
82 - $ref: '#/components/parameters/dataProducerJobIdInPath'
83 - $ref: '#/components/parameters/dataProducerIdInQuery'
84 - $ref: '#/components/parameters/destinationInQuery'
85 tags:
86 - dmi-datajob
87 responses:
88 "501":
89 $ref: '#/components/responses/NotImplemented'
egernugdaf2ba82024-05-29 10:22:59 +010090
egernugb0ee0382024-04-17 10:08:38 +010091components:
92 parameters:
93 requestIdInPath:
94 description: Identifier for the overall Datajob
95 in: path
96 name: requestId
97 required: true
98 schema:
99 example: some-identifier
100 type: string
leventecsanyi7f49c702024-07-24 15:42:32 +0200101 dataProducerJobIdInPath:
102 description: Identifier for the data producer job
103 in: path
104 name: dataProducerJobId
105 required: true
106 schema:
107 example: some-producer-job-identifier
108 type: string
leventecsanyi636c2282024-08-15 13:52:21 +0200109 dataProducerIdInPath:
110 name: dataProducerId
111 in: path
112 description: Identifier for the data producer
113 required: true
114 schema:
115 type: string
116 example: some-data-producer-identifier
leventecsanyi7f49c702024-07-24 15:42:32 +0200117 dataProducerIdInQuery:
118 name: dataProducerId
119 in: query
120 description: Identifier for the data producer
121 required: true
122 schema:
123 type: string
124 example: some-data-producer-identifier
leventecsanyiee4242c2024-07-26 13:25:12 +0200125 destinationInQuery:
126 name: destination
127 in: query
128 description: The destination of the results (Kafka topic name or s3 bucket name)
129 required: true
130 schema:
131 type: string
132 example: some-destination
egernugb0ee0382024-04-17 10:08:38 +0100133 schemas:
egernugdaf2ba82024-05-29 10:22:59 +0100134 ErrorMessage:
135 type: object
136 title: Error
137 properties:
138 status:
139 type: string
140 message:
141 type: string
142 details:
143 type: string
egernugd9a46152024-05-14 14:02:07 +0100144 SubjobReadRequest:
egernugb0ee0382024-04-17 10:08:38 +0100145 type: object
146 required:
147 - dataProducerId
148 - data
149 properties:
150 dataAcceptType:
151 description: Defines the data response accept type
152 example: application/vnd.3gpp.object-tree-hierarchical+json
153 type: string
154 dataContentType:
155 description: Defines the data request content type
156 example: application/3gpp-json-patch+json
157 type: string
158 dataProducerId:
159 description: ID of the producer registered by DMI for the paths in the operations in this request
160 example: my-data-producer-identifier
161 type: string
162 data:
egernugd9a46152024-05-14 14:02:07 +0100163 example:
164 op: read
165 operationId: 1
166 path: SubNetwork=Europe/SubNetwork=Ireland/MeContext=NR03gNodeBRadio00003/ManagedElement=NR03gNodeBRadio00003/GNBCUCPFunction=2
167 attributes: userLabel
168 scope:
169 scopeTyp: BASE_ONLY
170 type: array
171 items:
egernugb0ee0382024-04-17 10:08:38 +0100172 type: object
egernugd9a46152024-05-14 14:02:07 +0100173 required:
174 - path
175 - op
176 properties:
177 path:
178 description: Defines the resource on which operation is executed
179 example: SubNetwork=Europe/SubNetwork=Ireland/MeContext=NR03gNodeBRadio00003/ManagedElement=NR03gNodeBRadio00003
180 type: string
181 op:
182 description: Describes the operation to execute
183 example: read
184 type: string
185 operationId:
186 description: Unique identifier for the operation within the request
187 example: 1
188 type: string
189 attributes:
190 description: This parameter specifies the attributes of the scoped resources that are returned
191 type: array
192 items:
193 example: cellId
194 type: string
195 fields:
196 description: This parameter specifies the attribute fields of the scoped resources that are returned
197 type: array
198 items:
199 type: string
200 filter:
201 description: This parameter is used to filter the scoped Managed Objects. Only Managed Objects passing the filter criteria will be fetched
202 example: NRCellDU/attributes/administrativeState==LOCKED
203 type: string
204 scopeType:
205 description: ScopeType selects MOs depending on relationships with Base Managed Object
206 example: BASE_ONLY
207 type: string
208 scopeLevel:
209 description: Only used when the scope type is BASE_NTH_LEVEL to specify amount of levels to search
210 example: 0
211 type: integer
212 moduleSetTag:
213 description: Module set identifier
214 example: my-module-set-tag
215 type: string
216 cmHandleProperties:
217 description: Private properties of the cm handle for the given path
218 $ref: '#/components/schemas/CmHandleProperties'
219 SubjobWriteRequest:
220 type: object
221 required:
222 - dataProducerId
223 - data
224 properties:
225 dataAcceptType:
226 description: Defines the data response accept type
227 example: application/vnd.3gpp.object-tree-hierarchical+json
228 type: string
229 dataContentType:
230 description: Defines the data request content type
231 example: application/3gpp-json-patch+json
232 type: string
233 dataProducerId:
234 description: ID of the producer registered by DMI for the paths in the operations in this request
235 example: my-data-producer-identifier
236 type: string
leventecsanyi636c2282024-08-15 13:52:21 +0200237 dataJobId:
238 description: Identifier for the overall Data Job
239 example: my-data-producer-identifier
240 type: string
egernugd9a46152024-05-14 14:02:07 +0100241 data:
242 example:
243 op: add
244 path: SubNetwork=Europe/SubNetwork=Ireland/MeContext=NR03gNodeBRadio00003/ManagedElement=NR03gNodeBRadio00003/GNBCUCPFunction=1/EUtraNetwork=1/EUtranFrequency=12
245 value:
246 id: 12
247 attributes:
248 userLabel: label12
249 type: array
250 items:
251 type: object
252 required:
253 - path
254 - op
255 properties:
256 path:
257 description: Defines the resource on which operation is executed
258 example: SubNetwork=Europe/SubNetwork=Ireland/MeContext=NR03gNodeBRadio00003/ManagedElement=NR03gNodeBRadio00003
259 type: string
260 op:
261 description: Describes the operation to execute
262 example: add
263 type: string
264 operationId:
265 description: Unique identifier for the operation within the request
266 example: 1
267 type: string
268 moduleSetTag:
269 description: Module set identifier
270 example: my-module-set-tag
271 type: string
272 cmHandleProperties:
273 description: Private properties of the cm handle for the given path
274 $ref: '#/components/schemas/CmHandleProperties'
275 value:
276 description: Value dependent on the op specified. Resource for an add. Object for a replace. ActionParameters for an action.
277 type: object
278 oneOf:
279 - $ref: '#/components/schemas/Resource'
280 - $ref: '#/components/schemas/ActionParameters'
281 - $ref: '#/components/schemas/Object'
egernugb0ee0382024-04-17 10:08:38 +0100282 CmHandleProperties:
283 description: Private properties of the cm handle for the given path
284 type: object
285 Resource:
286 type: object
287 properties:
288 id:
289 description: Identifier of the resource object
290 example: resource-identifier
291 type: string
292 attributes:
293 description: Key value map representing the objects class attributes and values
294 type: object
295 additionalProperties:
296 example: 'userLabel: label11'
297 type: string
298 ActionParameters:
299 description: The input of the action in the form of key value pairs
300 type: object
301 additionalProperties:
302 type: string
303 Object:
304 type: object
leventecsanyiaa4d6e22024-07-18 13:45:35 +0200305 SubjobWriteResponse:
306 type: object
307 required:
308 - subJobId
309 - dmiServiceName
310 - dataProducerId
311 properties:
312 subJobId:
313 description: Unique identifier for the sub-job
314 example: my-sub-job-id
315 type: string
316 dmiServiceName:
317 description: Name of the relevant DMI Service
318 example: my-dmi-service
319 type: string
320 dataProducerId:
321 description: ID of the producer registered by DMI for the paths in the operations in this request
322 example: my-data-producer-identifier
323 type: string
egernugdaf2ba82024-05-29 10:22:59 +0100324 responses:
325 NotImplemented:
326 description: Not Implemented
327 content:
328 application/json:
329 schema:
330 $ref: '#/components/schemas/ErrorMessage'
331 example:
332 status: 501
333 message: Not Implemented
334 details: Method Not Implemented