-
Notifications
You must be signed in to change notification settings - Fork 2
API
Mike J. Renaker / "MikeDEV edited this page Apr 3, 2024
·
2 revisions
The CloudLink Omega API utilizes simple REST requests that are either application/json
or text/plain
requests/responses.
The public CLΩ API server is available at https://omega.mikedev101.cc/api/v0
.
POST /api/v0/register
Use application/json
.
{
"username": string,
"password": string,
"email": string,
}
- Username must be at least 3 characters long, and no longer than 20.
- Password must be at least 8 characters long, and no longer than 128.
- A valid email address must be provided.
201 Created
OK
400 Bad Request
Validation failed:
username: required
password: required
email: required
POST /api/v0/login
Use application/json
.
{
"email": string,
"password": string,
}
- A valid email address must be provided.
- Password must be at least 8 characters long, and no longer than 128.
200 OK
(A ULID string will be generated here - This will be your session token. Expires after 24 hours)
400 Bad Request
Validation failed:
email: required
password: required
POST /api/v0/save
Use application/json
.
{
"save_data": string, // Contents to save
"save_slot": int, // 1-10
"token": string, // Session token
"ugi: string, // Selected game to save to
}
- Token must be valid.
- Save slot # must be a number between 1 and 10.
- Save data must not be larger than 10,000 characters.
200 OK
OK
401 Unauthorized
session not found
or
Session token has expired.
400 Bad Request
Validation failed:
ugi: required
token: required
save_data: required
save_slot: required
POST /api/v0/load
Use application/json
.
{
"save_slot": int, // 1-10
"token": string, // Session token
"ugi: string, // Selected game to load from
}
- Token must be valid.
- Save slot # must be a number between 1 and 10.
200 OK
(contents of save slot)
401 Unauthorized
session not found
or
Session token has expired.
400 Bad Request
Validation failed:
ugi: required
token: required
save_slot: required