Add get_user_login

Arlo Filley 2024-03-25 10:21:24 +00:00
parent b4da90376d
commit 4d1b243c71

31
get_user_login.md Normal file

@ -0,0 +1,31 @@
# User Login Endpoint
## GET `/api/user/login/<username>/<password>`
Takes the user's login information and returns the user's user ID, which can be used to identify their tests, etc. Accessible from http://url/api/login.
## Request Parameters
- `username`: The username of the user.
- `password`: The password of the user.
## Responses
- `200 OK`: Successfully retrieves the user ID.
- `401 Unauthorized`: Indicates that the login credentials are invalid.
- `500 Internal Server Error`: Indicates an issue with accessing the database.
## Example Request
```bash
curl -X GET "https://url/api/user/login/example_user/example_password"
```
## Example Response
```json
{
"user_id": "1234567890",
"secret": "abcdefghijklmnopqrstuvwxyz"
}
```