Data fragment update by xpath #3 - rest and service layers
[cps.git] / cps-rest / docs / api / swagger / cpsData.yml
1 nodesByDataspaceAndAnchor:
2   get:
3     description: Get a node with an option to retrieve all the children for a given anchor and dataspace
4     tags:
5       - cps-data
6     summary: Get a node
7     operationId: getNodeByDataspaceAndAnchor
8     parameters:
9       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
10       - $ref: 'components.yml#/components/parameters/anchorNameInPath'
11       - $ref: 'components.yml#/components/parameters/xpathInQuery'
12       - $ref: 'components.yml#/components/parameters/includeDescendantsOptionInQuery'
13     responses:
14       '200':
15         $ref: 'components.yml#/components/responses/Ok'
16       '400':
17         $ref: 'components.yml#/components/responses/BadRequest'
18       '401':
19         $ref: 'components.yml#/components/responses/Unauthorized'
20       '403':
21         $ref: 'components.yml#/components/responses/Forbidden'
22       '404':
23         $ref: 'components.yml#/components/responses/NotFound'
24     x-codegen-request-body-name: xpath
25
26   post:
27     description: Create a node for a given anchor and dataspace
28     tags:
29       - cps-data
30     summary: Create a node
31     operationId: createNode
32     parameters:
33       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
34       - $ref: 'components.yml#/components/parameters/anchorNameInPath'
35     requestBody:
36       required: true
37       content:
38         application/json:
39           schema:
40             type: string
41     responses:
42       '201':
43         $ref: 'components.yml#/components/responses/Created'
44       '400':
45         $ref: 'components.yml#/components/responses/BadRequest'
46       '401':
47         $ref: 'components.yml#/components/responses/Unauthorized'
48       '403':
49         $ref: 'components.yml#/components/responses/Forbidden'
50
51   patch:
52     description: Update a data node leaves for a given dataspace and anchor and a parent node xpath
53     tags:
54       - cps-data
55     summary: Update node leaves
56     operationId: updateNodeLeaves
57     parameters:
58       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
59       - $ref: 'components.yml#/components/parameters/anchorNameInPath'
60       - $ref: 'components.yml#/components/parameters/xpathInQuery'
61     requestBody:
62       required: true
63       content:
64         application/json:
65           schema:
66             type: string
67     responses:
68       '200':
69         $ref: 'components.yml#/components/responses/Ok'
70       '400':
71         $ref: 'components.yml#/components/responses/BadRequest'
72       '401':
73         $ref: 'components.yml#/components/responses/Unauthorized'
74       '403':
75         $ref: 'components.yml#/components/responses/Forbidden'
76
77   put:
78     description: Replace a node with descendants for a given dataspace, anchor and a parent node xpath
79     tags:
80       - cps-data
81     summary: Replace a node with descendants
82     operationId: replaceNode
83     parameters:
84       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
85       - $ref: 'components.yml#/components/parameters/anchorNameInPath'
86       - $ref: 'components.yml#/components/parameters/xpathInQuery'
87     requestBody:
88       required: true
89       content:
90         application/json:
91           schema:
92             type: string
93     responses:
94       '200':
95         $ref: 'components.yml#/components/responses/Ok'
96       '400':
97         $ref: 'components.yml#/components/responses/BadRequest'
98       '401':
99         $ref: 'components.yml#/components/responses/Unauthorized'
100       '403':
101         $ref: 'components.yml#/components/responses/Forbidden'
102
103
104 nodesByDataspace:
105   get:
106     description: Get all nodes for a given dataspace using an xpath or schema node identifier - DRAFT
107     tags:
108       - cps-data
109     summary: Get nodes
110     operationId: getNodesByDataspace
111     parameters:
112       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
113     responses:
114       '200':
115         $ref: 'components.yml#/components/responses/Ok'
116       '400':
117         $ref: 'components.yml#/components/responses/BadRequest'
118       '401':
119         $ref: 'components.yml#/components/responses/Unauthorized'
120       '403':
121         $ref: 'components.yml#/components/responses/Forbidden'
122       '404':
123         $ref: 'components.yml#/components/responses/NotFound'
124     x-codegen-request-body-name: requestBody