Added get APIs for dataspace.
[cps.git] / cps-rest / docs / openapi / cpsAdmin.yml
index 5852c0c..e887ef2 100644 (file)
@@ -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'