lab2
This commit is contained in:
+12
-4
@@ -5,6 +5,7 @@
|
||||
@aliceId = REPLACE_WITH_CREATED_ALICE_UUID
|
||||
@bobId = REPLACE_WITH_CREATED_BOB_UUID
|
||||
@chatId = REPLACE_WITH_CREATED_CHAT_UUID
|
||||
@sessionToken = REPLACE_LOCALLY_DO_NOT_COMMIT
|
||||
|
||||
### Liveness
|
||||
GET {{baseUrl}}/health/live
|
||||
@@ -15,23 +16,30 @@ Content-Type: application/json
|
||||
|
||||
{
|
||||
"username": "alice",
|
||||
"display_name": "Алиса"
|
||||
"display_name": "Алиса",
|
||||
"password": "Example-only-not-a-real-secret-123"
|
||||
}
|
||||
|
||||
### Create session: generate the Base64 value locally, do not commit credentials
|
||||
# Base64 of UTF-8 username:password; only this endpoint accepts Basic.
|
||||
POST {{baseUrl}}/api/v1/auth/sessions
|
||||
Authorization: Basic REPLACE_WITH_LOCAL_BASE64_CREDENTIAL
|
||||
|
||||
|
||||
### Create chat; both UUIDs must be real registered users
|
||||
POST {{baseUrl}}/api/v1/chats
|
||||
X-User-Id: {{aliceId}}
|
||||
Authorization: Bearer {{sessionToken}}
|
||||
Content-Type: application/json
|
||||
|
||||
{"title":"Проект по ВНП","member_ids":["{{aliceId}}","{{bobId}}"]}
|
||||
|
||||
### Send message
|
||||
POST {{baseUrl}}/api/v1/chats/{{chatId}}/messages
|
||||
X-User-Id: {{aliceId}}
|
||||
Authorization: Bearer {{sessionToken}}
|
||||
Content-Type: application/json
|
||||
|
||||
{"text":"Привет, Боб!"}
|
||||
|
||||
### Read first page
|
||||
GET {{baseUrl}}/api/v1/chats/{{chatId}}/messages?limit=50
|
||||
X-User-Id: {{aliceId}}
|
||||
Authorization: Bearer {{sessionToken}}
|
||||
|
||||
Reference in New Issue
Block a user