Get what a rule did
curl --request GET \
--url https://api.getlurk.com/v1/rules/{id}/stats \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getlurk.com/v1/rules/{id}/stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.getlurk.com/v1/rules/{id}/stats"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"rule": "<string>",
"period": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z"
},
"receipts": 1,
"users": 1,
"given": [
{
"unit": "<string>",
"amount": 123
}
],
"skipped": [
{
"reason": "condition_failed",
"count": 1
}
],
"top_users": [
{
"id": "<string>",
"external_id": "<string>",
"receipts": 2,
"given": [
{
"unit": "<string>",
"amount": 123
}
]
}
]
}{
"error": {
"status": 123,
"code": "invalid_json",
"message": "<string>",
"request_id": "<string>",
"doc_url": "<string>",
"param": "<string>",
"next_step": "<string>"
}
}{
"error": {
"status": 123,
"code": "invalid_json",
"message": "<string>",
"request_id": "<string>",
"doc_url": "<string>",
"param": "<string>",
"next_step": "<string>"
}
}Rules
Get what a rule did
From the receipts: how many times the rule changed something, for how many people, and how much it gave or took per unit, plus how often it did not apply and why, and the ten people it reached most. Skips are kept for 30 days.
GET
/
v1
/
rules
/
{id}
/
stats
Get what a rule did
curl --request GET \
--url https://api.getlurk.com/v1/rules/{id}/stats \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getlurk.com/v1/rules/{id}/stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.getlurk.com/v1/rules/{id}/stats"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"rule": "<string>",
"period": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z"
},
"receipts": 1,
"users": 1,
"given": [
{
"unit": "<string>",
"amount": 123
}
],
"skipped": [
{
"reason": "condition_failed",
"count": 1
}
],
"top_users": [
{
"id": "<string>",
"external_id": "<string>",
"receipts": 2,
"given": [
{
"unit": "<string>",
"amount": 123
}
]
}
]
}{
"error": {
"status": 123,
"code": "invalid_json",
"message": "<string>",
"request_id": "<string>",
"doc_url": "<string>",
"param": "<string>",
"next_step": "<string>"
}
}{
"error": {
"status": 123,
"code": "invalid_json",
"message": "<string>",
"request_id": "<string>",
"doc_url": "<string>",
"param": "<string>",
"next_step": "<string>"
}
}Authorizations
Query Parameters
Response
Get what a rule did
What the rule actually did, from the receipts