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
Xiretza 28459cc661 status-s.php: fix extra newline 2022-08-19 20:03:54 +02:00
..
README.md server: update README 2022-08-16 21:25:18 +02:00
config.inc.php.example Move apikeys to config file 2022-03-27 18:20:16 +02:00
ping-get.php server: clean up scripts, require POST for non-idempotent requests 2022-08-16 21:16:50 +02:00
ping.php server: clean up scripts, require POST for non-idempotent requests 2022-08-16 21:16:50 +02:00
pinged.txt Spaceping server part 2016-03-20 19:53:26 +01:00
status-s.php status-s.php: fix extra newline 2022-08-19 20:03:54 +02:00
status.php server: move spaceapi to its own subdomain 2022-08-15 09:42:23 +02:00
status.txt server: clean up scripts, require POST for non-idempotent requests 2022-08-16 21:16:50 +02:00
update.php server: clean up scripts, require POST for non-idempotent requests 2022-08-16 21:16:50 +02:00

README.md

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 format, registered in the SpaceAPI directory
  • GET status-s.php: returns true if space is open, false if closed. Called by discourse theme and serendipity.
  • POST update.php: updates the current open status, called by the wood box with two fat buttons ("2fb").
  • POST ping.php: requests a "spaceping". Called by the matrix bot.
  • POST ping-get.php: returns true if a ping request is pending, then resets the request. Called 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.