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