Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
152 changes: 152 additions & 0 deletions content/api-reference/data-views/data-views-data-views-schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,111 @@ DELETE /api/v1/tenants/{tenantId}/namespaces/{namespaceId}/dataviews/{id}/schema

---

## `Get Data View Schemas in Bulk`

<a id="opIdDataViews_Get Data View Schemas in Bulk"></a>

Queries for and returns multiple data view schemas at once. The schemas requested may be associated one or more data views.

<h3>Request</h3>

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

<h4>Parameters</h4>

`string tenantId`
<br/>Tenant identifier.<br/><br/>`string namespaceId`
<br/>Namespace identifier.<br/><br/>`string id`

<h4>Request Body</h4>

A `GetBulkSchemasRequest` object.<br/>

```json
{
"Ids": [
"string"
]
}
```

<h3>Response</h3>

|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.|

<h4>Example response body</h4>

> 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
Expand Down Expand Up @@ -489,4 +594,51 @@ A fixed representation of a single field or column in a resolved data view as ge

```

---

### GetBulkSchemasResponse

<a id="schemabulkschemaresponse"></a>
<a id="schema_GetBulkSchemasResponse"></a>
<a id="tocSbulkschemaresponse"></a>
<a id="tocsbulkschemaresponse"></a>

<h4>Properties</h4>

|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": [
...
]
}
]
}

```

---
7 changes: 6 additions & 1 deletion content/external-references/dataviews-parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,9 @@ start-index:
schemaId:
type: text/plain
value: |
Data view schema identifier.
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.
11 changes: 11 additions & 0 deletions content/external-references/dataviews-request-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
6 changes: 6 additions & 0 deletions content/external-references/dataviews-response-codes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
63 changes: 63 additions & 0 deletions content/external-references/dataviews-response-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
...
]
}
]
}
```
7 changes: 6 additions & 1 deletion content/external-references/dataviews-summaries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,9 @@ schemas-create:
schemas-delete:
type: text/plain
value: |
Deletes the data view schema with the specified id.
Deletes the data view schema with the specified id.

schemas-getbulk:
type: text/plain
value: |
Retrieves multiple schemas at once by id.