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