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: |
egernug | daf2ba8 | 2024-05-29 10:22:59 +0100 | [diff] [blame] | 30 | /v1/readJob/{requestId}: |
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: |
| 35 | - $ref: '#/components/parameters/requestIdInPath' |
| 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' |
| 47 | /v1/writeJob/{requestId}: |
egernug | d9a4615 | 2024-05-14 14:02:07 +0100 | [diff] [blame] | 48 | 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' |
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' |
| 64 | |
egernug | b0ee038 | 2024-04-17 10:08:38 +0100 | [diff] [blame] | 65 | components: |
| 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: |
egernug | daf2ba8 | 2024-05-29 10:22:59 +0100 | [diff] [blame] | 76 | ErrorMessage: |
| 77 | type: object |
| 78 | title: Error |
| 79 | properties: |
| 80 | status: |
| 81 | type: string |
| 82 | message: |
| 83 | type: string |
| 84 | details: |
| 85 | type: string |
egernug | d9a4615 | 2024-05-14 14:02:07 +0100 | [diff] [blame] | 86 | SubjobReadRequest: |
egernug | b0ee038 | 2024-04-17 10:08:38 +0100 | [diff] [blame] | 87 | 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: |
egernug | d9a4615 | 2024-05-14 14:02:07 +0100 | [diff] [blame] | 105 | 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: |
egernug | b0ee038 | 2024-04-17 10:08:38 +0100 | [diff] [blame] | 114 | type: object |
egernug | d9a4615 | 2024-05-14 14:02:07 +0100 | [diff] [blame] | 115 | 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' |
egernug | b0ee038 | 2024-04-17 10:08:38 +0100 | [diff] [blame] | 220 | 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 |
egernug | daf2ba8 | 2024-05-29 10:22:59 +0100 | [diff] [blame] | 243 | responses: |
| 244 | NotImplemented: |
| 245 | description: Not Implemented |
| 246 | content: |
| 247 | application/json: |
| 248 | schema: |
| 249 | $ref: '#/components/schemas/ErrorMessage' |
| 250 | example: |
| 251 | status: 501 |
| 252 | message: Not Implemented |
| 253 | details: Method Not Implemented |
egernug | b0ee038 | 2024-04-17 10:08:38 +0100 | [diff] [blame] | 254 | |