Datahoster

Self-hosted data APIs. Drop a folder, get an API: collections, users and endpoints are plain files, and your own server serves them as JSON over HTTPS.

Datahoster

About

The same idea as Localhoster, pointed at data instead of pages. A folder named for a domain becomes a live API host on your own server. Its collections, users and endpoints are all small JSON files inside; edit them locally, the local client mirrors them up, and the server serves the API over HTTPS.

Define a collection, add a public insert endpoint, point a plain HTML form at it, and every submission becomes a validated record on your server, with no build step and no client library. The contact form on this site works that way.

How it works

Collections are folders

A collection is a folder of typed columns, one file each. A record is validated against them on the way in.

Endpoints are the API

Every read and write goes through a named endpoint, with its own permission on one collection: select, insert, update or delete.

Plain HTTP

GET an endpoint for a JSON array; POST, PUT or DELETE to insert, update or delete a record. No SDK to learn.

Features

There are no sessions to manage: just users with tokens, and a permission on each endpoint saying who may use it, the public, a list of named users, or both.

Public inboxes

A public insert endpoint takes anyone's submission, while a private select endpoint keeps the reading to you.

Attributed writes

Lock an endpoint to named users, each with a token. Because the token names the user, every insert, update and delete is recorded against them.

Grows with you

Grow a collection by adding a column file. Existing records take its default, and nothing already stored is rewritten.

Validated on the way in

Every column has a type, and a record is checked against them before it's stored, so bad data never reaches the collection.

Import files

Fill a collection from JSON files of records. Edit a file and sync: only what changed is loaded, and removed records are deleted.

Parameterised endpoints

An endpoint can take a parameter, such as a search term, so one public endpoint can power a site's search box.

Screenshots

datahoster.org explains the whole service with worked examples, and its own search runs on a Datahoster host.

Contents

The sections of datahoster.org, and the pages in each.

Technologies

More development