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.
Gets a dataset's schema. If no endTransactionRid is provided, the latest committed version will be used.
Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:datasets-read.
stringThe name of a Branch.
stringThe Resource Identifier (RID) of the end Transaction. If a user does not provide a value, the RID of the latest committed transaction will be used.
stringThe schema version that should be used. If none is provided, the latest version will be used.
booleanEnables the use of preview functionality.
objectstringThe name of a Branch.
stringThe Resource Identifier (RID) of a Transaction.
objectThe schema for a Foundry dataset. Files uploaded to this dataset must match this schema.
stringThe version identifier of a dataset schema.
1
2
3
curl \
\t-H "Authorization: Bearer $TOKEN" \
"https://$HOSTNAME/api/v2/datasets/ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da/getSchema?branchName=master&endTransactionRid=ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4&versionId=0000000d-2acf-537c-a228-3a9fe3cdc523&preview=true"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
{
"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"
}| Error Name | ||
|---|---|---|
Branch | Error Code | NOT_FOUND |
| Status Code | 404 | |
| Description | The requested branch could not be found, or the client token does not have access to it. | |
| Parameters | datasetRid, branchName | |
Dataset | Error Code | NOT_FOUND |
| Status Code | 404 | |
| Description | The requested dataset could not be found, or the client token does not have access to it. | |
| Parameters | datasetRid | |
Schema | Error Code | NOT_FOUND |
| Status Code | 404 | |
| Description | A schema could not be found for the given dataset and branch, or the client token does not have access to it. | |
| Parameters | datasetRid, branchName, transactionRid | |
Invalid | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | The given parameters are individually valid but cannot be used in the given combination. | |
| Parameters | validCombinations, providedParameters | |
Dataset | Error Code | NOT_FOUND |
| Status Code | 404 | |
| Description | The requested dataset view could not be found. A dataset view represents the effective file contents of a dataset for a branch at a point in time, calculated from transactions (SNAPSHOT, APPEND, UPDATE, DELETE). The view may not exist if the dataset has no transactions, contains no files, the branch is not valid, or the client token does not have access to it. | |
| Parameters | datasetRid, branch | |
Get | Error Code | PERMISSION_DENIED |
| Status Code | 403 | |
| Description | Could not getSchema the Dataset. | |
| Parameters | datasetRid | |
See Errors for a general overview of errors in the platform.