Fields

Every key that begins with datahoster-, grouped by the file it belongs to. Each field links to where it is documented in the usage guide; each file links to its own page. For the files and folders themselves, see Files. Every field here is also a record in the reference search.

datahoster-config.json

The local client config on your own machine: the one file the local client needs.

FieldTypeDescription
datahoster-config-serverAddressaddressThe IP address of your server.
datahoster-config-apiTokenstringThe admin token that authorises the local client.
datahoster-config-contentRootpathThe absolute path of your data folder.
datahoster-config-toolspathThe absolute path where the tools pages are built.

datahoster-collection.json

A collection's settings file.

FieldTypeDescription
datahoster-collection-nametextThe collection's name; matches the folder.
datahoster-collection-recordsPerChunkFileintegerRecords kept in one on-disk column-chunk file.
datahoster-collection-recordsPerTailChunkintegerRecords in one in-memory tail buffer.
datahoster-collection-maxTextFileSizeintegerByte limit of a text column's strings file.

a column file

One JSON file per column, in a collection's datahoster-collection-columns folder.

FieldTypeDescription
datahoster-column-nametextThe column's name; matches the file.
datahoster-column-typetextOne of the column types.
datahoster-column-defaultthe column's typeThe value a record takes when the column is unset.
datahoster-column-maxintegerMaximum length of a text value.

a user file

One JSON file per user, in a domain's datahoster-users folder.

FieldTypeDescription
datahoster-user-tokentextThe user's secret bearer token, at least 16 characters.

datahoster-endpoint-select.json

A select endpoint: a filtered read of one collection.

FieldTypeDescription
datahoster-endpoint-select-collectiontextThe collection this endpoint reads.
datahoster-endpoint-select-columnsarrayThe columns to return, each optionally renamed.
datahoster-endpoint-select-column-oftextA collection column to return.
datahoster-endpoint-select-column-astextIts public name in the response.
datahoster-endpoint-select-parametersarrayTyped inputs from the query string.
datahoster-endpoint-select-parameter-nametextThe query-string key.
datahoster-endpoint-select-parameter-typetextThe parameter's type.
datahoster-endpoint-select-parameter-defaultthe parameter's typeA default value; makes the parameter optional.
datahoster-endpoint-select-filterarrayConditions a record must all match.
datahoster-endpoint-select-sortarraySort keys, applied in order.
datahoster-endpoint-select-limitintegerThe most records to return.
datahoster-endpoint-select-publicbooleanWhether anyone may call it.
datahoster-endpoint-select-usersarrayThe users who may call it.

datahoster-endpoint-insert.json

An insert endpoint: adds a record to a collection.

FieldTypeDescription
datahoster-endpoint-insert-collectiontextThe collection a record is added to.
datahoster-endpoint-insert-fieldsarrayThe columns the caller may supply.
datahoster-endpoint-insert-field-oftextA column the caller may set.
datahoster-endpoint-insert-field-astextIts public name in the request.
datahoster-endpoint-insert-field-requiredbooleanReject a POST that omits it.
datahoster-endpoint-insert-valuesarrayFixed values the endpoint sets itself.
datahoster-endpoint-insert-value-oftextA column to set.
datahoster-endpoint-insert-valuethe column's typeThe value stored in every record.
datahoster-endpoint-insert-redirecttextWhere a browser form POST lands on success (a 303).
datahoster-endpoint-insert-publicbooleanWhether anyone may call it.
datahoster-endpoint-insert-usersarrayThe users who may call it.

datahoster-endpoint-update.json

An update endpoint: changes a record found by its id. Its fields and values take the same shape as an insert.

FieldTypeDescription
datahoster-endpoint-update-collectiontextThe collection whose record is changed.
datahoster-endpoint-update-fieldsarrayThe columns the caller may change.
datahoster-endpoint-update-field-oftextA column the caller may change.
datahoster-endpoint-update-field-astextIts public name in the request.
datahoster-endpoint-update-field-requiredbooleanReject a request that omits it.
datahoster-endpoint-update-valuesarrayFixed values set on every update.
datahoster-endpoint-update-value-oftextA column to set.
datahoster-endpoint-update-valuethe column's typeThe value stored on update.
datahoster-endpoint-update-publicbooleanWhether anyone may call it.
datahoster-endpoint-update-usersarrayThe users who may call it.

datahoster-endpoint-delete.json

A delete endpoint: removes a record found by its id.

FieldTypeDescription
datahoster-endpoint-delete-collectiontextThe collection a record is removed from.
datahoster-endpoint-delete-publicbooleanWhether anyone may call it.
datahoster-endpoint-delete-usersarrayThe users who may call it.