blob: 999c5b2c19c34edaa484921163d8d9dd96e5fd78 [file] [log] [blame]
Lee Anjella Macabuhayebb0af82024-10-03 13:47:14 +00001# ============LICENSE_START=======================================================
2# Copyright (c) 2022-2024 TechMahindra Ltd.
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
19nodeByDataspaceAndAnchor:
20 get:
21 description: Get a node with an option to retrieve all the children for a given anchor and dataspace
22 tags:
23 - cps-data
24 summary: Get a node
25 operationId: getNodeByDataspaceAndAnchorV2
26 parameters:
27 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
28 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
29 - $ref: 'components.yml#/components/parameters/xpathInQuery'
30 - $ref: 'components.yml#/components/parameters/descendantsInQuery'
Rudrangi Anupriya14d6a9b2024-11-02 00:16:58 +053031 - $ref: 'components.yml#/components/parameters/contentTypeInHeader'
Lee Anjella Macabuhayebb0af82024-10-03 13:47:14 +000032 responses:
33 '200':
34 description: OK
35 content:
36 application/json:
37 schema:
38 type: object
39 examples:
40 dataSample:
41 $ref: 'components.yml#/components/examples/dataSample'
Rudrangi Anupriya14d6a9b2024-11-02 00:16:58 +053042 application/xml:
43 schema:
44 type: object
45 xml:
46 name: stores
47 examples:
48 dataSample:
49 $ref: 'components.yml#/components/examples/dataSampleXml'
Lee Anjella Macabuhayebb0af82024-10-03 13:47:14 +000050 '400':
51 $ref: 'components.yml#/components/responses/BadRequest'
52 '403':
53 $ref: 'components.yml#/components/responses/Forbidden'
54 '500':
55 $ref: 'components.yml#/components/responses/InternalServerError'
56 x-codegen-request-body-name: xpath
57
58delta:
59 get:
60 description: Get delta between two anchors within a given dataspace
61 tags:
62 - cps-data
63 summary: Get delta between anchors in the same dataspace
64 operationId: getDeltaByDataspaceAndAnchors
65 parameters:
66 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
67 - $ref: 'components.yml#/components/parameters/sourceAnchorNameInPath'
68 - $ref: 'components.yml#/components/parameters/targetAnchorNameInQuery'
69 - $ref: 'components.yml#/components/parameters/xpathInQuery'
70 - $ref: 'components.yml#/components/parameters/descendantsInQuery'
71 responses:
72 '200':
73 description: OK
74 content:
75 application/json:
76 schema:
77 type: object
78 examples:
79 dataSample:
80 $ref: 'components.yml#/components/examples/deltaReportSample'
81 '400':
82 $ref: 'components.yml#/components/responses/BadRequest'
83 '403':
84 $ref: 'components.yml#/components/responses/Forbidden'
85 '500':
86 $ref: 'components.yml#/components/responses/InternalServerError'
87 x-codegen-request-body-name: xpath
88 post:
89 description: Get delta between an anchor in a dataspace and JSON payload
90 tags:
91 - cps-data
92 summary: Get delta between an anchor and JSON payload
93 operationId: getDeltaByDataspaceAnchorAndPayload
94 parameters:
95 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
96 - $ref: 'components.yml#/components/parameters/sourceAnchorNameInPath'
97 - $ref: 'components.yml#/components/parameters/xpathInQuery'
98 requestBody:
99 content:
100 multipart/form-data:
101 schema:
102 type: object
103 properties:
104 json:
105 type: object
106 example:
107 test:bookstore:
108 bookstore-name: Chapters
109 categories:
110 - code: 01
111 name: SciFi
112 - code: 02
113 name: kids
114 file:
115 type: string
116 format: binary
117 required:
118 - json
119 responses:
120 '200':
121 description: OK
122 content:
123 application/json:
124 schema:
125 type: object
126 examples:
127 dataSample:
128 $ref: 'components.yml#/components/examples/deltaReportSample'
129 '400':
130 $ref: 'components.yml#/components/responses/BadRequest'
131 '401':
132 $ref: 'components.yml#/components/responses/Unauthorized'
133 '403':
134 $ref: 'components.yml#/components/responses/Forbidden'
135 '500':
136 $ref: 'components.yml#/components/responses/InternalServerError'