-
Notifications
You must be signed in to change notification settings - Fork 9
Data api statistics pageviewsfordate
Taku AMANO edited this page Aug 26, 2013
·
2 revisions
Retrieve pageviews count for each date from provider (e.g. Google Analytics).
Authorization is required.
This method accepts GET only.
GET https://your-host/your-mt-api.cgi/v1/sites/{blog_id}/stats/date/pageviews
Parameter | Type | Description |
---|---|---|
blog_id | unsigned integer | The blog ID. |
Parameter | Type | Description |
---|---|---|
startDate | iso 8601 date | This is an required parameter. Start date of data. The format is "YYYY-MM-DD". |
endDate | iso 8601 date | This is an required parameter. End date of data. The format is "YYYY-MM-DD". |
limit | unsigned integer | This is an optional parameter. Maximum number of paths to retrieve. Default is 10. |
offset | string | This is an optional parameter. 0-indexed offset. Default is 0. |
path | string | This is an optional parameter. The target path of data to retrieve. Default is the path of the current site. |
Do not supply a request body.
Parameter | Type | Description |
---|---|---|
totalResults | unsigned integer | The total number of paths found that by the requesst. |
items | ARRAY | An array of Items for date resource. |
totals | Object | |
totals.pageviews | unsigned integer | The sum total of the pageviews in the specified period. |
Code | Description |
---|---|
200 | no error |
404 | Readied provider is not found |
500 | Error retrieving statistics data: [_1]: [_2] |
GET /mt-api.cgi/v1/sites/1/stats/date/pageviews?startDate=2013-01-01&endDate=2013-01-31
HTTP/1.0 200 OK
Content-Type: application/json
Content-length: ...