How to provide an endpoint

If you want to implement the SpaceAPI for your hackerspace you need to do the following:

Add all fields you want, you can find the official fields in the schema documentation. Feel free to add your own fields, but ideally prefix custom fields with ext_ to mark them as extension fields. Otherwise you might have conflicts with later schema versions.

Of course the fun starts with providing an endpoint with dynamic data. Either you can write a piece of software yourself or you can use one of the different implementations.

Validator

The SpaceAPI validator validates URLs or files. Please note that invalid endpoints will not be added to the directory and may get removed when they turn invalid.

HTTP and CORS

Your server should be reachable via HTTPS to prevent websites having problems with mixed content warnings. You should also provide CORS and Content-type headers so that JavaScript based web applications can query your endpoint directly.

Stuff you can use

There is stuff that you can use to provide an endpoint or integrate e.g. your space status into your website.

Home-Assistant Integration

This Home-Assistant integration allows you to serve the SpaceAPI JSON file from your Home-Assistant instance.

By Fabian Affolter from Reaktor23.

Category: operation

SpaceAPI Server for Rust

A Rust crate that enables you to run your own SpaceAPI server with support for dynamic sensor data.

By Danilo Bargen and Raphael Nestler from Coredump.

Category: operation