tragait | 34a94b9 | 2021-03-30 12:02:27 +0100 | [diff] [blame] | 1 | # ============LICENSE_START======================================================= |
| 2 | # Modification (C) 2021 Nordix Foundation |
Ruslan Kashapov | d07ebc8 | 2021-04-20 11:14:30 +0300 | [diff] [blame] | 3 | # Modification (C) 2021 Pantheon.tech |
tragait | 34a94b9 | 2021-03-30 12:02:27 +0100 | [diff] [blame] | 4 | # ================================================================================ |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 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 | |
Hanif Kukkalli | 83e318f | 2021-02-23 12:26:39 +0100 | [diff] [blame] | 19 | nodeByCmHandleAndXpath: |
Ruslan Kashapov | 9f52f60 | 2021-01-22 12:53:01 +0200 | [diff] [blame] | 20 | get: |
Hanif Kukkalli | 83e318f | 2021-02-23 12:26:39 +0100 | [diff] [blame] | 21 | description: Get a node with an option to retrieve all the children for a given cm Handle |
Ruslan Kashapov | 9f52f60 | 2021-01-22 12:53:01 +0200 | [diff] [blame] | 22 | tags: |
tragait | 34a94b9 | 2021-03-30 12:02:27 +0100 | [diff] [blame] | 23 | - network-cm-proxy |
Hanif Kukkalli | 83e318f | 2021-02-23 12:26:39 +0100 | [diff] [blame] | 24 | summary: Get a node given a cm Handle and xpath |
| 25 | operationId: getNodeByCmHandleAndXpath |
| 26 | parameters: |
| 27 | - $ref: 'components.yaml#/components/parameters/cmHandleInPath' |
| 28 | - $ref: 'components.yaml#/components/parameters/xpathInQuery' |
| 29 | - $ref: 'components.yaml#/components/parameters/includeDescendantsOptionInQuery' |
Ruslan Kashapov | 9f52f60 | 2021-01-22 12:53:01 +0200 | [diff] [blame] | 30 | responses: |
| 31 | 200: |
| 32 | $ref: 'components.yaml#/components/responses/Ok' |
| 33 | 400: |
| 34 | $ref: 'components.yaml#/components/responses/BadRequest' |
| 35 | 401: |
| 36 | $ref: 'components.yaml#/components/responses/Unauthorized' |
| 37 | 403: |
| 38 | $ref: 'components.yaml#/components/responses/Forbidden' |
Hanif Kukkalli | 83e318f | 2021-02-23 12:26:39 +0100 | [diff] [blame] | 39 | 404: |
| 40 | $ref: 'components.yaml#/components/responses/NotFound' |
niamhcore | b5d573b | 2021-02-26 10:13:48 +0000 | [diff] [blame] | 41 | |
| 42 | nodesByCmHandleAndCpsPath: |
| 43 | get: |
| 44 | description: Query nodes for the given cps path and cm Handle |
| 45 | tags: |
tragait | 34a94b9 | 2021-03-30 12:02:27 +0100 | [diff] [blame] | 46 | - network-cm-proxy |
niamhcore | b5d573b | 2021-02-26 10:13:48 +0000 | [diff] [blame] | 47 | summary: Query data nodes |
| 48 | operationId: queryNodesByCmHandleAndCpsPath |
| 49 | parameters: |
| 50 | - $ref: 'components.yaml#/components/parameters/cmHandleInPath' |
| 51 | - $ref: 'components.yaml#/components/parameters/cpsPathInQuery' |
niamhcore | 32446dc | 2021-03-01 13:25:13 +0000 | [diff] [blame] | 52 | - $ref: 'components.yaml#/components/parameters/includeDescendantsOptionInQuery' |
niamhcore | b5d573b | 2021-02-26 10:13:48 +0000 | [diff] [blame] | 53 | responses: |
| 54 | 200: |
| 55 | $ref: 'components.yaml#/components/responses/Ok' |
| 56 | 400: |
| 57 | $ref: 'components.yaml#/components/responses/BadRequest' |
| 58 | 401: |
| 59 | $ref: 'components.yaml#/components/responses/Unauthorized' |
| 60 | 403: |
| 61 | $ref: 'components.yaml#/components/responses/Forbidden' |
| 62 | 404: |
| 63 | $ref: 'components.yaml#/components/responses/NotFound' |
| 64 | |
| 65 | nodesByCmHandleAndXpath: |
Ruslan Kashapov | d07ebc8 | 2021-04-20 11:14:30 +0300 | [diff] [blame] | 66 | post: |
| 67 | description: Create a node with descendants for the given CM Handle; top level or under existing node (requires xpath) |
| 68 | tags: |
| 69 | - network-cm-proxy |
| 70 | summary: Create a node with descendants |
| 71 | operationId: createNode |
| 72 | parameters: |
| 73 | - $ref: 'components.yaml#/components/parameters/cmHandleInPath' |
| 74 | - $ref: 'components.yaml#/components/parameters/xpathInQuery' |
| 75 | requestBody: |
| 76 | required: true |
| 77 | content: |
| 78 | application/json: |
| 79 | schema: |
| 80 | type: string |
| 81 | responses: |
| 82 | 201: |
| 83 | $ref: 'components.yaml#/components/responses/Created' |
| 84 | 400: |
| 85 | $ref: 'components.yaml#/components/responses/BadRequest' |
| 86 | 401: |
| 87 | $ref: 'components.yaml#/components/responses/Unauthorized' |
| 88 | 403: |
| 89 | $ref: 'components.yaml#/components/responses/Forbidden' |
| 90 | 404: |
| 91 | $ref: 'components.yaml#/components/responses/NotFound' |
| 92 | |
niamhcore | b5d573b | 2021-02-26 10:13:48 +0000 | [diff] [blame] | 93 | patch: |
| 94 | description: Update node leaves for the given cps path and cm Handle |
| 95 | tags: |
tragait | 34a94b9 | 2021-03-30 12:02:27 +0100 | [diff] [blame] | 96 | - network-cm-proxy |
niamhcore | b5d573b | 2021-02-26 10:13:48 +0000 | [diff] [blame] | 97 | summary: Update node leaves |
| 98 | operationId: updateNodeLeaves |
| 99 | parameters: |
| 100 | - $ref: 'components.yaml#/components/parameters/cmHandleInPath' |
| 101 | - $ref: 'components.yaml#/components/parameters/xpathInQuery' |
| 102 | requestBody: |
| 103 | required: true |
| 104 | content: |
| 105 | application/json: |
| 106 | schema: |
| 107 | type: string |
| 108 | responses: |
| 109 | 200: |
| 110 | $ref: 'components.yaml#/components/responses/Ok' |
| 111 | 400: |
| 112 | $ref: 'components.yaml#/components/responses/BadRequest' |
| 113 | 401: |
| 114 | $ref: 'components.yaml#/components/responses/Unauthorized' |
| 115 | 403: |
| 116 | $ref: 'components.yaml#/components/responses/Forbidden' |
| 117 | 404: |
| 118 | $ref: 'components.yaml#/components/responses/NotFound' |
| 119 | |
| 120 | put: |
| 121 | description: Replace a node with descendants for the given cps path and cm Handle |
| 122 | tags: |
tragait | 34a94b9 | 2021-03-30 12:02:27 +0100 | [diff] [blame] | 123 | - network-cm-proxy |
niamhcore | b5d573b | 2021-02-26 10:13:48 +0000 | [diff] [blame] | 124 | summary: Replace a node with descendants |
| 125 | operationId: replaceNode |
| 126 | parameters: |
| 127 | - $ref: 'components.yaml#/components/parameters/cmHandleInPath' |
| 128 | - $ref: 'components.yaml#/components/parameters/xpathInQuery' |
| 129 | requestBody: |
| 130 | required: true |
| 131 | content: |
| 132 | application/json: |
| 133 | schema: |
| 134 | type: string |
| 135 | responses: |
| 136 | 200: |
| 137 | $ref: 'components.yaml#/components/responses/Ok' |
| 138 | 400: |
| 139 | $ref: 'components.yaml#/components/responses/BadRequest' |
| 140 | 401: |
| 141 | $ref: 'components.yaml#/components/responses/Unauthorized' |
| 142 | 403: |
| 143 | $ref: 'components.yaml#/components/responses/Forbidden' |
| 144 | 404: |
Ruslan Kashapov | 1baf48d | 2021-05-07 10:46:27 +0300 | [diff] [blame] | 145 | $ref: 'components.yaml#/components/responses/NotFound' |
| 146 | |
| 147 | listNodeByCmHandleAndXpath: |
| 148 | post: |
| 149 | description: Add one or more list-node child elements under existing node for the given CM Handle |
| 150 | tags: |
| 151 | - network-cm-proxy |
| 152 | summary: Add list-node child element(s) |
| 153 | operationId: addListNodeElements |
| 154 | parameters: |
| 155 | - $ref: 'components.yaml#/components/parameters/cmHandleInPath' |
| 156 | - $ref: 'components.yaml#/components/parameters/requiredXpathInQuery' |
| 157 | requestBody: |
| 158 | required: true |
| 159 | content: |
| 160 | application/json: |
| 161 | schema: |
| 162 | type: string |
| 163 | responses: |
| 164 | 201: |
| 165 | $ref: 'components.yaml#/components/responses/Created' |
| 166 | 400: |
| 167 | $ref: 'components.yaml#/components/responses/BadRequest' |
| 168 | 401: |
| 169 | $ref: 'components.yaml#/components/responses/Unauthorized' |
| 170 | 403: |
| 171 | $ref: 'components.yaml#/components/responses/Forbidden' |
| 172 | 404: |
niamhcore | b5d573b | 2021-02-26 10:13:48 +0000 | [diff] [blame] | 173 | $ref: 'components.yaml#/components/responses/NotFound' |