blob: 68ee3ecc4ab30489341a0321d86763198812be16 [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'
egernugdaf2ba82024-05-29 10:22:59 +010077
egernugb0ee0382024-04-17 10:08:38 +010078components:
79 parameters:
80 requestIdInPath:
81 description: Identifier for the overall Datajob
82 in: path
83 name: requestId
84 required: true
85 schema:
86 example: some-identifier
87 type: string
leventecsanyi7f49c702024-07-24 15:42:32 +020088 dataProducerJobIdInPath:
89 description: Identifier for the data producer job
90 in: path
91 name: dataProducerJobId
92 required: true
93 schema:
94 example: some-producer-job-identifier
95 type: string
96 dataProducerIdInQuery:
97 name: dataProducerId
98 in: query
99 description: Identifier for the data producer
100 required: true
101 schema:
102 type: string
103 example: some-data-producer-identifier
egernugb0ee0382024-04-17 10:08:38 +0100104 schemas:
egernugdaf2ba82024-05-29 10:22:59 +0100105 ErrorMessage:
106 type: object
107 title: Error
108 properties:
109 status:
110 type: string
111 message:
112 type: string
113 details:
114 type: string
egernugd9a46152024-05-14 14:02:07 +0100115 SubjobReadRequest:
egernugb0ee0382024-04-17 10:08:38 +0100116 type: object
117 required:
118 - dataProducerId
119 - data
120 properties:
121 dataAcceptType:
122 description: Defines the data response accept type
123 example: application/vnd.3gpp.object-tree-hierarchical+json
124 type: string
125 dataContentType:
126 description: Defines the data request content type
127 example: application/3gpp-json-patch+json
128 type: string
129 dataProducerId:
130 description: ID of the producer registered by DMI for the paths in the operations in this request
131 example: my-data-producer-identifier
132 type: string
133 data:
egernugd9a46152024-05-14 14:02:07 +0100134 example:
135 op: read
136 operationId: 1
137 path: SubNetwork=Europe/SubNetwork=Ireland/MeContext=NR03gNodeBRadio00003/ManagedElement=NR03gNodeBRadio00003/GNBCUCPFunction=2
138 attributes: userLabel
139 scope:
140 scopeTyp: BASE_ONLY
141 type: array
142 items:
egernugb0ee0382024-04-17 10:08:38 +0100143 type: object
egernugd9a46152024-05-14 14:02:07 +0100144 required:
145 - path
146 - op
147 properties:
148 path:
149 description: Defines the resource on which operation is executed
150 example: SubNetwork=Europe/SubNetwork=Ireland/MeContext=NR03gNodeBRadio00003/ManagedElement=NR03gNodeBRadio00003
151 type: string
152 op:
153 description: Describes the operation to execute
154 example: read
155 type: string
156 operationId:
157 description: Unique identifier for the operation within the request
158 example: 1
159 type: string
160 attributes:
161 description: This parameter specifies the attributes of the scoped resources that are returned
162 type: array
163 items:
164 example: cellId
165 type: string
166 fields:
167 description: This parameter specifies the attribute fields of the scoped resources that are returned
168 type: array
169 items:
170 type: string
171 filter:
172 description: This parameter is used to filter the scoped Managed Objects. Only Managed Objects passing the filter criteria will be fetched
173 example: NRCellDU/attributes/administrativeState==LOCKED
174 type: string
175 scopeType:
176 description: ScopeType selects MOs depending on relationships with Base Managed Object
177 example: BASE_ONLY
178 type: string
179 scopeLevel:
180 description: Only used when the scope type is BASE_NTH_LEVEL to specify amount of levels to search
181 example: 0
182 type: integer
183 moduleSetTag:
184 description: Module set identifier
185 example: my-module-set-tag
186 type: string
187 cmHandleProperties:
188 description: Private properties of the cm handle for the given path
189 $ref: '#/components/schemas/CmHandleProperties'
190 SubjobWriteRequest:
191 type: object
192 required:
193 - dataProducerId
194 - data
195 properties:
196 dataAcceptType:
197 description: Defines the data response accept type
198 example: application/vnd.3gpp.object-tree-hierarchical+json
199 type: string
200 dataContentType:
201 description: Defines the data request content type
202 example: application/3gpp-json-patch+json
203 type: string
204 dataProducerId:
205 description: ID of the producer registered by DMI for the paths in the operations in this request
206 example: my-data-producer-identifier
207 type: string
208 data:
209 example:
210 op: add
211 path: SubNetwork=Europe/SubNetwork=Ireland/MeContext=NR03gNodeBRadio00003/ManagedElement=NR03gNodeBRadio00003/GNBCUCPFunction=1/EUtraNetwork=1/EUtranFrequency=12
212 value:
213 id: 12
214 attributes:
215 userLabel: label12
216 type: array
217 items:
218 type: object
219 required:
220 - path
221 - op
222 properties:
223 path:
224 description: Defines the resource on which operation is executed
225 example: SubNetwork=Europe/SubNetwork=Ireland/MeContext=NR03gNodeBRadio00003/ManagedElement=NR03gNodeBRadio00003
226 type: string
227 op:
228 description: Describes the operation to execute
229 example: add
230 type: string
231 operationId:
232 description: Unique identifier for the operation within the request
233 example: 1
234 type: string
235 moduleSetTag:
236 description: Module set identifier
237 example: my-module-set-tag
238 type: string
239 cmHandleProperties:
240 description: Private properties of the cm handle for the given path
241 $ref: '#/components/schemas/CmHandleProperties'
242 value:
243 description: Value dependent on the op specified. Resource for an add. Object for a replace. ActionParameters for an action.
244 type: object
245 oneOf:
246 - $ref: '#/components/schemas/Resource'
247 - $ref: '#/components/schemas/ActionParameters'
248 - $ref: '#/components/schemas/Object'
egernugb0ee0382024-04-17 10:08:38 +0100249 CmHandleProperties:
250 description: Private properties of the cm handle for the given path
251 type: object
252 Resource:
253 type: object
254 properties:
255 id:
256 description: Identifier of the resource object
257 example: resource-identifier
258 type: string
259 attributes:
260 description: Key value map representing the objects class attributes and values
261 type: object
262 additionalProperties:
263 example: 'userLabel: label11'
264 type: string
265 ActionParameters:
266 description: The input of the action in the form of key value pairs
267 type: object
268 additionalProperties:
269 type: string
270 Object:
271 type: object
leventecsanyiaa4d6e22024-07-18 13:45:35 +0200272 SubjobWriteResponse:
273 type: object
274 required:
275 - subJobId
276 - dmiServiceName
277 - dataProducerId
278 properties:
279 subJobId:
280 description: Unique identifier for the sub-job
281 example: my-sub-job-id
282 type: string
283 dmiServiceName:
284 description: Name of the relevant DMI Service
285 example: my-dmi-service
286 type: string
287 dataProducerId:
288 description: ID of the producer registered by DMI for the paths in the operations in this request
289 example: my-data-producer-identifier
290 type: string
egernugdaf2ba82024-05-29 10:22:59 +0100291 responses:
292 NotImplemented:
293 description: Not Implemented
294 content:
295 application/json:
296 schema:
297 $ref: '#/components/schemas/ErrorMessage'
298 example:
299 status: 501
300 message: Not Implemented
301 details: Method Not Implemented