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 | d9a4615 | 2024-05-14 14:02:07 +0100 | [diff] [blame^] | 30 | /dmi/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: |
| 45 | "200": |
| 46 | description: Response for subjob |
| 47 | content: |
| 48 | application/json: |
| 49 | schema: |
| 50 | type: object |
| 51 | properties: |
| 52 | dataProducerJobId: |
| 53 | type: string |
| 54 | description: The data job ID. |
| 55 | /dmi/v1/writeJob/{requestId}: |
| 56 | post: |
| 57 | description: Create a write request |
| 58 | operationId: writeDataJob |
| 59 | parameters: |
| 60 | - $ref: '#/components/parameters/requestIdInPath' |
| 61 | requestBody: |
| 62 | description: Operation body |
| 63 | content: |
| 64 | application/3gpp-json-patch+json: |
| 65 | schema: |
| 66 | $ref: '#/components/schemas/SubjobWriteRequest' |
egernug | b0ee038 | 2024-04-17 10:08:38 +0100 | [diff] [blame] | 67 | tags: |
| 68 | - dmi-datajob |
| 69 | responses: |
| 70 | "200": |
| 71 | description: Response for subjob |
| 72 | content: |
| 73 | application/json: |
| 74 | schema: |
| 75 | type: object |
| 76 | properties: |
| 77 | dataProducerJobId: |
| 78 | type: string |
| 79 | description: The data job ID. |
| 80 | components: |
| 81 | parameters: |
| 82 | requestIdInPath: |
| 83 | description: Identifier for the overall Datajob |
| 84 | in: path |
| 85 | name: requestId |
| 86 | required: true |
| 87 | schema: |
| 88 | example: some-identifier |
| 89 | type: string |
| 90 | schemas: |
egernug | d9a4615 | 2024-05-14 14:02:07 +0100 | [diff] [blame^] | 91 | SubjobReadRequest: |
egernug | b0ee038 | 2024-04-17 10:08:38 +0100 | [diff] [blame] | 92 | type: object |
| 93 | required: |
| 94 | - dataProducerId |
| 95 | - data |
| 96 | properties: |
| 97 | dataAcceptType: |
| 98 | description: Defines the data response accept type |
| 99 | example: application/vnd.3gpp.object-tree-hierarchical+json |
| 100 | type: string |
| 101 | dataContentType: |
| 102 | description: Defines the data request content type |
| 103 | example: application/3gpp-json-patch+json |
| 104 | type: string |
| 105 | dataProducerId: |
| 106 | description: ID of the producer registered by DMI for the paths in the operations in this request |
| 107 | example: my-data-producer-identifier |
| 108 | type: string |
| 109 | data: |
egernug | d9a4615 | 2024-05-14 14:02:07 +0100 | [diff] [blame^] | 110 | example: |
| 111 | op: read |
| 112 | operationId: 1 |
| 113 | path: SubNetwork=Europe/SubNetwork=Ireland/MeContext=NR03gNodeBRadio00003/ManagedElement=NR03gNodeBRadio00003/GNBCUCPFunction=2 |
| 114 | attributes: userLabel |
| 115 | scope: |
| 116 | scopeTyp: BASE_ONLY |
| 117 | type: array |
| 118 | items: |
egernug | b0ee038 | 2024-04-17 10:08:38 +0100 | [diff] [blame] | 119 | type: object |
egernug | d9a4615 | 2024-05-14 14:02:07 +0100 | [diff] [blame^] | 120 | required: |
| 121 | - path |
| 122 | - op |
| 123 | properties: |
| 124 | path: |
| 125 | description: Defines the resource on which operation is executed |
| 126 | example: SubNetwork=Europe/SubNetwork=Ireland/MeContext=NR03gNodeBRadio00003/ManagedElement=NR03gNodeBRadio00003 |
| 127 | type: string |
| 128 | op: |
| 129 | description: Describes the operation to execute |
| 130 | example: read |
| 131 | type: string |
| 132 | operationId: |
| 133 | description: Unique identifier for the operation within the request |
| 134 | example: 1 |
| 135 | type: string |
| 136 | attributes: |
| 137 | description: This parameter specifies the attributes of the scoped resources that are returned |
| 138 | type: array |
| 139 | items: |
| 140 | example: cellId |
| 141 | type: string |
| 142 | fields: |
| 143 | description: This parameter specifies the attribute fields of the scoped resources that are returned |
| 144 | type: array |
| 145 | items: |
| 146 | type: string |
| 147 | filter: |
| 148 | description: This parameter is used to filter the scoped Managed Objects. Only Managed Objects passing the filter criteria will be fetched |
| 149 | example: NRCellDU/attributes/administrativeState==LOCKED |
| 150 | type: string |
| 151 | scopeType: |
| 152 | description: ScopeType selects MOs depending on relationships with Base Managed Object |
| 153 | example: BASE_ONLY |
| 154 | type: string |
| 155 | scopeLevel: |
| 156 | description: Only used when the scope type is BASE_NTH_LEVEL to specify amount of levels to search |
| 157 | example: 0 |
| 158 | type: integer |
| 159 | moduleSetTag: |
| 160 | description: Module set identifier |
| 161 | example: my-module-set-tag |
| 162 | type: string |
| 163 | cmHandleProperties: |
| 164 | description: Private properties of the cm handle for the given path |
| 165 | $ref: '#/components/schemas/CmHandleProperties' |
| 166 | SubjobWriteRequest: |
| 167 | type: object |
| 168 | required: |
| 169 | - dataProducerId |
| 170 | - data |
| 171 | properties: |
| 172 | dataAcceptType: |
| 173 | description: Defines the data response accept type |
| 174 | example: application/vnd.3gpp.object-tree-hierarchical+json |
| 175 | type: string |
| 176 | dataContentType: |
| 177 | description: Defines the data request content type |
| 178 | example: application/3gpp-json-patch+json |
| 179 | type: string |
| 180 | dataProducerId: |
| 181 | description: ID of the producer registered by DMI for the paths in the operations in this request |
| 182 | example: my-data-producer-identifier |
| 183 | type: string |
| 184 | data: |
| 185 | example: |
| 186 | op: add |
| 187 | path: SubNetwork=Europe/SubNetwork=Ireland/MeContext=NR03gNodeBRadio00003/ManagedElement=NR03gNodeBRadio00003/GNBCUCPFunction=1/EUtraNetwork=1/EUtranFrequency=12 |
| 188 | value: |
| 189 | id: 12 |
| 190 | attributes: |
| 191 | userLabel: label12 |
| 192 | type: array |
| 193 | items: |
| 194 | type: object |
| 195 | required: |
| 196 | - path |
| 197 | - op |
| 198 | properties: |
| 199 | path: |
| 200 | description: Defines the resource on which operation is executed |
| 201 | example: SubNetwork=Europe/SubNetwork=Ireland/MeContext=NR03gNodeBRadio00003/ManagedElement=NR03gNodeBRadio00003 |
| 202 | type: string |
| 203 | op: |
| 204 | description: Describes the operation to execute |
| 205 | example: add |
| 206 | type: string |
| 207 | operationId: |
| 208 | description: Unique identifier for the operation within the request |
| 209 | example: 1 |
| 210 | type: string |
| 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 | value: |
| 219 | description: Value dependent on the op specified. Resource for an add. Object for a replace. ActionParameters for an action. |
| 220 | type: object |
| 221 | oneOf: |
| 222 | - $ref: '#/components/schemas/Resource' |
| 223 | - $ref: '#/components/schemas/ActionParameters' |
| 224 | - $ref: '#/components/schemas/Object' |
egernug | b0ee038 | 2024-04-17 10:08:38 +0100 | [diff] [blame] | 225 | CmHandleProperties: |
| 226 | description: Private properties of the cm handle for the given path |
| 227 | type: object |
| 228 | Resource: |
| 229 | type: object |
| 230 | properties: |
| 231 | id: |
| 232 | description: Identifier of the resource object |
| 233 | example: resource-identifier |
| 234 | type: string |
| 235 | attributes: |
| 236 | description: Key value map representing the objects class attributes and values |
| 237 | type: object |
| 238 | additionalProperties: |
| 239 | example: 'userLabel: label11' |
| 240 | type: string |
| 241 | ActionParameters: |
| 242 | description: The input of the action in the form of key value pairs |
| 243 | type: object |
| 244 | additionalProperties: |
| 245 | type: string |
| 246 | Object: |
| 247 | type: object |
| 248 | |
| 249 | |