Object endpoints
The metrics API replicates the behavior of the analysis context in Contentsquare. To get a metric, you can filter by device, segment etc. Plus, for page groups and zones metrics, you will have to define for which page group or zones you want data. To help you, we provide an API that retrieves these objects: segments, page groups etc.
Segments
Section titled SegmentsGET /v1/segments
Get the list of all segments for a project. More information regarding segments in Contentsquare ↗
Query parameters
-
projectId integer
Required only for an account-level API key. The target project.
-
ids string
Filter the results and get a list of segments that matches the ids provided.
Multiple IDs should be separated by a comma.
Example of response
Goals
Section titled GoalsGET /v1/goals
Get the list of all goals for a project. More information regarding goals in Contentsquare ↗
Query parameters
-
projectId integer
Required only for an account-level API key. The target project.
Example of response
Mappings
Section titled MappingsGET /v1/mappings
Get the list of all mappings for a project. More information regarding mappings in Contentsquare ↗
Query parameters
-
projectId integer
Required only for an account-level API key. The target project.
-
ids string
Filter the results and get a list of segments that matches the ids provided.
Multiple IDs should be separated by a comma.
Example of response
GET /v1/mappings/{mappingId}
Get information for a specific mapping More information regarding mappings in Contentsquare ↗
Query parameters
-
projectId integer
Required only for an account-level API key. The target project.
Path parameters
-
mappingId integer Required
The Mapping ID.
Example of response
Page Groups
Section titled Page GroupsGET /v1/mappings/{mappingId}/page-groups
Get all the page groups for a specific mapping More information regarding mappings and page groups in Contentsquare ↗
Query parameters
-
projectId integer
Required only for an account-level API key. The target project.
Path parameters
-
mappingId integer Required
The Mapping ID.
Example of response
GET /v1/page-groups/{pageGroupId}
Get information about a page and all the related mappings More information regarding page groups in Contentsquare ↗
Query parameters
-
projectId integer
Required only for an account-level API key. The target project.
Path parameters
-
pageGroupId integer Required
The Page Group ID.
Example of response
Zonings
Section titled ZoningsGET /v1/page-groups/{pageGroupId}/zonings
Get all the zonings for a page group More information regarding zonings in Contentsquare ↗
Query parameters
-
projectId integer
Required only for an account-level API key. The target project.
Path parameters
-
pageGroupId integer Required
The Page Group ID.
Example of response
Zones
Section titled ZonesGET /v1/zonings/{zoningId}/zones
Get all the zones for a zoning More information regarding zonings in Contentsquare ↗
Query parameters
-
projectId integer
Required only for an account-level API key. The target project.
Path parameters
-
zoningId integer Required
The Zoning ID.