-
Notifications
You must be signed in to change notification settings - Fork 13
The V0 API
Our "version zero" API documentation exists as a comprehensive description of the endpoints that will be exposed by the server. It constitutes a Minimum Viable Product, and as such is not suitable for production. This API is not only subject to change, but is almost guaranteed to look completely different when v1 comes around. As such, it will almost certainly be scrapped at that time.
We do not recommend that developers build client apps that query this API. This documentation is made public so that developers and users can get an idea of what kind of services the website will likely provide in the future. This Wiki is intended to be used as specification and reference for our developers, not actual documentation, meaning that not all of the features described herein are even likely implemented yet.
Anyone with access to the repo may edit the wiki. However, you must get approval from the project lead (currently @Matt-Hurd / Lost_IC in Discord) before making breaking changes. In general, if you want to see a feature added, the best thing to do is to create an issue or come discuss it with us on our discord server.
All routes are prefixed with api/v1
.
- Registers a user.
Name | Required | Type |
---|---|---|
Username | true | string |
true | string | |
Password | true | string |
// HTTP 201
{
"data": {
"ID": "<string>",
"Username": "<string>"
}
}
// HTTP 409
{
"errors": {
"constraint": "<string>",
"message": "<string>"
}
}
// HTTP 500
<Empty response>
- Logs a user in.
- Logs a user out.
- Generates a new JWT.
- Pings the server. A de facto health check lmao.
// HTTP 200
{
"message": "pong"
}
- Gets the data of a user.
// HTTP 200
{
"data": {
"ID": "<uint>",
"Username": "<string>"
}
}
// HTTP 400
<Empty response>
// HTTP 404/500
{
"message": "<string>"
}
- Gets the currently logged-in user.
// HTTP 200
{
"data": {
"ID": "<uint>",
"Username": "<string>",
"Email": "<string>"
}
}
// HTTP 500
<Empty response>