Admin-Functionality
- Handler: POST /api/admin/login
- Description: Retrieves the API token given the correct username and password.
- Parameters: None
Request:
curl --insecure -i -H "Content-Type: application/json" https://localhost:1337/api/admin/login -X POST -d '{"username":"empireadmin", "password":"Password123!"}'
Response:
{
"token": "ks23jlvdki4fj1j23w39h0h0xcuwjrqilocxd6b5"
}
- Handler: POST /api/admin/logout
- Description: Logs out of current user account.
- Parameters: None
Request:
curl --insecure -i -H "Content-Type: application/json" https://localhost:1337/api/admin/logout -X POST
Response:
{
"success": "True"
}
- Handler: GET /api/restart
- Description: Restarts the RESTful API server.
- Parameters: None
Request:
curl --insecure -i https://localhost:1337/api/admin/restart?token=ks23jlvdki4fj1j23w39h0h0xcuwjrqilocxd6b5
Response:
{
"success": true
}
- Handler: GET /api/shutdown
- Description: Shutdown the RESTful API server.
- Parameters: None
Request:
curl --insecure -i https://localhost:1337/api/admin/shutdown?token=ks23jlvdki4fj1j23w39h0h0xcuwjrqilocxd6b5
Response:
{
"success": true
}
Last modified 1yr ago