Lee Anjella Macabuhay | ebb0af8 | 2024-10-03 13:47:14 +0000 | [diff] [blame] | 1 | # ============LICENSE_START======================================================= |
| 2 | # Copyright (c) 2021-2022 Bell Canada. |
| 3 | # Modifications Copyright (C) 2021-2022 Nordix Foundation |
| 4 | # Modifications Copyright (C) 2022-2024 TechMahindra Ltd. |
| 5 | # Modifications Copyright (C) 2022 Deutsche Telekom AG |
| 6 | # ================================================================================ |
| 7 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | # you may not use this file except in compliance with the License. |
| 9 | # You may obtain a copy of the License at |
| 10 | # |
| 11 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | # |
| 13 | # Unless required by applicable law or agreed to in writing, software |
| 14 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | # See the License for the specific language governing permissions and |
| 17 | # limitations under the License. |
| 18 | # |
| 19 | # SPDX-License-Identifier: Apache-2.0 |
| 20 | # ============LICENSE_END========================================================= |
| 21 | |
| 22 | listElementByDataspaceAndAnchor: |
| 23 | post: |
| 24 | description: Add list element(s) to a list for a given anchor and dataspace |
| 25 | tags: |
| 26 | - cps-data |
| 27 | summary: Add list element(s) |
| 28 | operationId: addListElements |
| 29 | parameters: |
| 30 | - $ref: 'components.yml#/components/parameters/apiVersionInPath' |
| 31 | - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' |
| 32 | - $ref: 'components.yml#/components/parameters/anchorNameInPath' |
| 33 | - $ref: 'components.yml#/components/parameters/requiredXpathInQuery' |
| 34 | - $ref: 'components.yml#/components/parameters/observedTimestampInQuery' |
| 35 | - $ref: 'components.yml#/components/parameters/contentTypeInHeader' |
| 36 | requestBody: |
| 37 | required: true |
| 38 | content: |
| 39 | application/json: |
| 40 | schema: |
| 41 | type: string |
| 42 | examples: |
| 43 | dataSample: |
| 44 | $ref: 'components.yml#/components/examples/dataSample' |
| 45 | application/xml: |
| 46 | schema: |
| 47 | type: object |
| 48 | xml: |
| 49 | name: stores |
| 50 | examples: |
| 51 | dataSample: |
| 52 | $ref: 'components.yml#/components/examples/dataSampleXml' |
| 53 | responses: |
| 54 | '201': |
| 55 | $ref: 'components.yml#/components/responses/Created' |
| 56 | '400': |
| 57 | $ref: 'components.yml#/components/responses/BadRequest' |
| 58 | '403': |
| 59 | $ref: 'components.yml#/components/responses/Forbidden' |
| 60 | '500': |
| 61 | $ref: 'components.yml#/components/responses/InternalServerError' |
| 62 | put: |
| 63 | description: Replace list content under a given parent, anchor and dataspace |
| 64 | tags: |
| 65 | - cps-data |
| 66 | summary: Replace list content |
| 67 | operationId: replaceListContent |
| 68 | parameters: |
| 69 | - $ref: 'components.yml#/components/parameters/apiVersionInPath' |
| 70 | - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' |
| 71 | - $ref: 'components.yml#/components/parameters/anchorNameInPath' |
| 72 | - $ref: 'components.yml#/components/parameters/requiredXpathInQuery' |
| 73 | - $ref: 'components.yml#/components/parameters/observedTimestampInQuery' |
| 74 | requestBody: |
| 75 | required: true |
| 76 | content: |
| 77 | application/json: |
| 78 | schema: |
| 79 | type: object |
| 80 | examples: |
| 81 | dataSample: |
| 82 | $ref: 'components.yml#/components/examples/dataSample' |
| 83 | responses: |
| 84 | '200': |
| 85 | $ref: 'components.yml#/components/responses/Ok' |
| 86 | '400': |
| 87 | $ref: 'components.yml#/components/responses/BadRequest' |
| 88 | '403': |
| 89 | $ref: 'components.yml#/components/responses/Forbidden' |
| 90 | '500': |
| 91 | $ref: 'components.yml#/components/responses/InternalServerError' |
| 92 | |
| 93 | nodesByDataspaceAndAnchor: |
| 94 | post: |
| 95 | description: Create a node for a given anchor and dataspace |
| 96 | tags: |
| 97 | - cps-data |
| 98 | summary: Create a node |
| 99 | operationId: createNode |
| 100 | parameters: |
| 101 | - $ref: 'components.yml#/components/parameters/apiVersionInPath' |
| 102 | - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' |
| 103 | - $ref: 'components.yml#/components/parameters/anchorNameInPath' |
| 104 | - $ref: 'components.yml#/components/parameters/xpathInQuery' |
Arpit Singh | 07acbb4 | 2024-08-09 12:23:49 +0530 | [diff] [blame^] | 105 | - $ref: 'components.yml#/components/parameters/dryRunInQuery' |
Lee Anjella Macabuhay | ebb0af8 | 2024-10-03 13:47:14 +0000 | [diff] [blame] | 106 | - $ref: 'components.yml#/components/parameters/observedTimestampInQuery' |
| 107 | - $ref: 'components.yml#/components/parameters/contentTypeInHeader' |
| 108 | requestBody: |
| 109 | required: true |
| 110 | content: |
| 111 | application/json: |
| 112 | schema: |
| 113 | type: string |
| 114 | examples: |
| 115 | dataSample: |
| 116 | $ref: 'components.yml#/components/examples/dataSample' |
| 117 | application/xml: |
| 118 | schema: |
| 119 | type: object # Workaround to show example |
| 120 | xml: |
| 121 | name: stores |
| 122 | examples: |
| 123 | dataSample: |
| 124 | $ref: 'components.yml#/components/examples/dataSampleXml' |
| 125 | responses: |
| 126 | '201': |
| 127 | $ref: 'components.yml#/components/responses/Created' |
| 128 | '400': |
| 129 | $ref: 'components.yml#/components/responses/BadRequest' |
| 130 | '403': |
| 131 | $ref: 'components.yml#/components/responses/Forbidden' |
| 132 | '409': |
| 133 | $ref: 'components.yml#/components/responses/Conflict' |
| 134 | '500': |
| 135 | $ref: 'components.yml#/components/responses/InternalServerError' |
| 136 | patch: |
| 137 | description: Update a data node leaves for a given dataspace and anchor and a parent node xpath. This operation |
| 138 | is currently supported for one top level data node only. |
| 139 | tags: |
| 140 | - cps-data |
| 141 | summary: Update node leaves |
| 142 | operationId: updateNodeLeaves |
| 143 | parameters: |
| 144 | - $ref: 'components.yml#/components/parameters/apiVersionInPath' |
| 145 | - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' |
| 146 | - $ref: 'components.yml#/components/parameters/anchorNameInPath' |
| 147 | - $ref: 'components.yml#/components/parameters/xpathInQuery' |
| 148 | - $ref: 'components.yml#/components/parameters/observedTimestampInQuery' |
| 149 | - $ref: 'components.yml#/components/parameters/contentTypeInHeader' |
| 150 | requestBody: |
| 151 | required: true |
| 152 | content: |
| 153 | application/json: |
| 154 | schema: |
| 155 | type: string |
| 156 | examples: |
| 157 | dataSample: |
| 158 | $ref: 'components.yml#/components/examples/dataSample' |
| 159 | application/xml: |
| 160 | schema: |
| 161 | type: object |
| 162 | xml: |
| 163 | name: stores |
| 164 | examples: |
| 165 | dataSample: |
| 166 | $ref: 'components.yml#/components/examples/dataSampleXml' |
| 167 | responses: |
| 168 | '200': |
| 169 | $ref: 'components.yml#/components/responses/Ok' |
| 170 | '400': |
| 171 | $ref: 'components.yml#/components/responses/BadRequest' |
| 172 | '403': |
| 173 | $ref: 'components.yml#/components/responses/Forbidden' |
| 174 | '500': |
| 175 | $ref: 'components.yml#/components/responses/InternalServerError' |
| 176 | delete: |
| 177 | description: Delete a datanode for a given dataspace and anchor given a node xpath. |
| 178 | tags: |
| 179 | - cps-data |
| 180 | summary: Delete a data node |
| 181 | operationId: deleteDataNode |
| 182 | parameters: |
| 183 | - $ref: 'components.yml#/components/parameters/apiVersionInPath' |
| 184 | - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' |
| 185 | - $ref: 'components.yml#/components/parameters/anchorNameInPath' |
| 186 | - $ref: 'components.yml#/components/parameters/xpathInQuery' |
| 187 | - $ref: 'components.yml#/components/parameters/observedTimestampInQuery' |
| 188 | responses: |
| 189 | '204': |
| 190 | $ref: 'components.yml#/components/responses/NoContent' |
| 191 | '400': |
| 192 | $ref: 'components.yml#/components/responses/BadRequest' |
| 193 | '403': |
| 194 | $ref: 'components.yml#/components/responses/Forbidden' |
| 195 | '500': |
| 196 | $ref: 'components.yml#/components/responses/InternalServerError' |
| 197 | put: |
| 198 | description: Replace a node with descendants for a given dataspace, anchor and a parent node xpath |
| 199 | tags: |
| 200 | - cps-data |
| 201 | summary: Replace a node with descendants |
| 202 | operationId: replaceNode |
| 203 | parameters: |
| 204 | - $ref: 'components.yml#/components/parameters/apiVersionInPath' |
| 205 | - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' |
| 206 | - $ref: 'components.yml#/components/parameters/anchorNameInPath' |
| 207 | - $ref: 'components.yml#/components/parameters/xpathInQuery' |
| 208 | - $ref: 'components.yml#/components/parameters/observedTimestampInQuery' |
| 209 | - $ref: 'components.yml#/components/parameters/contentTypeInHeader' |
| 210 | requestBody: |
| 211 | required: true |
| 212 | content: |
| 213 | application/json: |
| 214 | schema: |
| 215 | type: string |
| 216 | examples: |
| 217 | dataSample: |
| 218 | $ref: 'components.yml#/components/examples/dataSample' |
| 219 | application/xml: |
| 220 | schema: |
| 221 | type: object |
| 222 | xml: |
| 223 | name: stores |
| 224 | examples: |
| 225 | dataSample: |
| 226 | $ref: 'components.yml#/components/examples/dataSampleXml' |
| 227 | responses: |
| 228 | '200': |
| 229 | $ref: 'components.yml#/components/responses/Ok' |
| 230 | '400': |
| 231 | $ref: 'components.yml#/components/responses/BadRequest' |
| 232 | '403': |
| 233 | $ref: 'components.yml#/components/responses/Forbidden' |
| 234 | '500': |
| 235 | $ref: 'components.yml#/components/responses/InternalServerError' |