-
Notifications
You must be signed in to change notification settings - Fork 11
Stats
Paul Dilyard edited this page Oct 1, 2015
·
13 revisions
GET /stats/registrations
Auth -> admin, staff
HTTP/1.1 200 OK
{
"months": [{
"name": String, // the name of the month
"count": Number // the number of registrations in that month
}]
}
GET /stats/shirts
Auth -> admin, staff
HTTP/1.1 200 OK
{
"small": Number,
"medium": Number,
"large": Number,
"xlarge": Number
}
GET /stats/dietary
Auth -> admin, staff
HTTP/1.1 200 OK
{
"restrictions": [{
"name": String, // the name of a dietary restriction
"count": Number // the number of people with that restriction
}]
}
GET /stats/gender
Auth -> admin, staff
HTTP/1.1 200 OK
{
"male": Number,
"female": Number,
"other": Number
}
GET /stats/schools
Auth -> admin, staff
HTTP/1.1 200 OK
{
"schools": [{
"name": String,
"count": Number
}]
}
GET /stats/count
Auth -> admin, staff
HTTP/1.1 200 OK
{
"count": Number
}
You can also query all of the /stats
routes by adding your query to the request URI, like this:
GET /stats/gender?checked=true
The above will return the gender distribution of attendees who are checked in. You can run queries against any property in the Application model.