summaryrefslogtreecommitdiffstats
path: root/cps-rest/docs
diff options
context:
space:
mode:
authorrajesh.kumar <rk00747546@techmahindra.com>2022-09-06 11:47:18 +0000
committerrajesh.kumar <rk00747546@techmahindra.com>2022-11-18 06:37:38 +0000
commitcec0cb7254ede8a790ec6f70ad5e31d10e2d32d7 (patch)
tree07e240bf7e384290b7bff198395e50af51eea994 /cps-rest/docs
parentd2a1f36a78fdc69d43b39f0a7852d47d78924ed5 (diff)
Added get APIs for dataspace.
Issue-ID: CPS-1186 Change-ID: I73f97f986a817d423f93a8d922dcd9647b0829aa Signed-off-by: rajesh.kumar <rk00747546@techmahindra.com>
Diffstat (limited to 'cps-rest/docs')
-rw-r--r--cps-rest/docs/openapi/components.yml9
-rw-r--r--cps-rest/docs/openapi/cpsAdmin.yml53
-rw-r--r--cps-rest/docs/openapi/openapi.yml7
3 files changed, 68 insertions, 1 deletions
diff --git a/cps-rest/docs/openapi/components.yml b/cps-rest/docs/openapi/components.yml
index 269e724b1..fb0947e54 100644
--- a/cps-rest/docs/openapi/components.yml
+++ b/cps-rest/docs/openapi/components.yml
@@ -1,6 +1,7 @@
# ============LICENSE_START=======================================================
# Copyright (c) 2021-2022 Bell Canada.
# Modifications Copyright (C) 2021-2022 Nordix Foundation
+# Modifications Copyright (C) 2022 TechMahindra Ltd.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -34,6 +35,14 @@ components:
type: string
example: my-schema-set
+ DataspaceDetails:
+ type: object
+ title: Dataspace details by dataspace Name
+ properties:
+ name:
+ type: string
+ example: my-dataspace
+
ErrorMessage:
type: object
title: Error
diff --git a/cps-rest/docs/openapi/cpsAdmin.yml b/cps-rest/docs/openapi/cpsAdmin.yml
index 5852c0cf1..e887ef2c0 100644
--- a/cps-rest/docs/openapi/cpsAdmin.yml
+++ b/cps-rest/docs/openapi/cpsAdmin.yml
@@ -1,6 +1,7 @@
# ============LICENSE_START=======================================================
# Copyright (c) 2021 Bell Canada.
# Modifications Copyright (C) 2021-2022 Nordix Foundation
+# Modifications Copyright (C) 2022 TechMahindra Ltd.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -233,4 +234,54 @@ anchorByDataspaceAndAnchorName:
'403':
$ref: 'components.yml#/components/responses/Forbidden'
'500':
- $ref: 'components.yml#/components/responses/InternalServerError' \ No newline at end of file
+ $ref: 'components.yml#/components/responses/InternalServerError'
+
+adminDataspaces:
+ get:
+ description: Read all dataspaces
+ tags:
+ - cps-admin
+ summary: Get all dataspaces
+ operationId: getAllDataspaces
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: 'components.yml#/components/schemas/DataspaceDetails'
+ '400':
+ $ref: 'components.yml#/components/responses/BadRequest'
+ '401':
+ $ref: 'components.yml#/components/responses/Unauthorized'
+ '403':
+ $ref: 'components.yml#/components/responses/Forbidden'
+ '500':
+ $ref: 'components.yml#/components/responses/InternalServerError'
+
+adminDataspace:
+ get:
+ description: Read a dataspace given a dataspace name
+ tags:
+ - cps-admin
+ summary: Get a dataspace
+ operationId: getDataspace
+ parameters:
+ - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: 'components.yml#/components/schemas/DataspaceDetails'
+ '400':
+ $ref: 'components.yml#/components/responses/BadRequest'
+ '401':
+ $ref: 'components.yml#/components/responses/Unauthorized'
+ '403':
+ $ref: 'components.yml#/components/responses/Forbidden'
+ '500':
+ $ref: 'components.yml#/components/responses/InternalServerError'
diff --git a/cps-rest/docs/openapi/openapi.yml b/cps-rest/docs/openapi/openapi.yml
index 290bbf44b..e17029550 100644
--- a/cps-rest/docs/openapi/openapi.yml
+++ b/cps-rest/docs/openapi/openapi.yml
@@ -2,6 +2,7 @@
# Copyright (C) 2021 Nordix Foundation
# Modifications Copyright (C) 2021 Pantheon.tech
# Modifications Copyright (C) 2021 Bell Canada.
+# Modifications Copyright (C) 2022 TechMahindra Ltd.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -52,6 +53,12 @@ paths:
/v1/dataspaces:
$ref: 'cpsAdmin.yml#/dataspaces'
+ /v1/admin/dataspaces:
+ $ref: 'cpsAdmin.yml#/adminDataspaces'
+
+ /v1/admin/dataspaces/{dataspace-name}:
+ $ref: 'cpsAdmin.yml#/adminDataspace'
+
/v1/dataspaces/{dataspace-name}/anchors:
$ref: 'cpsAdmin.yml#/anchorsByDataspace'