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: |
| 30 | /v1/dataJob/{requestId}: |
| 31 | post: |
| 32 | description: Create a read request |
| 33 | operationId: createReadRequest |
| 34 | parameters: |
| 35 | - $ref: '#/components/parameters/requestIdInPath' |
| 36 | requestBody: |
| 37 | description: Operation body |
| 38 | content: |
| 39 | application/3gpp-json-patch+json: |
| 40 | schema: |
| 41 | $ref: '#/components/schemas/SubjobRequest' |
| 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 | components: |
| 56 | parameters: |
| 57 | requestIdInPath: |
| 58 | description: Identifier for the overall Datajob |
| 59 | in: path |
| 60 | name: requestId |
| 61 | required: true |
| 62 | schema: |
| 63 | example: some-identifier |
| 64 | type: string |
| 65 | schemas: |
| 66 | SubjobRequest: |
| 67 | type: object |
| 68 | required: |
| 69 | - dataProducerId |
| 70 | - data |
| 71 | properties: |
| 72 | dataAcceptType: |
| 73 | description: Defines the data response accept type |
| 74 | example: application/vnd.3gpp.object-tree-hierarchical+json |
| 75 | type: string |
| 76 | dataContentType: |
| 77 | description: Defines the data request content type |
| 78 | example: application/3gpp-json-patch+json |
| 79 | type: string |
| 80 | dataProducerId: |
| 81 | description: ID of the producer registered by DMI for the paths in the operations in this request |
| 82 | example: my-data-producer-identifier |
| 83 | type: string |
| 84 | data: |
| 85 | oneOf: |
| 86 | - $ref: '#/components/schemas/ReadOperation' |
| 87 | - $ref: '#/components/schemas/WriteOperation' |
| 88 | ReadOperation: |
| 89 | example: |
| 90 | op: read |
| 91 | operationId: 1 |
| 92 | path: SubNetwork=Europe/SubNetwork=Ireland/MeContext=NR03gNodeBRadio00003/ManagedElement=NR03gNodeBRadio00003/GNBCUCPFunction=2 |
| 93 | attributes: userLabel |
| 94 | scope: |
| 95 | scopeTyp: BASE_ONLY |
| 96 | type: array |
| 97 | items: |
| 98 | type: object |
| 99 | required: |
| 100 | - path |
| 101 | - op |
| 102 | properties: |
| 103 | path: |
| 104 | description: Defines the resource on which operation is executed |
| 105 | example: SubNetwork=Europe/SubNetwork=Ireland/MeContext=NR03gNodeBRadio00003/ManagedElement=NR03gNodeBRadio00003 |
| 106 | type: string |
| 107 | op: |
| 108 | description: Describes the operation to execute |
| 109 | example: read |
| 110 | type: string |
| 111 | operationId: |
| 112 | description: Unique identifier for the operation within the request |
| 113 | example: 1 |
| 114 | type: string |
| 115 | attributes: |
| 116 | description: This parameter specifies the attributes of the scoped resources that are returned |
| 117 | type: array |
| 118 | items: |
| 119 | example: cellId |
| 120 | type: string |
| 121 | fields: |
| 122 | description: This parameter specifies the attribute fields of the scoped resources that are returned |
| 123 | type: array |
| 124 | items: |
| 125 | type: string |
| 126 | filter: |
| 127 | description: This parameter is used to filter the scoped Managed Objects. Only Managed Objects passing the filter criteria will be fetched |
| 128 | example: NRCellDU/attributes/administrativeState==LOCKED |
| 129 | type: string |
| 130 | scopeType: |
| 131 | description: ScopeType selects MOs depending on relationships with Base Managed Object |
| 132 | example: BASE_ONLY |
| 133 | type: string |
| 134 | scopeLevel: |
| 135 | description: Only used when the scope type is BASE_NTH_LEVEL to specify amount of levels to search |
| 136 | example: 0 |
| 137 | type: integer |
| 138 | moduleSetTag: |
| 139 | description: Module set identifier |
| 140 | example: my-module-set-tag |
| 141 | type: string |
| 142 | cmHandleProperties: |
| 143 | description: Private properties of the cm handle for the given path |
| 144 | $ref: '#/components/schemas/CmHandleProperties' |
| 145 | WriteOperation: |
| 146 | example: |
| 147 | op: add |
| 148 | path: SubNetwork=Europe/SubNetwork=Ireland/MeContext=NR03gNodeBRadio00003/ManagedElement=NR03gNodeBRadio00003/GNBCUCPFunction=1/EUtraNetwork=1/EUtranFrequency=12 |
| 149 | value: |
| 150 | id: 12 |
| 151 | attributes: |
| 152 | userLabel: label12 |
| 153 | type: array |
| 154 | items: |
| 155 | type: object |
| 156 | required: |
| 157 | - path |
| 158 | - op |
| 159 | properties: |
| 160 | path: |
| 161 | description: Defines the resource on which operation is executed |
| 162 | example: SubNetwork=Europe/SubNetwork=Ireland/MeContext=NR03gNodeBRadio00003/ManagedElement=NR03gNodeBRadio00003 |
| 163 | type: string |
| 164 | op: |
| 165 | description: Describes the operation to execute |
| 166 | example: add |
| 167 | type: string |
| 168 | operationId: |
| 169 | description: Unique identifier for the operation within the request |
| 170 | example: 1 |
| 171 | type: string |
| 172 | value: |
| 173 | description: Value dependent on the op specified. Resource for an add. Object for a replace. ActionParameters for an action. |
| 174 | type: object |
| 175 | oneOf: |
| 176 | - $ref: '#/components/schemas/Resource' |
| 177 | - $ref: '#/components/schemas/ActionParameters' |
| 178 | - $ref: '#/components/schemas/Object' |
| 179 | CmHandleProperties: |
| 180 | description: Private properties of the cm handle for the given path |
| 181 | type: object |
| 182 | Resource: |
| 183 | type: object |
| 184 | properties: |
| 185 | id: |
| 186 | description: Identifier of the resource object |
| 187 | example: resource-identifier |
| 188 | type: string |
| 189 | attributes: |
| 190 | description: Key value map representing the objects class attributes and values |
| 191 | type: object |
| 192 | additionalProperties: |
| 193 | example: 'userLabel: label11' |
| 194 | type: string |
| 195 | ActionParameters: |
| 196 | description: The input of the action in the form of key value pairs |
| 197 | type: object |
| 198 | additionalProperties: |
| 199 | type: string |
| 200 | Object: |
| 201 | type: object |
| 202 | |
| 203 | |