Endpoint list

Here is a list of Publytics endpoints. All the queries here resemble the structure of the queries made with the dashboard interface, and they accept the same parameters.

Get Content Pages

GET /site/{siteId}/content

Retrieves the most read articles of a site.

Query parameters

Parameter Description Default Value
start The start date for data filtering. If not specified, the current date minus 7 days is used. Current date - 7 days
end The end date for data filtering. If not specified, the current date minus 1 day is used. Current date - 1 day
customCols A JSON array containing secondary dimensions to include in the data. If not specified, an empty array is used. Empty array
metricsCols A JSON array containing the metrics to include in the data. If an empty array is specified (or if the parameter is omitted), the standard set of metrics will be used. Empty array
dimensionsFilters A JSON array containing a nested structure of filters to filter the dimensions (equivalent of WHERE). If omitted, no filter will be applied. Empty array
metricsFilters A JSON array containing a nested structure of filters to filter the metrics (equivalent of HAVING). If omitted, no filter will be applied. Empty array
offset The offset for data pagination. If not specified, 1 is used (i.e. show first page of results). 1
sort The field to sort the data on. If not specified, the default column "views" is used. "views"
sortOrder The sorting order of the data. If not specified, "desc" (descending) is used. "desc"
compareStart The start date for date-based comparison. If not specified, null is used. null
compareEnd The end date for date-based comparison. If not specified, null is used. null
limit The limit of results to return. If not specified, 20 is used. The maximum allowed limit is 1000. 20
primaryPropFilter (deprecated) A JSON array containing filters to apply to the primary dimension. If not specified, an empty array is used. Empty array
customFilters (deprecated) A JSON array containing custom filters to apply to the data. If not specified, an empty array is used. Empty array
customPropFilter (deprecated) A JSON array containing custom filters to apply to the dimensions. If not specified, an empty array is used. Empty array

Get Entry/Exit Pages

GET /site/{siteId}/acquisition/entry & GET /site/{siteId}/acquisition/exit

Retrieves the entry/exit pages of a site.

Query parameters

Parameter Description Default Value
start The start date for data filtering. If not specified, the current date minus 7 days is used. Current date - 7 days
end The end date for data filtering. If not specified, the current date minus 1 day is used. Current date - 1 day
customCols A JSON array containing secondary dimensions to include in the data. If not specified, an empty array is used. Empty array
metricsCols A JSON array containing the metrics to include in the data. If an empty array is specified (or if the parameter is omitted), the standard set of metrics will be used. Empty array
dimensionsFilters A JSON array containing a nested structure of filters to filter the dimensions (equivalent of WHERE). If omitted, no filter will be applied. Empty array
metricsFilters A JSON array containing a nested structure of filters to filter the metrics (equivalent of HAVING). If omitted, no filter will be applied. Empty array
offset The offset for data pagination. If not specified, 1 is used (i.e. show first page of results). 1
sort The field to sort the data on. If not specified, the default column "entrances" (or "exits") is used. "entrances" / "exits"
sortOrder The sorting order of the data. If not specified, "desc" (descending) is used. "desc"
compareStart The start date for date-based comparison. If not specified, null is used. null
compareEnd The end date for date-based comparison. If not specified, null is used. null
limit The limit of results to return. If not specified, 20 is used. The maximum allowed limit is 1000. 20
primaryPropFilter (deprecated) A JSON array containing filters to apply to the primary dimension. If not specified, an empty array is used. Empty array
customFilters (deprecated) A JSON array containing custom filters to apply to the data. If not specified, an empty array is used. Empty array
customPropFilter (deprecated) A JSON array containing custom filters to apply to the dimensions. If not specified, an empty array is used. Empty array

Get Acquisition Pages (group by a specific dimension)

GET /site/{siteId}/acquisition/{dimension}

Retrieves the acquisition stats of a site grouped by a specific dimension.

Parameter Description

dimension (required) The dimension for which to retrieve the acquisitions.

The following dimensions are supported:

  • UTM Medium: "utm_medium"
  • UTM Source: "utm_source"
  • UTM Campaign: "utm_campaign"
  • UTM Content: "utm_content"
  • UTM Term: "utm_term"
  • Referrer: "referrer"
  • Referrer + Source: "referrer_source"

Query parameters

Parameter Description Default Value
start The start date for data filtering. If not specified, the current date minus 7 days is used. Current date - 7 days
end The end date for data filtering. If not specified, the current date minus 1 day is used. Current date - 1 day
customCols A JSON array containing secondary dimensions to include in the data. If not specified, an empty array is used. Empty array
metricsCols A JSON array containing the metrics to include in the data. If an empty array is specified (or if the parameter is omitted), the standard set of metrics will be used. Empty array
dimensionsFilters A JSON array containing a nested structure of filters to filter the dimensions (equivalent of WHERE). If omitted, no filter will be applied. Empty array
metricsFilters A JSON array containing a nested structure of filters to filter the metrics (equivalent of HAVING). If omitted, no filter will be applied. Empty array
offset The offset for data pagination. If not specified, 1 is used (i.e. show first page of results). 1
sort The field to sort the data on. If not specified, the default column "views" is used. "views"
sortOrder The sorting order of the data. If not specified, "desc" (descending) is used. "desc"
compareStart The start date for date-based comparison. If not specified, null is used. null
compareEnd The end date for date-based comparison. If not specified, null is used. null
limit The limit of results to return. If not specified, 20 is used. The maximum allowed limit is 1000. 20
primaryPropFilter (deprecated) A JSON array containing filters to apply to the primary dimension. If not specified, an empty array is used. Empty array
customFilters (deprecated) A JSON array containing custom filters to apply to the data. If not specified, an empty array is used. Empty array
customPropFilter (deprecated) A JSON array containing custom filters to apply to the dimensions. If not specified, an empty array is used. Empty array

Get Audience Overview: Users, Sessions, Pageviews and Bounce Rate

GET /site/{siteId}/visitors

Retrieves users, sessions, page views, bounce rate for the site in a specific period.

Query parameters

Parameter Description Default Value
start The start date for data filtering. If not specified, the current date minus 7 days is used. Current date - 7 days
end The end date for data filtering. If not specified, the current date minus 1 day is used. Current date - 1 day

Get Audience Stats (group by a specific dimensions)

GET /site/{siteId}/visitors/{dimension}

Retrieves the Audience stats of a site grouped by a specific dimension.

Parameter Description

dimension (required) The primary dimension for which to retrieve the acquisitions.

The following dimensions are supported:

  • Device: "device"
  • Country: "country"
  • Operating system: "operating_system"
  • Browser: "browser"
  • Hostname: "hostname"

Query parameters

Parameter Description Default Value
start The start date for data filtering. If not specified, the current date minus 7 days is used. Current date - 7 days
end The end date for data filtering. If not specified, the current date minus 1 day is used. Current date - 1 day
customCols A JSON array containing secondary dimensions to include in the data. If not specified, an empty array is used. Empty array
metricsCols A JSON array containing the metrics to include in the data. If an empty array is specified (or if the parameter is omitted), the standard set of metrics will be used. Empty array
dimensionsFilters A JSON array containing a nested structure of filters to filter the dimensions (equivalent of WHERE). If omitted, no filter will be applied. Empty array
metricsFilters A JSON array containing a nested structure of filters to filter the metrics (equivalent of HAVING). If omitted, no filter will be applied. Empty array
offset The offset for data pagination. If not specified, 1 is used (i.e. show first page of results). 1
sort The field to sort the data on. If not specified, the default column "views" is used. "views"
sortOrder The sorting order of the data. If not specified, "desc" (descending) is used. "desc"
compareStart The start date for date-based comparison. If not specified, null is used. null
compareEnd The end date for date-based comparison. If not specified, null is used. null
limit The limit of results to return. If not specified, 20 is used. The maximum allowed limit is 1000. 20
primaryPropFilter (deprecated) A JSON array containing filters to apply to the primary dimension. If not specified, an empty array is used. Empty array
customFilters (deprecated) A JSON array containing custom filters to apply to the data. If not specified, an empty array is used. Empty array
customPropFilter (deprecated) A JSON array containing custom filters to apply to the dimensions. If not specified, an empty array is used. Empty array

Get Events Report

GET /site/{siteId}/events

Retrieves the events of a site.

Query parameters

Parameter Description Default Value
start The start date for data filtering. If not specified, the current date minus 7 days is used. Current date - 7 days
end The end date for data filtering. If not specified, the current date minus 1 day is used. Current date - 1 day
primaryProp The primary dimension to use for grouping the data. If not specified, the default dimension "pathname" is used. "pathname"
customCols A JSON array containing secondary dimensions to include in the data. If not specified, an empty array is used. Empty array
metricsCols A JSON array containing the metrics to include in the data. If an empty array is specified (or if the parameter is omitted), the standard set of metrics will be used. Empty array
dimensionsFilters A JSON array containing a nested structure of filters to filter the dimensions (equivalent of WHERE). If omitted, no filter will be applied. Empty array
metricsFilters A JSON array containing a nested structure of filters to filter the metrics (equivalent of HAVING). If omitted, no filter will be applied. Empty array
offset The offset for data pagination. If not specified, 1 is used (i.e. show first page of results). 1
sort The field to sort the data on. If not specified, the default column "views" is used. "views"
sortOrder The sorting order of the data. If not specified, "desc" (descending) is used. "desc"
compareStart The start date for date-based comparison. If not specified, null is used. null
compareEnd The end date for date-based comparison. If not specified, null is used. null
limit The limit of results to return. If not specified, 20 is used. The maximum allowed limit is 1000. 20
primaryPropFilter (deprecated) A JSON array containing filters to apply to the primary dimension. If not specified, an empty array is used. Empty array
customFilters (deprecated) A JSON array containing custom filters to apply to the data. If not specified, an empty array is used. Empty array
customPropFilter (deprecated) A JSON array containing custom filters to apply to the dimensions. If not specified, an empty array is used. Empty array