Ensure CPS REST API Specs conform to ONAP standards
[cps.git] / cps-rest / docs / api / swagger / cpsData.yml
1 nodesByDataspaceAndAnchor:
2   get:
3     tags:
4       - cps-data
5     summary: Get a node given an anchor for the given dataspace
6     operationId: getNodeByDataspaceAndAnchor
7     parameters:
8       - $ref: 'components.yaml#/components/parameters/dataspaceNameInPath'
9       - $ref: 'components.yaml#/components/parameters/anchorNameInPath'
10       - $ref: 'components.yaml#/components/parameters/xpathInQuery'
11       - $ref: 'components.yaml#/components/parameters/includeDescendantsOptionInQuery'
12     responses:
13       200:
14         $ref: 'components.yaml#/components/responses/Ok'
15       400:
16         $ref: 'components.yaml#/components/responses/BadRequest'
17       401:
18         $ref: 'components.yaml#/components/responses/Unauthorized'
19       403:
20         $ref: 'components.yaml#/components/responses/Forbidden'
21       404:
22         $ref: 'components.yaml#/components/responses/NotFound'
23     x-codegen-request-body-name: xpath
24
25   post:
26     tags:
27       - cps-data
28     summary: Create a node for a given anchor for the given dataspace
29     operationId: createNode
30     parameters:
31       - $ref: 'components.yaml#/components/parameters/dataspaceNameInPath'
32       - $ref: 'components.yaml#/components/parameters/anchorNameInPath'
33     requestBody:
34       required: true
35       content:
36         application/json:
37           schema:
38             type: string
39     responses:
40       201:
41         $ref: 'components.yaml#/components/responses/Created'
42       400:
43         $ref: 'components.yaml#/components/responses/BadRequest'
44       401:
45         $ref: 'components.yaml#/components/responses/Unauthorized'
46       403:
47         $ref: 'components.yaml#/components/responses/Forbidden'
48
49 nodesByDataspace:
50   get:
51     tags:
52       - cps-data
53     summary: Get all nodes for a given dataspace using an xpath or schema node identifier - DRAFT
54     operationId: getNodeByDataspace
55     parameters:
56       - $ref: 'components.yaml#/components/parameters/dataspaceNameInPath'
57     responses:
58       200:
59         $ref: 'components.yaml#/components/responses/Ok'
60       400:
61         $ref: 'components.yaml#/components/responses/BadRequest'
62       401:
63         $ref: 'components.yaml#/components/responses/Unauthorized'
64       403:
65         $ref: 'components.yaml#/components/responses/Forbidden'
66       404:
67         $ref: 'components.yaml#/components/responses/NotFound'
68     x-codegen-request-body-name: requestBody