DataPoint API¶
/api/v1/date_datapoint/¶
- 
class 
rhizome.api.resources.date_datapoint.DateDatapointResource(*args, **kwargs)[source]¶ - GET Requests:
 - Required Parameters:
 ‘indicator__in’ A comma-separated list of indicator IDs to fetch. By default, all indicators ‘chart_type’
- Optional Parameters:
 ‘location__in’ A comma-separated list of location IDs ‘campaign_start’ format:
YYYY-MM-DDInclude only datapoints from campaigns that began on or after the supplied date ‘campaign_end’ format:YYYY-MM-DDInclude only datapoints from campaigns that ended on or before the supplied date ‘campaign__in’ A comma-separated list of campaign IDs. Only datapoints attached to one of the listed campaigns will be returned ‘cumulative’
/api/v1/campaign_datapoint/¶
- 
class 
rhizome.api.resources.campaign_datapoint.CampaignDataPointResource(api_name=None)[source]¶ - GET Request Returns computed datapoints for a given document
 - Required Parameters:
 ‘document_id’
- Errors:
 Returns 200 code with an empty set of objects if the id is invalid, or an id is not specified
- POST Request Create a computed datapoint
 - Required Parameters:
 ‘document_id’, ‘indicator_id’, ‘campaign_id’, ‘location_id’, ‘value’
- Errors:
 Returns 500 error if information is missing.
- To Note:
 The api does not validate any of these required parameters. It is possible to create datapoints with invalid campaign ids, etc.
DELETE Request Delete Detail: Delete a computed datapoint using the format ‘/api/v1/computed_datapoint/<datapoint_id>/’
Response Format¶
{
  meta: {...},
  objects: [{
    indicator_id: <Number>,
    location_name: <String>,
    campaign_name: <String>,
    indicator_short_name:<String>,
    value: <Float>
  }],
  errors: {...}
}