Create New Dataset
Create a new dataset with a set of defined properties using the POST:Create Dataset endpoint
When creating a dataset if the optional treeId
and treeParentId
are included in the request body the dataset will be created as Hierarchical. If not included the dataset will be created as a flat dataset
For each property in the new dataset the property key
and type
must be included. If the optional property name is not included it will default to the value in key
In all datasets, autoId
, labelId
must have the value isRequired
set to true, hierarchial datasets must also have treeId
and treeParentId
set to true
Example request body​
{
"name": "API User Guide Example",
"type": "PEOPLE",
"autoId": "Employee ID",
"treeId": "Employee ID",
"treeParentId": "Manager ID",
"labelId": "Full Name",
"tags": [
"example-tag"
],
"properties": [
{
"key": "Email",
"name": "Email",
"type": "text",
"isRequired": false
},
{
"key": "date-of-birth",
"name": "Date Of Birth",
"type": "date",
"isRequired": false
},
{
"key": "Department",
"name": "Department",
"type": "text",
"isRequired": false
},
{
"key": "Full Name",
"name": "Full Name",
"type": "text",
"isRequired": true
},
{
"key": "Employee ID",
"name": "Employee ID",
"type": "number",
"isRequired": true
},
{
"key": "Manager ID",
"name": "Manager ID",
"type": "number",
"isRequired": true
}
]
}
The successful creation of the dataset will result in a response which will contain the same detail as the Dataset Metadata endpoint
{
"datasetId": "F97434FC-D1B0-701E-D310-A44CC4C84947",
"name": "API User Guide Example",
"type": "PEOPLE",
"autoId": "Employee ID",
"labelId": "Full Name",
"treeId": "Employee ID",
"treeParentId": "Manager ID",
"tags": [
"example-tag"
],
"properties": [
{
"key": "Department",
"type": "text",
"name": "Department",
"isRequired": false
},
{
"key": "Employee ID",
"type": "number",
"name": "Employee ID",
"isRequired": true,
"isAutoId": true,
"isTreeId": true,
"isCore": true
},
{
"key": "date-of-birth",
"type": "date",
"name": "Date Of Birth",
"isRequired": false
},
{
"key": "Email",
"type": "text",
"name": "Email",
"isRequired": false
},
{
"key": "Full Name",
"type": "text",
"name": "Full Name",
"isRequired": true
},
{
"key": "Manager ID",
"type": "number",
"name": "Manager ID",
"isRequired": true,
"isTreeParentId": true,
"isCore": true
}
],
"cacheKey": "ZRDnCxJXZifek6XjU54ovpasRyW1C4e5TxCrO+GnwojKbVRbov/cKT2b+k76Z3U+pOEtLkgltdCbahcymYqUlg==",
"createdBy": "userguide@orgvue.com",
"createdAt": "2023-08-15T13:48:09.881Z",
"modifiedAt": "2023-08-15T13:48:09.881Z"
}