9abace2047783c824cd7890c8797d50f66cf5f7e
[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 nodesByDataspace:
52   get:
53     description: Get all nodes for a given dataspace using an xpath or schema node identifier - DRAFT
54     tags:
55       - cps-data
56     summary: Get nodes
57     operationId: getNodesByDataspace
58     parameters:
59       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
60     responses:
61       '200':
62         $ref: 'components.yml#/components/responses/Ok'
63       '400':
64         $ref: 'components.yml#/components/responses/BadRequest'
65       '401':
66         $ref: 'components.yml#/components/responses/Unauthorized'
67       '403':
68         $ref: 'components.yml#/components/responses/Forbidden'
69       '404':
70         $ref: 'components.yml#/components/responses/NotFound'
71     x-codegen-request-body-name: requestBody