awe.sm Stats API
Retrieve Interval Stats for Multiple Links
Get the details for a list of specified awesm_ids.
Note: If you don't have a list of links, but want stats for links matching certain criteria, use stats/range/intervals with filters, groups, and pivots.
GETapi.awe.sm/stats/awesm_ids/batch/intervals.json
The POST method is also supported. HTTPS is supported on this endpoint.
Required Parameters
| Parameter | Type | Description |
|---|---|---|
| awesm_ids | string | Comma-separated list of awesm_ids on which you want to retrieve |
| key | string or array | API key(s) of the project(s) on which stats are being requested. |
| start_date | date | The beginning of the period for which you want data, rounded to previous hour. Requires value after 2010-06-04. |
| end_date | date | The end of the period for which you want data, rounded to next hour. |
| v | integer | API version: 3 for this endpoint. |
Optional Parameters
| Parameter | Type | Description |
|---|---|---|
| callback | string | Returns a JSON-P response named with this parameter's value. |
| interval | string | Period of time between stats: hour, day, or week. Limited to 500 intervals. Requires start_date after 2010-06-04. Default is day. |
| with_conversions | boolean | Flag to include conversion values in response. Default is FALSE. |
| with_metadata | boolean | Flag to include metadata objects in response. Default is FALSE. |
| with_zeros | boolean | Flag to include intervals with no activity. Default is FALSE. |
Pagination Parameters
| Parameter | Type | Description |
|---|---|---|
| per_page | integer | The maximum number of results returned per request. Default is 10. |
| page | integer | The group of results to be returned if the number of results is greater than the per_page value. Page numbers start at and default to 1. |
| offset | integer | The position of the first result to be returned. Overrides page if specified. Should be set to last_offset value returned in the previous page. |
Related APIs
- Link Details: request details for one link
- Batch Link Details: request stats for multiple links in a single call
Example
GET http://api.awe.sm/stats/awesm_ids/batch/intervals.json?v=3&key=5c8b1a212434c2153c2f2c2f2c765a36140add243bf6eae876345f8fd11045d9&awesm_ids=demo.awe.sm_K7e,demo.awe.sm_KD7,demo.awe.sm_K8E&interval=week&start_date=2011-10-01&end_date=2011-11-01&with_zeros=true
{
"start_date": "2011-10-01T00:00:00Z",
"end_date": "2011-11-01T00:00:00Z",
"with_metadata": false,
"with_conversions": false,
"interval": "week",
"with_zeros": true,
"page": 1,
"per_page": 10,
"total_results": 3,
"offset": 0,
"last_offset": 3,
"awesm_ids": [
{
"awesm_id": "demo.awe.sm_K7e",
"clicks": 5,
"last_clicked_at": "2011-10-04T23:51:15Z",
"intervals": [
{
"week": "2011-10-01T00:00:00Z",
"clicks": 5
},
{
"week": "2011-10-08T00:00:00Z",
"clicks": 0
},
{
"week": "2011-10-15T00:00:00Z",
"clicks": 0
},
{
"week": "2011-10-22T00:00:00Z",
"clicks": 0
},
{
"week": "2011-10-29T00:00:00Z",
"clicks": 0
}
]
},
{
"awesm_id": "demo.awe.sm_KD7",
"clicks": 3,
"last_clicked_at": "2011-10-19T16:29:26Z",
"intervals": [
{
"week": "2011-10-01T00:00:00Z",
"clicks": 2
},
{
"week": "2011-10-08T00:00:00Z",
"clicks": 0
},
{
"week": "2011-10-15T00:00:00Z",
"clicks": 1
},
{
"week": "2011-10-22T00:00:00Z",
"clicks": 0
},
{
"week": "2011-10-29T00:00:00Z",
"clicks": 0
}
]
},
{
"awesm_id": "demo.awe.sm_K8E",
"clicks": 2,
"last_clicked_at": "2011-10-05T01:24:12Z",
"intervals": [
{
"week": "2011-10-01T00:00:00Z",
"clicks": 2
},
{
"week": "2011-10-08T00:00:00Z",
"clicks": 0
},
{
"week": "2011-10-15T00:00:00Z",
"clicks": 0
},
{
"week": "2011-10-22T00:00:00Z",
"clicks": 0
},
{
"week": "2011-10-29T00:00:00Z",
"clicks": 0
}
]
}
]
}
Last updated 2013-01-10