Difference between revisions of "API: Reporting"
From Charitylog Manual
(5 intermediate revisions by one other user not shown) | |||
Line 3: | Line 3: | ||
[[File:helpheader_small.png|right]] | [[File:helpheader_small.png|right]] | ||
− | Reporting is based on dimensions and metrics, conceptually similar to an X and Y axis | + | Reporting is based on dimensions and metrics, conceptually similar to an X and Y axis. |
+ | If you use a dimension, you will get a breakdown of the number of records by that dimension. For example, this will show you how many clients there are in each district: | ||
[GET] https<nowiki/>://api.dizions.co.uk/v2/clients/dimension/district | [GET] https<nowiki/>://api.dizions.co.uk/v2/clients/dimension/district | ||
− | If you want this further | + | If you want this further, add a metric, for example, this breaks the client count down by district and gender: |
[GET] https<nowiki/>://api.dizions.co.uk/v2/clients/dimension/district/metric/gender | [GET] https<nowiki/>://api.dizions.co.uk/v2/clients/dimension/district/metric/gender | ||
− | You can also filter the results in the same way as other [GET] requests: | + | You can also filter the results in the same way as other [GET] requests, for example, this shows the same report, but only for clients with disability 7 or 9 who have a blue badge: |
[GET] https<nowiki/>://api.dizions.co.uk/v2/clients/dimension/district/metric/gender/main_disability/7;9/blue_badge_holder/Y | [GET] https<nowiki/>://api.dizions.co.uk/v2/clients/dimension/district/metric/gender/main_disability/7;9/blue_badge_holder/Y | ||
− | + | The format is the same for most endpoints, for example, this shows a user's completed contacts by day during October: | |
− | + | [GET] https<nowiki/>://api.dizions.co.uk/v2/done_contacts/dimension/day/date_active/2018-10-01,2018-10-31/user/SPECIFY_A_USER_ID | |
− | [GET] https<nowiki/>://api.dizions.co.uk/v2/done_contacts/dimension/day/date_active/2018-10-01,2018-10-31/user/ | ||
− | |||
− |
Latest revision as of 11:42, 2 August 2024
Reporting is based on dimensions and metrics, conceptually similar to an X and Y axis. If you use a dimension, you will get a breakdown of the number of records by that dimension. For example, this will show you how many clients there are in each district:
[GET] https://api.dizions.co.uk/v2/clients/dimension/district
If you want this further, add a metric, for example, this breaks the client count down by district and gender:
[GET] https://api.dizions.co.uk/v2/clients/dimension/district/metric/gender
You can also filter the results in the same way as other [GET] requests, for example, this shows the same report, but only for clients with disability 7 or 9 who have a blue badge:
[GET] https://api.dizions.co.uk/v2/clients/dimension/district/metric/gender/main_disability/7;9/blue_badge_holder/Y
The format is the same for most endpoints, for example, this shows a user's completed contacts by day during October:
[GET] https://api.dizions.co.uk/v2/done_contacts/dimension/day/date_active/2018-10-01,2018-10-31/user/SPECIFY_A_USER_ID