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