egernug | b0ee038 | 2024-04-17 10:08:38 +0100 | [diff] [blame] | 1 | # ============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 | |
| 19 | openapi: 3.0.3 |
| 20 | info: |
| 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 |
| 24 | servers: |
| 25 | - url: /dmi |
| 26 | tags: |
| 27 | - description: DMI plugin rest apis |
| 28 | name: dmi-datajob |
| 29 | paths: |
leventecsanyi | 636c228 | 2024-08-15 13:52:21 +0200 | [diff] [blame] | 30 | /v1/cmreadJob: |
egernug | b0ee038 | 2024-04-17 10:08:38 +0100 | [diff] [blame] | 31 | post: |
| 32 | description: Create a read request |
egernug | d9a4615 | 2024-05-14 14:02:07 +0100 | [diff] [blame] | 33 | operationId: readDataJob |
egernug | b0ee038 | 2024-04-17 10:08:38 +0100 | [diff] [blame] | 34 | parameters: |
leventecsanyi | 636c228 | 2024-08-15 13:52:21 +0200 | [diff] [blame] | 35 | - $ref: '#/components/parameters/destinationInQuery' |
egernug | b0ee038 | 2024-04-17 10:08:38 +0100 | [diff] [blame] | 36 | requestBody: |
| 37 | description: Operation body |
| 38 | content: |
| 39 | application/3gpp-json-patch+json: |
| 40 | schema: |
egernug | d9a4615 | 2024-05-14 14:02:07 +0100 | [diff] [blame] | 41 | $ref: '#/components/schemas/SubjobReadRequest' |
| 42 | tags: |
| 43 | - dmi-datajob |
| 44 | responses: |
egernug | daf2ba8 | 2024-05-29 10:22:59 +0100 | [diff] [blame] | 45 | "501": |
| 46 | $ref: '#/components/responses/NotImplemented' |
leventecsanyi | 636c228 | 2024-08-15 13:52:21 +0200 | [diff] [blame] | 47 | /v1/cmwriteJob: |
egernug | d9a4615 | 2024-05-14 14:02:07 +0100 | [diff] [blame] | 48 | post: |
| 49 | description: Create a write request |
| 50 | operationId: writeDataJob |
| 51 | parameters: |
leventecsanyi | 636c228 | 2024-08-15 13:52:21 +0200 | [diff] [blame] | 52 | - $ref: '#/components/parameters/destinationInQuery' |
egernug | d9a4615 | 2024-05-14 14:02:07 +0100 | [diff] [blame] | 53 | requestBody: |
| 54 | description: Operation body |
| 55 | content: |
| 56 | application/3gpp-json-patch+json: |
| 57 | schema: |
| 58 | $ref: '#/components/schemas/SubjobWriteRequest' |
egernug | b0ee038 | 2024-04-17 10:08:38 +0100 | [diff] [blame] | 59 | tags: |
| 60 | - dmi-datajob |
| 61 | responses: |
egernug | daf2ba8 | 2024-05-29 10:22:59 +0100 | [diff] [blame] | 62 | "501": |
| 63 | $ref: '#/components/responses/NotImplemented' |
leventecsanyi | 636c228 | 2024-08-15 13:52:21 +0200 | [diff] [blame] | 64 | /v1/cmwriteJob/dataProducer/{dataProducerId}/dataProducerJob/{dataProducerJobId}/status: |
leventecsanyi | 7f49c70 | 2024-07-24 15:42:32 +0200 | [diff] [blame] | 65 | get: |
| 66 | description: Retrieve the status of a specific data job. |
| 67 | operationId: getDataJobStatus |
| 68 | parameters: |
leventecsanyi | 636c228 | 2024-08-15 13:52:21 +0200 | [diff] [blame] | 69 | - $ref: '#/components/parameters/dataProducerIdInPath' |
leventecsanyi | 7f49c70 | 2024-07-24 15:42:32 +0200 | [diff] [blame] | 70 | - $ref: '#/components/parameters/dataProducerJobIdInPath' |
leventecsanyi | 7f49c70 | 2024-07-24 15:42:32 +0200 | [diff] [blame] | 71 | tags: |
| 72 | - dmi-datajob |
| 73 | responses: |
| 74 | "501": |
| 75 | $ref: '#/components/responses/NotImplemented' |
leventecsanyi | 658f4d4 | 2024-08-05 15:46:59 +0200 | [diff] [blame] | 76 | /v1/cmwriteJob/dataProducer/{dataProducerId}/dataProducerJob/{dataProducerJobId}/result: |
leventecsanyi | ee4242c | 2024-07-26 13:25:12 +0200 | [diff] [blame] | 77 | get: |
| 78 | description: Retrieve the result of a data job. |
| 79 | operationId: getDataJobResult |
| 80 | parameters: |
leventecsanyi | 658f4d4 | 2024-08-05 15:46:59 +0200 | [diff] [blame] | 81 | - $ref: '#/components/parameters/dataProducerIdInPath' |
leventecsanyi | ee4242c | 2024-07-26 13:25:12 +0200 | [diff] [blame] | 82 | - $ref: '#/components/parameters/dataProducerJobIdInPath' |
leventecsanyi | ee4242c | 2024-07-26 13:25:12 +0200 | [diff] [blame] | 83 | - $ref: '#/components/parameters/destinationInQuery' |
| 84 | tags: |
| 85 | - dmi-datajob |
| 86 | responses: |
| 87 | "501": |
| 88 | $ref: '#/components/responses/NotImplemented' |
egernug | daf2ba8 | 2024-05-29 10:22:59 +0100 | [diff] [blame] | 89 | |
egernug | b0ee038 | 2024-04-17 10:08:38 +0100 | [diff] [blame] | 90 | components: |
| 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 |
leventecsanyi | 7f49c70 | 2024-07-24 15:42:32 +0200 | [diff] [blame] | 100 | 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 |
leventecsanyi | 636c228 | 2024-08-15 13:52:21 +0200 | [diff] [blame] | 108 | 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 |
leventecsanyi | 7f49c70 | 2024-07-24 15:42:32 +0200 | [diff] [blame] | 116 | 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 |
leventecsanyi | ee4242c | 2024-07-26 13:25:12 +0200 | [diff] [blame] | 124 | 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 |
egernug | b0ee038 | 2024-04-17 10:08:38 +0100 | [diff] [blame] | 132 | schemas: |
egernug | daf2ba8 | 2024-05-29 10:22:59 +0100 | [diff] [blame] | 133 | ErrorMessage: |
| 134 | type: object |
| 135 | title: Error |
| 136 | properties: |
| 137 | status: |
| 138 | type: string |
| 139 | message: |
| 140 | type: string |
| 141 | details: |
| 142 | type: string |
egernug | d9a4615 | 2024-05-14 14:02:07 +0100 | [diff] [blame] | 143 | SubjobReadRequest: |
egernug | b0ee038 | 2024-04-17 10:08:38 +0100 | [diff] [blame] | 144 | 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: |
egernug | d9a4615 | 2024-05-14 14:02:07 +0100 | [diff] [blame] | 162 | 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: |
egernug | b0ee038 | 2024-04-17 10:08:38 +0100 | [diff] [blame] | 171 | type: object |
egernug | d9a4615 | 2024-05-14 14:02:07 +0100 | [diff] [blame] | 172 | 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 |
leventecsanyi | 636c228 | 2024-08-15 13:52:21 +0200 | [diff] [blame] | 236 | dataJobId: |
| 237 | description: Identifier for the overall Data Job |
| 238 | example: my-data-producer-identifier |
| 239 | type: string |
egernug | d9a4615 | 2024-05-14 14:02:07 +0100 | [diff] [blame] | 240 | 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' |
egernug | b0ee038 | 2024-04-17 10:08:38 +0100 | [diff] [blame] | 281 | 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 |
leventecsanyi | aa4d6e2 | 2024-07-18 13:45:35 +0200 | [diff] [blame] | 304 | 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 |
egernug | daf2ba8 | 2024-05-29 10:22:59 +0100 | [diff] [blame] | 323 | 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 |