Merge "Update root pom"
[cps.git] / cps-rest / docs / api / swagger / cpsData.yml
1 nodeByDataspaceAndAnchor:
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 nodesByDataspaceAndAnchor:
27   post:
28     description: Create a node for a given anchor and dataspace
29     tags:
30       - cps-data
31     summary: Create a node
32     operationId: createNode
33     parameters:
34       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
35       - $ref: 'components.yml#/components/parameters/anchorNameInPath'
36     requestBody:
37       required: true
38       content:
39         application/json:
40           schema:
41             type: string
42     responses:
43       '201':
44         $ref: 'components.yml#/components/responses/Created'
45       '400':
46         $ref: 'components.yml#/components/responses/BadRequest'
47       '401':
48         $ref: 'components.yml#/components/responses/Unauthorized'
49       '403':
50         $ref: 'components.yml#/components/responses/Forbidden'
51
52   patch:
53     description: Update a data node leaves for a given dataspace and anchor and a parent node xpath
54     tags:
55       - cps-data
56     summary: Update node leaves
57     operationId: updateNodeLeaves
58     parameters:
59       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
60       - $ref: 'components.yml#/components/parameters/anchorNameInPath'
61       - $ref: 'components.yml#/components/parameters/xpathInQuery'
62     requestBody:
63       required: true
64       content:
65         application/json:
66           schema:
67             type: string
68     responses:
69       '200':
70         $ref: 'components.yml#/components/responses/Ok'
71       '400':
72         $ref: 'components.yml#/components/responses/BadRequest'
73       '401':
74         $ref: 'components.yml#/components/responses/Unauthorized'
75       '403':
76         $ref: 'components.yml#/components/responses/Forbidden'
77
78   put:
79     description: Replace a node with descendants for a given dataspace, anchor and a parent node xpath
80     tags:
81       - cps-data
82     summary: Replace a node with descendants
83     operationId: replaceNode
84     parameters:
85       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
86       - $ref: 'components.yml#/components/parameters/anchorNameInPath'
87       - $ref: 'components.yml#/components/parameters/xpathInQuery'
88     requestBody:
89       required: true
90       content:
91         application/json:
92           schema:
93             type: string
94     responses:
95       '200':
96         $ref: 'components.yml#/components/responses/Ok'
97       '400':
98         $ref: 'components.yml#/components/responses/BadRequest'
99       '401':
100         $ref: 'components.yml#/components/responses/Unauthorized'
101       '403':
102         $ref: 'components.yml#/components/responses/Forbidden'
103
104
105 nodesByDataspace:
106   get:
107     description: Get all nodes for a given dataspace using an xpath or schema node identifier - DRAFT
108     tags:
109       - cps-data
110     summary: Get nodes
111     operationId: getNodesByDataspace
112     parameters:
113       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
114     responses:
115       '200':
116         $ref: 'components.yml#/components/responses/Ok'
117       '400':
118         $ref: 'components.yml#/components/responses/BadRequest'
119       '401':
120         $ref: 'components.yml#/components/responses/Unauthorized'
121       '403':
122         $ref: 'components.yml#/components/responses/Forbidden'
123       '404':
124         $ref: 'components.yml#/components/responses/NotFound'
125     x-codegen-request-body-name: requestBody