From 4d1b243c71416a4e31f270b6b524d45f749b592a Mon Sep 17 00:00:00 2001 From: Arlo Date: Mon, 25 Mar 2024 10:21:24 +0000 Subject: [PATCH] Add get_user_login --- get_user_login.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 get_user_login.md diff --git a/get_user_login.md b/get_user_login.md new file mode 100644 index 0000000..c065010 --- /dev/null +++ b/get_user_login.md @@ -0,0 +1,31 @@ +# User Login Endpoint + +## GET `/api/user/login//` + +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" +} +``` \ No newline at end of file