The Admin Server provides endpoints for managing trash reports and user authentication. All paths in this route require an authorization header with an account level of 100.
- Ensure you has installed sure-backend-api (sure client api)
- Setting .env like your sure client api
Please register account first with register api at sure-backend-api and then change level field in your account to 100 with MySQL Query. OR Use Demo Account:
- username: Admin1
- password: admin
- Description: Retrieves a list of trash reports.
- Authorization Level: 100
- Description: Retrieves detailed information about a specific trash report.
- Authorization Level: 100
- Description: Retrieves a list of trash proof reports.
- Authorization Level: 100
- Description: Retrieves detailed information about a specific trash proof report.
- Authorization Level: 100
- Description: Verifies a trash report.
- Authorization Level: 100
- Description: Removes a trash report.
- Authorization Level: 100
- Description: Restores a previously removed trash report.
- Authorization Level: 100
- Description: Verifies a trash proof report.
- Authorization Level: 100
-
Description: Logs in a admin.
- Payload:
- username (String, required): Username of the user.
- password (String, required): Password of the user.
- Payload:
POST /login
Host: sureadminapi.riandev.xyz
Content-Type: application/json
{
"username": "admin",
"password": "admin"
}{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"full_name": "admin_name"
}All endpoints except for /login require an authorization header with an account level of 100.
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...- Replace
{id}in the paths with the actual ID of the trash or proof report. - Ensure the authorization header is included in each request to authorized endpoints.
- For successful data manipulation, use the correct method and payload as described in each endpoint's documentation.