api GET users - bWorksApp/paas GitHub Wiki
Endpoints
1. Get User List
Endpoint: /users
Method: GET
Description: Retrieve a list of all users.
Request Example:
curl -X GET "https://paas.bworks.app/api/users" -H "Authorization: Bearer YOUR_API_KEY"
Response Example:
[
{
"isShowContact": false,
"isShowEmail": false,
"issContractDev": true,
"isdAppDev": true,
"isApproved": true,
"isNotified": true,
"skills": [],
"_id": "6603d0afe9aceb37b1bb6ced",
"username": "demo",
"fullName": "Demo user",
"createdAt": "2022-11-20T12:52:06.702Z",
"__v": 0,
"completedAt": "2023-02-15T07:34:35.957Z",
"nonce": "7061617378376a64364f38645945653245365042756466646165797643387a4a69713243",
"walletAddress": "addr1qxpel0kkv0ewx5wdxa3kfzsgy8hvjqkyy6amwelc6m69w45uaauv0tfwhmtcmn69rpakh5erdrspzpqxauyf5t0y8d8s32lnda",
"authType": "email",
"roles": [
"admin",
"user"
]
}
]
Response Codes:
- 200 OK: Successfully retrieved the user details.
- 401 Unauthorized: Authentication failed. Please check your API key.
- 404 Not Found: The user with the specified ID was not found.
- 500 Internal Server Error: An error occurred on the server.
Authentication: This API uses Bearer Token authentication. You must include an Authorization header with each request:
Authorization: Bearer YOUR_API_KEY
Error Handling - Common error responses:
- 400 Bad Request: The request could not be understood or was missing required parameters.
- 401 Unauthorized: Authentication failed or user does not have permissions for the requested operation.
- 404 Not Found: The requested resource could not be found.
- 500 Internal Server Error: An error occurred on the server.