Download Report Data
Overview
- Purpose
This endpoint will allow you to download the results of running a report on CommCare. To identify the reports available, see List Reports .
- Authentication
For more information, please review API Authentication
Base URL
https://www.commcarehq.org/a/[PROJECT]/api/configurablereportdata/v1/REPORTID/
- Method
GET
- Permission Required
View Data
Access All Reports
Request & Response Details
Input Parameters
The report data can be filtered (based on the report’s filter) and is also paged.
Name |
Description |
Example |
|---|---|---|
|
The record number to start at. Default is 0. |
|
|
The maximum number of records to return. Maximum: 50 |
|
|
|
|
Sample Usage
https://www.commcarehq.org/a/[PROJECT]/api/configurablereportdata/v1/9aab0eeb88555a7b4568676883e7379a/?offset=20&limit=10&state=vermont&gender=male
Sample JSON Output
{
"columns": [
{
"header": "District",
"slug": "district"
},
{
"header": "Num Children Visited",
"slug": "number_of_children_visited"
},
{
"header": "Gender-male",
"expand_column_value": "male",
"slug": "gender-male"
},
{
"header": "Gender-female",
"expand_column_value": "female",
"slug": "gender-female"
}
],
"data": [
{
"district": "Middlesex",
"number_of_children_visited": 46,
"gender-male": 10,
"gender-female": 35
},
{
"district": "Suffolk",
"number_of_children_visited": 85,
"gender-male": 81,
"gender-female": 4
}
],
"next_page": "/a/[PROJECT]/api/configurablereportdata/v1/9aab0eeb88555a7b4568676883e7379a/?offset=3&limit=3&state=vermont",
"total_records": 30
}
If the column type is “expanded”, there may be multiple results for a given column - these are named column_id-0, column_id-1, etc. Each result represents a unique value of that column. The headers section includes details on the value of each column.