[feature/api] Check if API is enabled on each request

Check if the API is enabled on the board. If not, return a 500 error
with an error message about the API not being enabled.

PHPBB3-11595