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.
| Field | Type | Description |
|---|---|---|
datahoster-config-serverAddress | address | The IP address of your server. |
datahoster-config-apiToken | string | The admin token that authorises the local client. |
datahoster-config-contentRoot | path | The absolute path of your data folder. |
datahoster-config-tools | path | The absolute path where the tools pages are built. |
datahoster-collection.json
A collection's settings file.
| Field | Type | Description |
|---|---|---|
datahoster-collection-name | text | The collection's name; matches the folder. |
datahoster-collection-recordsPerChunkFile | integer | Records kept in one on-disk column-chunk file. |
datahoster-collection-recordsPerTailChunk | integer | Records in one in-memory tail buffer. |
datahoster-collection-maxTextFileSize | integer | Byte limit of a text column's strings file. |
a column file
One JSON file per column, in a collection's datahoster-collection-columns folder.
| Field | Type | Description |
|---|---|---|
datahoster-column-name | text | The column's name; matches the file. |
datahoster-column-type | text | One of the column types. |
datahoster-column-default | the column's type | The value a record takes when the column is unset. |
datahoster-column-max | integer | Maximum length of a text value. |
a user file
One JSON file per user, in a domain's datahoster-users folder.
| Field | Type | Description |
|---|---|---|
datahoster-user-token | text | The user's secret bearer token, at least 16 characters. |
datahoster-endpoint-select.json
A select endpoint: a filtered read of one collection.
| Field | Type | Description |
|---|---|---|
datahoster-endpoint-select-collection | text | The collection this endpoint reads. |
datahoster-endpoint-select-columns | array | The columns to return, each optionally renamed. |
datahoster-endpoint-select-column-of | text | A collection column to return. |
datahoster-endpoint-select-column-as | text | Its public name in the response. |
datahoster-endpoint-select-parameters | array | Typed inputs from the query string. |
datahoster-endpoint-select-parameter-name | text | The query-string key. |
datahoster-endpoint-select-parameter-type | text | The parameter's type. |
datahoster-endpoint-select-parameter-default | the parameter's type | A default value; makes the parameter optional. |
datahoster-endpoint-select-filter | array | Conditions a record must all match. |
datahoster-endpoint-select-sort | array | Sort keys, applied in order. |
datahoster-endpoint-select-limit | integer | The most records to return. |
datahoster-endpoint-select-public | boolean | Whether anyone may call it. |
datahoster-endpoint-select-users | array | The users who may call it. |
datahoster-endpoint-insert.json
An insert endpoint: adds a record to a collection.
| Field | Type | Description |
|---|---|---|
datahoster-endpoint-insert-collection | text | The collection a record is added to. |
datahoster-endpoint-insert-fields | array | The columns the caller may supply. |
datahoster-endpoint-insert-field-of | text | A column the caller may set. |
datahoster-endpoint-insert-field-as | text | Its public name in the request. |
datahoster-endpoint-insert-field-required | boolean | Reject a POST that omits it. |
datahoster-endpoint-insert-values | array | Fixed values the endpoint sets itself. |
datahoster-endpoint-insert-value-of | text | A column to set. |
datahoster-endpoint-insert-value | the column's type | The value stored in every record. |
datahoster-endpoint-insert-redirect | text | Where a browser form POST lands on success (a 303). |
datahoster-endpoint-insert-public | boolean | Whether anyone may call it. |
datahoster-endpoint-insert-users | array | The 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.
| Field | Type | Description |
|---|---|---|
datahoster-endpoint-update-collection | text | The collection whose record is changed. |
datahoster-endpoint-update-fields | array | The columns the caller may change. |
datahoster-endpoint-update-field-of | text | A column the caller may change. |
datahoster-endpoint-update-field-as | text | Its public name in the request. |
datahoster-endpoint-update-field-required | boolean | Reject a request that omits it. |
datahoster-endpoint-update-values | array | Fixed values set on every update. |
datahoster-endpoint-update-value-of | text | A column to set. |
datahoster-endpoint-update-value | the column's type | The value stored on update. |
datahoster-endpoint-update-public | boolean | Whether anyone may call it. |
datahoster-endpoint-update-users | array | The users who may call it. |
datahoster-endpoint-delete.json
A delete endpoint: removes a record found by its id.
| Field | Type | Description |
|---|---|---|
datahoster-endpoint-delete-collection | text | The collection a record is removed from. |
datahoster-endpoint-delete-public | boolean | Whether anyone may call it. |
datahoster-endpoint-delete-users | array | The users who may call it. |