From cec0cb7254ede8a790ec6f70ad5e31d10e2d32d7 Mon Sep 17 00:00:00 2001 From: "rajesh.kumar" Date: Tue, 6 Sep 2022 11:47:18 +0000 Subject: Added get APIs for dataspace. Issue-ID: CPS-1186 Change-ID: I73f97f986a817d423f93a8d922dcd9647b0829aa Signed-off-by: rajesh.kumar --- docs/api/swagger/cps/openapi.yaml | 127 +++++++++++++++++++++++++++++++++++++- 1 file changed, 126 insertions(+), 1 deletion(-) (limited to 'docs/api') diff --git a/docs/api/swagger/cps/openapi.yaml b/docs/api/swagger/cps/openapi.yaml index e8f13d4df..8ea0d7b03 100644 --- a/docs/api/swagger/cps/openapi.yaml +++ b/docs/api/swagger/cps/openapi.yaml @@ -163,6 +163,124 @@ paths: status: 500 message: Internal Server Error details: Internal Server Error occurred + /v1/admin/dataspaces: + get: + tags: + - cps-admin + summary: Get dataspaces + description: "Read all dataspaces" + operationId: getAllDataspaces + responses: + "200": + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/DataspaceDetails' + "400": + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + example: + status: 400 + message: Bad Request + details: The provided request is not valid + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + example: + status: 401 + message: Unauthorized request + details: This request is unauthorized + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + example: + status: 403 + message: Request Forbidden + details: This request is forbidden + "500": + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + example: + status: 500 + message: Internal Server Error + details: Internal Server Error occurred + /v1/admin/dataspaces/{dataspace-name}: + get: + tags: + - cps-admin + summary: Get a dataspace + description: Read an dataspace given a dataspace name + operationId: getDataspace + parameters: + - name: dataspace-name + in: path + description: dataspace-name + required: true + schema: + type: string + example: my-dataspace + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/DataspaceDetails' + "400": + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + example: + status: 400 + message: Bad Request + details: The provided request is not valid + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + example: + status: 401 + message: Unauthorized request + details: This request is unauthorized + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + example: + status: 403 + message: Request Forbidden + details: This request is forbidden + "500": + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + example: + status: 500 + message: Internal Server Error + details: Internal Server Error occurred /v1/dataspaces/{dataspace-name}/anchors: get: tags: @@ -1565,6 +1683,13 @@ components: schemaSetName: type: string example: my-schema-set + DataspaceDetails: + title: Dataspace details by dataspace Name + type: object + properties: + name: + type: string + example: my-dataspace MultipartFile: required: - file @@ -1615,4 +1740,4 @@ components: name: kids security: - - basicAuth: [] \ No newline at end of file + - basicAuth: [] -- cgit 1.2.3-korg