Score Flags¶
List Score Flags¶
import requests
headers = {
'Accept': 'application/json',
'leadr-api-key': 'string',
'authorization': 'string',
'leadr-client-nonce': 'string'
}
r = requests.get('/v1/score-flags', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'leadr-api-key':'string',
'authorization':'string',
'leadr-client-nonce':'string'
};
fetch('/v1/score-flags',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /v1/score-flags
List score flags for an account with optional filters.
Returns all non-deleted flags for the specified account, with optional filtering by board, game, status, or flag type.
For regular users, account_id is automatically derived from their API key. For superadmins, account_id is optional - if omitted, returns flags from all accounts.
Args: auth: Authentication context with user info. service: Injected score flag service dependency. account_id: Optional account_id query parameter (superadmins can omit to see all). board_id: Optional board ID to filter by. game_id: Optional game ID to filter by. status: Optional status to filter by (PENDING, CONFIRMED_CHEAT, etc.). flag_type: Optional flag type to filter by (VELOCITY, DUPLICATE, etc.).
Returns: List of ScoreFlagResponse objects matching the filter criteria.
Raises: 403: User does not have access to the specified account.
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| account_id | query | any | false | none |
| board_id | query | any | false | none |
| game_id | query | any | false | none |
| status | query | any | false | none |
| flag_type | query | any | false | none |
| leadr-api-key | header | any | false | none |
| authorization | header | any | false | none |
| leadr-client-nonce | header | any | false | none |
Example responses
200 Response
[
{
"id": "string",
"score_id": "string",
"flag_type": "string",
"confidence": "string",
"metadata": {},
"status": "string",
"reviewed_at": "2019-08-24T14:15:22Z",
"reviewer_id": "string",
"reviewer_decision": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
]
Responses¶
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Successful Response | Inline |
| 422 | Unprocessable Entity | Validation Error | HTTPValidationError |
Response Schema¶
Status Code 200
Response List Score Flags V1 Score Flags Get
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| Response List Score Flags V1 Score Flags Get | [ScoreFlagResponse] | false | none | [Response model for a score flag.] |
| » ScoreFlagResponse | ScoreFlagResponse | false | none | Response model for a score flag. |
| »» id | string | true | none | Unique identifier for the score flag |
| »» score_id | string | true | none | ID of the score that was flagged |
| »» flag_type | string | true | none | Type of flag (e.g., VELOCITY, DUPLICATE, RATE_LIMIT) |
| »» confidence | string | true | none | Confidence level of the flag (LOW, MEDIUM, HIGH) |
| »» metadata | object | true | none | Additional metadata about the flag |
| »» status | string | true | none | Status: PENDING, CONFIRMED_CHEAT, FALSE_POSITIVE, or DISMISSED |
| »» reviewed_at | any | false | none | Timestamp when flag was reviewed, or null |
anyOf
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| »»» anonymous | string(date-time) | false | none | none |
or
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| »»» anonymous | null | false | none | none |
continued
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| »» reviewer_id | any | false | none | ID of the user who reviewed this flag, or null |
anyOf
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| »»» anonymous | string | false | none | none |
or
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| »»» anonymous | null | false | none | none |
continued
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| »» reviewer_decision | any | false | none | Admin's decision/notes, or null |
anyOf
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| »»» anonymous | string | false | none | none |
or
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| »»» anonymous | null | false | none | none |
continued
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| »» created_at | string(date-time) | true | none | Timestamp when the flag was created (UTC) |
| »» updated_at | string(date-time) | true | none | Timestamp of last update (UTC) |
Success
This operation does not require authentication
Get Score Flag¶
import requests
headers = {
'Accept': 'application/json',
'leadr-api-key': 'string',
'authorization': 'string',
'leadr-client-nonce': 'string'
}
r = requests.get('/v1/score-flags/{flag_id}', headers = headers)
print(r.json())
const headers = {
'Accept':'application/json',
'leadr-api-key':'string',
'authorization':'string',
'leadr-client-nonce':'string'
};
fetch('/v1/score-flags/{flag_id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /v1/score-flags/{flag_id}
Get a score flag by ID.
Args: flag_id: Flag identifier to retrieve. service: Injected score flag service dependency. auth: Authentication context with user info.
Returns: ScoreFlagResponse with the flag details.
Raises: 403: User does not have access to this flag's account. 404: Flag not found or soft-deleted.
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| flag_id | path | string | true | none |
| account_id | query | any | false | none |
| leadr-api-key | header | any | false | none |
| authorization | header | any | false | none |
| leadr-client-nonce | header | any | false | none |
Example responses
200 Response
{
"id": "string",
"score_id": "string",
"flag_type": "string",
"confidence": "string",
"metadata": {},
"status": "string",
"reviewed_at": "2019-08-24T14:15:22Z",
"reviewer_id": "string",
"reviewer_decision": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
Responses¶
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Successful Response | ScoreFlagResponse |
| 422 | Unprocessable Entity | Validation Error | HTTPValidationError |
Success
This operation does not require authentication
Update Score Flag¶
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'leadr-api-key': 'string',
'authorization': 'string',
'leadr-client-nonce': 'string'
}
r = requests.patch('/v1/score-flags/{flag_id}', headers = headers)
print(r.json())
const inputBody = '{
"status": "string",
"reviewer_decision": "string",
"deleted": true
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'leadr-api-key':'string',
'authorization':'string',
'leadr-client-nonce':'string'
};
fetch('/v1/score-flags/{flag_id}',
{
method: 'PATCH',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
PATCH /v1/score-flags/{flag_id}
Update a score flag (review or soft-delete).
Allows reviewing a flag (updating status and reviewer decision) or soft-deleting the flag.
Args: flag_id: Flag identifier to update. request: Update details (status, reviewer_decision, or deleted flag). service: Injected score flag service dependency. auth: Authentication context with user info.
Returns: ScoreFlagResponse with the updated flag details.
Raises: 403: User does not have access to this flag's account. 404: Flag not found. 400: Invalid update request.
Body parameter
{
"status": "string",
"reviewer_decision": "string",
"deleted": true
}
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| flag_id | path | string | true | none |
| account_id | query | any | false | none |
| leadr-api-key | header | any | false | none |
| authorization | header | any | false | none |
| leadr-client-nonce | header | any | false | none |
| body | body | ScoreFlagUpdateRequest | true | none |
Example responses
200 Response
{
"id": "string",
"score_id": "string",
"flag_type": "string",
"confidence": "string",
"metadata": {},
"status": "string",
"reviewed_at": "2019-08-24T14:15:22Z",
"reviewer_id": "string",
"reviewer_decision": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
Responses¶
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Successful Response | ScoreFlagResponse |
| 422 | Unprocessable Entity | Validation Error | HTTPValidationError |
Success
This operation does not require authentication