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