summaryrefslogtreecommitdiffstats
path: root/cps-rest/docs/api
diff options
context:
space:
mode:
authorniamhcore <niamh.core@est.tech>2021-02-19 13:14:40 +0000
committerNiamh Core <niamh.core@est.tech>2021-02-22 13:52:21 +0000
commit53f07ac2f4b3699b685b8d009c8949e81fa154a6 (patch)
tree51e465dbec0f8959e6f4397a487399c0978b0769 /cps-rest/docs/api
parent47b0b18950bdce3456e491769ac2d4dac2c86298 (diff)
Rest & Java API layer - Query Datanodes using cpsPath that contains contains a leaf name and a leaf value
Issue-ID: CPS-231 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I3bf2a9946746ad06ddb4bc832206a36b78ff2175
Diffstat (limited to 'cps-rest/docs/api')
-rwxr-xr-xcps-rest/docs/api/swagger/components.yml8
-rw-r--r--cps-rest/docs/api/swagger/cpsQuery.yml23
-rwxr-xr-xcps-rest/docs/api/swagger/openapi.yml3
3 files changed, 34 insertions, 0 deletions
diff --git a/cps-rest/docs/api/swagger/components.yml b/cps-rest/docs/api/swagger/components.yml
index 3694f36cd3..bb1f120022 100755
--- a/cps-rest/docs/api/swagger/components.yml
+++ b/cps-rest/docs/api/swagger/components.yml
@@ -75,6 +75,14 @@ components:
schema:
type: string
default: /
+ cpsPathInQuery:
+ name: cps-path
+ in: query
+ description: cps-path
+ required: false
+ schema:
+ type: string
+ default: /
includeDescendantsOptionInQuery:
name: include-descendants
in: query
diff --git a/cps-rest/docs/api/swagger/cpsQuery.yml b/cps-rest/docs/api/swagger/cpsQuery.yml
new file mode 100644
index 0000000000..91a4bdbfa1
--- /dev/null
+++ b/cps-rest/docs/api/swagger/cpsQuery.yml
@@ -0,0 +1,23 @@
+nodesByDataspaceAndAnchorAndCpsPath:
+ get:
+ description: Query data nodes for the given dataspace and anchor using CPS path
+ tags:
+ - cps-query
+ summary: Query data nodes
+ operationId: getNodesByDataspaceAndAnchorAndCpsPath
+ parameters:
+ - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
+ - $ref: 'components.yml#/components/parameters/anchorNameInPath'
+ - $ref: 'components.yml#/components/parameters/cpsPathInQuery'
+ responses:
+ '200':
+ $ref: 'components.yml#/components/responses/Ok'
+ '400':
+ $ref: 'components.yml#/components/responses/BadRequest'
+ '401':
+ $ref: 'components.yml#/components/responses/Unauthorized'
+ '403':
+ $ref: 'components.yml#/components/responses/Forbidden'
+ '404':
+ $ref: 'components.yml#/components/responses/NotFound'
+ x-codegen-request-body-name: xpath \ No newline at end of file
diff --git a/cps-rest/docs/api/swagger/openapi.yml b/cps-rest/docs/api/swagger/openapi.yml
index 2ead202398..38fbebe67b 100755
--- a/cps-rest/docs/api/swagger/openapi.yml
+++ b/cps-rest/docs/api/swagger/openapi.yml
@@ -50,3 +50,6 @@ paths:
/v1/dataspaces/{dataspace-name}/nodes:
$ref: 'cpsData.yml#/nodesByDataspace'
+
+ /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes/query:
+ $ref: 'cpsQuery.yml#/nodesByDataspaceAndAnchorAndCpsPath' \ No newline at end of file