The REST API is mainly used for authentication and very few things. For other part, we are using the GraphQL API. Check the GraphQL API Documentation for more information.
POST /auth/login
Form Data
| Key | Value Type | Example Value |
|---|---|---|
| username | string | admin |
| password | string | 12345 |
Example Response
200 OK
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MDI2NjI5MzUsImlhdCI6MTcwMjY1OTMzNSwibmJmIjoxNzAyNjU5MzM1LCJ1c2VybmFtZSI6InRhbm1veXNydCJ9.5X9n8iEQy7UNcGfReH2Ap2WiSXZfFkQ0WJURMIyl_O0"
}400 Bad Request
- Invalid username
{ "message": "user does not exist" } - Missing password
{ "message": "incorrect password" }
POST /upload/code
Form Data
| Key | Value Type | Example Value |
|---|---|---|
| file | file (only tar files) | code.tar |
Example Response
200 OK
{
"file": "d396973f-82a2-4e42-9273-404d9e4a6696.tar",
"message": "file uploaded successfully"
}400 Bad Request
- Missing file
{ "message": "file not found" } - Invalid file format
{ "message": "file is not a tar file" }
GET /persistent-volume/backup/<backup_id>/download
Example Response
200 OK
- The file will be downloaded
Any other status code
- The file will not be downloaded
GET /persistent-volume/backup/:id/filename
Example Response
200 OK
- Filename will be sent as response text
Any other status code
- The filename will be failed to send
POST /persistent-volume/:id/restore
Form Data
| Key | Value Type | Example Value |
|---|---|---|
| file | file (only tar files) | file.tar.gz |
Example Response
200 OK
{
"message": "Restore job has been enqueued. You can check the status of the restore job in restore panel"
}Any other status code
- The file upload failed