diff --git a/content/api-reference/data-views/data-views-data-views-schemas.md b/content/api-reference/data-views/data-views-data-views-schemas.md index 524330698..2fb8ed94e 100644 --- a/content/api-reference/data-views/data-views-data-views-schemas.md +++ b/content/api-reference/data-views/data-views-data-views-schemas.md @@ -255,6 +255,111 @@ DELETE /api/v1/tenants/{tenantId}/namespaces/{namespaceId}/dataviews/{id}/schema --- +## `Get Data View Schemas in Bulk` + + + +Queries for and returns multiple data view schemas at once. The schemas requested may be associated one or more data views. + +

Request

+ +```text +POST /api/v1/tenants/{tenantId}/namespaces/{namespaceId}/dataviews/bulk/schemas/read +``` + +

Parameters

+ +`string tenantId` +
Tenant identifier.

`string namespaceId` +
Namespace identifier.

`string id` + +

Request Body

+ +A `GetBulkSchemasRequest` object.
+ +```json +{ + "Ids": [ + "string" + ] +} +``` + +

Response

+ +|Status Code|Body Type|Description| +|---|---|---| +|207|[GetBulkSchemasResponse](#schemabulkschemaresponse)[]|An object containing all requested schemas and any errors encountered during retrieval.| +|400|[ErrorResponse](#schemaerrorresponse)|The request is not valid. See the response body for details.| +|500|[ErrorResponse](#schemaerrorresponse)|An error occurred while processing the request. See the response body for details.| + +

Example response body

+ +> 200 Response + +```json +HTTP 207 Multistatus +Content-Type: application/json +{ + "Schemas": [ + { + "Id": "00000000-0000-0000-0000-000000000000", + "DataViewId": "demo view 1", + "CreatedDate": "2019-12-13T01:23:45Z", + "Fields": [ + ... + ] + }, + { + "Id": "11111111-1111-1111-1111-111111111111", + "DataViewId": "demo view 1", + "CreatedDate": "2020-01-06T06:23:15Z", + "Fields": [ + ... + ] + }, + { + "Id": "22222222-2222-2222-2222-222222222222", + "DataViewId": "demo view 2", + "CreatedDate": "2020-02-15T01:31:13Z", + "Fields": [ + ... + ] + }, + ], + "Errors": [ + { + "Error": "Error text", + "Reason": "Reason text", + "Resolution": "Resolution text" + "Kind": "ErrorKind", + "Parameters": { + "Schema Id": "33333333-3333-3333-3333-333333333333", + ... + }, + "ChildErrors": [ + ... + ] + }, + { + "Error": "Error text", + "Reason": "Reason text", + "Resolution": "Resolution text" + "Kind": "ErrorKind", + "Parameters": { + "Schema Id": "44444444-4444-4444-4444-444444444444", + ... + }, + "ChildErrors": [ + ... + ] + } + ] +} +``` + +--- + ## Definitions ### DataViewSchema @@ -489,4 +594,51 @@ A fixed representation of a single field or column in a resolved data view as ge ``` +--- + +### GetBulkSchemasResponse + + + + + + +

Properties

+ +|Property Name|Data Type|Required|Nullable|Description| +|---|---|---|---|---| +|Schemas|Array|true|false|Array containing successfully retrieved schemas.| +|Errors|Array|true|false|Array containing any errors in schema retrieval.| + +```json +{ + "Schemas": [ + { + "Id": "string", + "DataViewId": "string", + "CreatedDate": DateTime, + "Fields": [ + ... + ] + } + ], + "Errors": [ + { + "Error": "string", + "Reason": "string", + "Resolution": "string" + "Kind": "ErrorKind", + "Parameters": { + "Schema Id": "string", + ... + }, + "ChildErrors": [ + ... + ] + } + ] +} + +``` + --- \ No newline at end of file diff --git a/content/external-references/dataviews-parameters.yaml b/content/external-references/dataviews-parameters.yaml index 2b57876f9..f1fdb8d47 100644 --- a/content/external-references/dataviews-parameters.yaml +++ b/content/external-references/dataviews-parameters.yaml @@ -143,4 +143,9 @@ start-index: schemaId: type: text/plain value: | - Data view schema identifier. \ No newline at end of file + Data view schema identifier. + +get-schemas-bulk-request: + type: text/plain + value: | + An object with a single `Ids` property containing a list of schema id's to retrieve. diff --git a/content/external-references/dataviews-request-examples.yaml b/content/external-references/dataviews-request-examples.yaml index b6d4366e1..395706428 100644 --- a/content/external-references/dataviews-request-examples.yaml +++ b/content/external-references/dataviews-request-examples.yaml @@ -113,3 +113,14 @@ dataviews-acl-update: } ] } +# schemas requests +dataviews-schemas-getbulk: + type: application/json + value: | + { + "Ids": [ + "11111111-1111-1111-1111-111111111111", + "22222222-2222-2222-2222-222222222222", + "33333333-3333-3333-3333-333333333333" + ] + } diff --git a/content/external-references/dataviews-response-codes.yaml b/content/external-references/dataviews-response-codes.yaml index 1d4b784cb..8c4e0507c 100644 --- a/content/external-references/dataviews-response-codes.yaml +++ b/content/external-references/dataviews-response-codes.yaml @@ -112,6 +112,12 @@ value: | Successfully deleted the data view schema. +# Response Code: 207 Multistatus +207-schemas-getbulk: + type: text/plain + value: | + A response containing a list of the requested schemas, as well as a list of any errors encountered during schema retrieval. + # Response Code: 302 Found 302-data-get: type: markup diff --git a/content/external-references/dataviews-response-examples.yaml b/content/external-references/dataviews-response-examples.yaml index 0906c08de..3bec0c95f 100644 --- a/content/external-references/dataviews-response-examples.yaml +++ b/content/external-references/dataviews-response-examples.yaml @@ -962,4 +962,67 @@ schema-create: } ] } + ``` +schemas-getbulk: + type: markdown + value: | + ```json + HTTP 207 Multistatus + Content-Type: application/json + { + "Schemas": [ + { + "Id": "00000000-0000-0000-0000-000000000000", + "DataViewId": "demo view 1", + "CreatedDate": "2019-12-13T01:23:45Z", + "Fields": [ + ... + ] + }, + { + "Id": "11111111-1111-1111-1111-111111111111", + "DataViewId": "demo view 1", + "CreatedDate": "2020-01-06T06:23:15Z", + "Fields": [ + ... + ] + }, + { + "Id": "22222222-2222-2222-2222-222222222222", + "DataViewId": "demo view 2", + "CreatedDate": "2020-02-15T01:31:13Z", + "Fields": [ + ... + ] + }, + ], + "Errors": [ + { + "Error": "Error text", + "Reason": "Reason text", + "Resolution": "Resolution text" + "Kind": "ErrorKind", + "Parameters": { + "Schema Id": "33333333-3333-3333-3333-333333333333", + ... + }, + "ChildErrors": [ + ... + ] + }, + { + "Error": "Error text", + "Reason": "Reason text", + "Resolution": "Resolution text" + "Kind": "ErrorKind", + "Parameters": { + "Schema Id": "44444444-4444-4444-4444-444444444444", + ... + }, + "ChildErrors": [ + ... + ] + } + ] + } ``` \ No newline at end of file diff --git a/content/external-references/dataviews-summaries.yaml b/content/external-references/dataviews-summaries.yaml index 21f5a064e..c19cb8040 100644 --- a/content/external-references/dataviews-summaries.yaml +++ b/content/external-references/dataviews-summaries.yaml @@ -196,4 +196,9 @@ schemas-create: schemas-delete: type: text/plain value: | - Deletes the data view schema with the specified id. \ No newline at end of file + Deletes the data view schema with the specified id. + +schemas-getbulk: + type: text/plain + value: | + Retrieves multiple schemas at once by id.