Version: 1.0.0 Workflow: authenticated-guild-query Category: Authentication
Authenticate and query current player’s guild information.
webapp_usernamewebapp_passwordwebapp-auth-loginPOSThttp://localhost:8080/api/auth/loginRequest Body:
{
"username": "",
"password": ""
}
Request Headers:
| Header | Value |
|---|---|
| Content-Type | application/json |
Data Extraction:
session_cookie from response.headers.Set-Cookiesession_id from response.headers.Set-Cookie (extract PHPSESSID value)Expected Response:
200schemas/responses.md#/definitions/AuthResponseError Handling:
| Status | Action |
|---|---|
| 401 | Invalid credentials - verify username/password |
| 500 | Server error - retry with exponential backoff |
webapp-guild-currentGEThttp://localhost:8080/api/guild/thisRequest Headers:
| Header | Value |
|---|---|
| Cookie | `` |
| Accept | application/json |
Data Extraction:
guild_id from response.body.idguild_name from response.body.nameExpected Response:
200schemas/entities.md#/definitions/GuildError Handling:
| Status | Action |
|---|---|
| 401 | Session expired - re-authenticate (go to step 1) |
| 404 | Player not in a guild |
| 500 | Server error - retry with exponential backoff |
webapp-guild-member-countGEThttp://localhost:8080/api/guild//members/countRequest Headers:
| Header | Value |
|---|---|
| Cookie | `` |
| Accept | application/json |
Data Extraction:
member_count from response.body.countExpected Response:
200schemas/responses.md#/definitions/CountResponse{
"guild": {
"id": "",
"name": "",
"member_count": ""
},
"session": {
"cookie": ""
}
}
| Step | Status | Action |
|---|---|---|
| 1 | 401 | Invalid credentials - cannot proceed |
| 1 | 500 | Server error - retry with exponential backoff |
| 2 | 401 | Session expired - re-authenticate and retry |
| 2 | 404 | Player not in a guild - result.guild will be null |
This workflow demonstrates authentication followed by authenticated API calls. The session cookie from step 1 is used in subsequent requests.