This web service responds with the number of Page views.
Method | Endpoint |
---|---|
POST |
|
Request example
{
"startDate": "2024-01-01",
"endDate": "2024-05-01",
"groupByPeriod": "month",
"filters": {
"pageId": [
"ft/home",
"ft/search",
"ft/reader",
"default",
"ft/viewer"
],
"language": "en-US",
"authenticated": true
}
}
Field | Type | Required? | Description |
---|---|---|---|
startDate |
String | Yes | Inclusive start date of the period. The start date must be in the past year. |
endDate |
String | Yes | Exclusive end date of the period. The end date must be later than the start date. |
groupByPeriod |
String | Yes | Period by which to group the page views. Valid values are "month" and "day". |
filters |
Object | No | Field to specify which events to retrieve. |
pageId |
Array | No | Filter on page IDs. ft/home corresponds to the classic Homepage, ft/reader corresponds to the classic Reader page, etc. Designed pages have a random ID which can be found in the URL of the page in the Fluid Topics Designer. The ID is also accessible by using the Page views web service without filters. |
language |
String | No | Filter on the UI Locale (e.g., en-US or fr-FR ). |
authenticated |
Boolean | No | The type of session when viewing the page. Can be true for authenticated sessions or false for unauthenticated sessions. If undefined, the web service returns page views for both authenticated and unauthenticated users. |
Response body
The following lines show an example of the JSON response body:
{
"startDate": "2024-01-01",
"endDate": "2024-05-01",
"results": [
{
"page": {
"id": "ft/home",
"type": "homePage"
},
"periods": [
{
"periodStartDate": "2024-01-01",
"periodEndDate": "2024-02-01",
"count": 4
},
{
"periodStartDate": "2024-02-01",
"periodEndDate": "2024-03-01",
"count": 0
},
{
"periodStartDate": "2024-03-01",
"periodEndDate": "2024-04-01",
"count": 0
},
{
"periodStartDate": "2024-04-01",
"periodEndDate": "2024-05-01",
"count": 0
}
]
},
{
"page": {
"id": "ft/search",
"type": "searchPage"
},
"periods": [
{
"periodStartDate": "2024-01-01",
"periodEndDate": "2024-02-01",
"count": 813
},
{
"periodStartDate": "2024-02-01",
"periodEndDate": "2024-03-01",
"count": 654
},
{
"periodStartDate": "2024-03-01",
"periodEndDate": "2024-04-01",
"count": 64
},
{
"periodStartDate": "2024-04-01",
"periodEndDate": "2024-05-01",
"count": 0
}
]
},
{
"page": {
"id": "ft/reader",
"type": "readerPage"
},
"periods": [
{
"periodStartDate": "2024-01-01",
"periodEndDate": "2024-02-01",
"count": 2869
},
{
"periodStartDate": "2024-02-01",
"periodEndDate": "2024-03-01",
"count": 1974
},
{
"periodStartDate": "2024-03-01",
"periodEndDate": "2024-04-01",
"count": 234
},
{
"periodStartDate": "2024-04-01",
"periodEndDate": "2024-05-01",
"count": 88
}
]
},
{
"page": {
"id": "default",
"type": "designedSearchPage",
"name": "Default search"
},
"periods": [
{
"periodStartDate": "2024-01-01",
"periodEndDate": "2024-02-01",
"count": 49
},
{
"periodStartDate": "2024-02-01",
"periodEndDate": "2024-03-01",
"count": 379
},
{
"periodStartDate": "2024-03-01",
"periodEndDate": "2024-04-01",
"count": 1650
},
{
"periodStartDate": "2024-04-01",
"periodEndDate": "2024-05-01",
"count": 1984
}
]
},
{
"page": {
"id": "ft/viewer",
"type": "viewerPage"
},
"periods": [
{
"periodStartDate": "2024-01-01",
"periodEndDate": "2024-02-01",
"count": 20
},
{
"periodStartDate": "2024-02-01",
"periodEndDate": "2024-03-01",
"count": 12
},
{
"periodStartDate": "2024-03-01",
"periodEndDate": "2024-04-01",
"count": 5
},
{
"periodStartDate": "2024-04-01",
"periodEndDate": "2024-05-01",
"count": 37
}
]
}
]
}
Field Name | Type | Description |
---|---|---|
startDate |
String | Inclusive start date of the total period as defined in the request. |
endDate |
String | Exclusive end date of the total period as defined in the request. |
results |
Array | An array containing the results. |
periods |
Array | An array containing the periods. |
periodStartDate |
String | Inclusive start date of the period by which results are grouped. |
periodEndDate |
String | Exclusive end date of the period by which results are grouped. |
Return code | Description |
---|---|
200 OK |
Returns data in JSON format. |