Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Get Schema Datasets Batch

POST/api/v2/datasets/getSchemaBatch
Warning

This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add preview=true to the request query parameters.

Fetch schemas for multiple datasets in a single request. Datasets not found or inaccessible to the user will be omitted from the response.

The maximum batch size for this endpoint is 1000.

Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:datasets-read.

Query parameters

preview
boolean
optional

Enables the use of preview functionality.

Request body

body
list<GetSchemaDatasetsBatchRequestElement>
Hide child attributes

Hide child attributes

GetSchemaDatasetsBatchRequestElement
object
Show child attributes

Show child attributes

Response body

GetSchemaDatasetsBatchResponse
object
Hide child attributes

Hide child attributes

data
map<DatasetRid, GetDatasetSchemaResponse>
optional
Show child attributes

Show child attributes

Examples

Request

Copied!
1 2 3 4 5 curl -X POST \ \t-H "Content-type: application/json" \ \t-H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/datasets/getSchemaBatch?preview=true" \ -d '[{"endTransactionRid":"ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4","datasetRid":"ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da","versionId":"0000000d-2acf-537c-a228-3a9fe3cdc523","branchName":"master"}]'

Response

Copied!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 { "data": { "ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da": { "endTransactionRid": "ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4", "schema": { "fieldSchemaList": [ { "name": "id", "type": "LONG", "nullable": false, "customMetadata": { "description": "Primary key" } }, { "name": "event_time", "type": "TIMESTAMP", "nullable": false }, { "name": "price", "type": "DECIMAL", "precision": 10, "scale": 2, "nullable": true }, { "name": "tags", "type": "ARRAY", "nullable": true, "arraySubtype": { "type": "STRING", "nullable": false } }, { "name": "metrics", "type": "STRUCT", "nullable": true, "subSchemas": [ { "name": "temperature", "type": "DOUBLE", "nullable": true }, { "name": "humidity", "type": "DOUBLE", "nullable": true } ] } ] }, "versionId": "0000000d-2acf-537c-a228-3a9fe3cdc523", "branchName": "master" } } }