This repository has been archived on 2024-02-16. You can view files and clone it, but cannot push or open issues or pull requests.
ITSynOpen/server/README.md

19 lines
966 B
Markdown
Raw Normal View History

2022-08-15 15:26:39 +02:00
# SpaceAPI endpoints
The API is currently available under https://spaceapi.it-syndikat.org/api/. The following endpoints
exist:
- `GET status.php`: the current space status in [SpaceAPI](https://spaceapi.io/) format, registered
in the [SpaceAPI directory](https://github.com/SpaceApi/directory)
- `GET status-s.php`: returns `true` if space is open, `false` if closed. Called by discourse theme
and serendipity.
2022-08-16 21:25:18 +02:00
- `POST update.php`: updates the current open status, called by the wood box with two fat buttons
2022-08-15 15:26:39 +02:00
("2fb").
- `POST ping.php`: requests a "spaceping". Called by the
[matrix bot](https://git.it-syndikat.org/IT-Syndikat/its-matrix-bot).
2022-08-16 21:25:18 +02:00
- `POST ping-get.php`: returns `true` if a ping request is pending, then resets the request. Called
2022-08-15 15:26:39 +02:00
by 2fb.
All endpoints except for `status[-s].php` require an API key to be passed via the `apikey=` GET
parameter. These API keys are defined in `config.inc.php`, see `config.inc.php.example` for an
example.