Skip to content

API Tips

Aelithron edited this page Dec 11, 2024 · 1 revision

Here's some basic advice for using the AxionSpire API!

  1. Make sure to check before you upload. Be careful in regards to sending malformed or empty data. The API may fully reject a request if it has a missing parameter.
  2. Always check for a status code of 4XX or 5XX, as well as the error field in the JSON response. Any failed request will contain an error parameter, and successful requests never will. Errors also come along with a message parameter, which is human-readable.
  3. Send a Content-Type header. The API currently uses exclusively JSON, so applying a Content-Type: application/json header will make things work much better (mainly with Express's JSON middleware parser, which is heavily used in this API).

Clone this wiki locally