Change a database's properties
View as Markdown/v1/databases/{databaseId}/schemaAdds, changes and removes properties in one step. update can rename (name), change the type (values are converted), the frontmatter key or the config (options, relation, number format, formula expression). Removed properties keep their values in the rows.
curl -X POST "https://api.lydie.co/v1/databases/01JCQ3V5MZ8G4ZK2X7T9R6N1PB/schema" \
-H "Authorization: Bearer $LYDIE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Path parameters
Body
- addobject[]
Default
[]Show 4 fieldsHide fields
One of
titletextnumberselectmultiSelectstatusdatecheckboxurlemailphonepersonfilesrelationrollupformulauniqueIdcreatedTimeupdatedTimecreatedByupdatedBy- configPropertyConfigSpecInput
Show 11 fieldsHide fields
- optionsobject[]
select, multiSelect, status
- numberFormatstring
One of
numberintegercommaspercentcurrency ISO 4217 code, with numberFormat currency
- includeTimeboolean
date: values carry a time
- rangeboolean
date: values may carry an end (start/end)
- relationRelationConfigInput
Show 4 fieldsHide fields
- rollupRollupConfigInput
Show 3 fieldsHide fields
A property of the related database.
One of
showOriginalshowUniquecountcountValuescountUniquecountEmptycountNotEmptypercentEmptypercentNotEmptysumaveragemedianminmaxrangeearliestlatestcheckeduncheckedpercentCheckedpercentUnchecked
- expressionstring
formula: an Obsidian Bases expression
uniqueId: shown before the number ("LYD" → LYD-12)
- extraobject
- updateobject[]
Default
[]Show 5 fieldsHide fields
A property's id, frontmatter key or name (case-insensitive).
- typestring
One of
titletextnumberselectmultiSelectstatusdatecheckboxurlemailphonepersonfilesrelationrollupformulauniqueIdcreatedTimeupdatedTimecreatedByupdatedBy - configPropertyConfigSpecInput
Show 11 fieldsHide fields
- optionsobject[]
select, multiSelect, status
- numberFormatstring
One of
numberintegercommaspercentcurrency ISO 4217 code, with numberFormat currency
- includeTimeboolean
date: values carry a time
- rangeboolean
date: values may carry an end (start/end)
- relationRelationConfigInput
Show 4 fieldsHide fields
- rollupRollupConfigInput
Show 3 fieldsHide fields
A property of the related database.
One of
showOriginalshowUniquecountcountValuescountUniquecountEmptycountNotEmptypercentEmptypercentNotEmptysumaveragemedianminmaxrangeearliestlatestcheckeduncheckedpercentCheckedpercentUnchecked
- expressionstring
formula: an Obsidian Bases expression
uniqueId: shown before the number ("LYD" → LYD-12)
- extraobject
- removestring[]
Default
[]
Response
- idULID
- propertiesobject[]
- viewsobject[]
{
"id": "01JCQ3V5MZ8G4ZK2X7T9R6N1PB",
"properties": [
{
"id": "01JCQ3V5MZ8G4ZK2X7T9R6N1PB",
"name": "Notes",
"type": "title",
"key": "string"
}
],
"views": [
{
"id": "01JCQ3V5MZ8G4ZK2X7T9R6N1PB",
"name": "Notes",
"type": "table"
}
]
}Errors use one envelope for every endpoint. See Errors and versions.