Contentsquare icon

Contentsquare

Use the Contentsquare API

Actions76

Overview

This node integrates with the Contentsquare API, specifically supporting multiple resources including the Speed Analysis API. For the Speed Analysis API resource and the List Monitorings operation, it retrieves a list of monitoring configurations related to website speed analysis. This is useful for users who want to programmatically access monitoring data to track web page performance, detect slowdowns, and benchmark against competitors.

Typical use cases include:

  • Automating retrieval of speed monitoring configurations for reporting or alerting.
  • Integrating speed monitoring data into dashboards or other analytics tools.
  • Periodically fetching monitoring lists to check which monitors are active or need attention.

Properties

Name Meaning
Query Parameters A collection of optional filters and parameters to refine the monitoring list request. Options include:
- Device: Filter by device type (All, Desktop, Mobile, Tablet)
- End Date: End date of analysis range
- Format: Start date of query range
- Frequency: Export frequency filter
- From: Export format filter
- Goal ID: Conversion metrics for non-ecommerce goal
- IDs: Comma-separated segment IDs filter
- Limit: Max number of results (default 50)
- Metric Type: Quantile or Average
- Order: Ascending or Descending
- Page: Page number of results
- Period: Granularity (Daily or None)
- Project ID: Target project (required for account-level API key)
- Quantile: Percentile for quantile metric type (default 75)
- Scope: Scope filter
- Segment IDs: Multiple segments separated by commas
- Start Date: Start date of analysis range
- State: Status filter
- To: End date of query range
Request Body JSON object for the request body payload. Used for operations that require POST data. For List Monitorings operation, this can be an empty object {} or customized as needed.

Output

The output is a JSON array where each item corresponds to an element from the list of monitorings returned by the API. The exact structure depends on the API response but typically includes details about each monitoring configuration such as IDs, names, status, and other metadata relevant to speed analysis monitoring.

If the API returns binary data (not typical for this operation), it would represent raw files or reports related to speed analysis, but this operation primarily returns JSON data.

Dependencies

  • Requires an API authentication token obtained via OAuth2 client credentials flow using a Client ID and Client Secret.
  • Needs a valid project ID and appropriate API scope configured in the credentials.
  • The node makes HTTP requests to the Contentsquare API endpoint, which is dynamically retrieved during authentication.
  • Proper n8n credential setup for the Contentsquare API is necessary.

Troubleshooting

  • Missing Client ID or Client Secret: The node will throw an error if these credentials are not provided. Ensure they are correctly set in the credentials configuration.
  • Failed to retrieve access token or endpoint: Indicates issues with authentication; verify credentials and network connectivity.
  • Required parameter missing errors: For some operations, specific IDs or parameters are mandatory. For example, if a required parameter like "Job ID" or "Page Group ID" is missing, the node throws an error. For List Monitorings, ensure any required filters or project IDs are correctly set if applicable.
  • API call errors: If the API returns an error, the node wraps it with a message indicating failure calling the Contentsquare API. Check the error message and stack trace for details.
  • Empty or unexpected responses: If the API returns no content or unexpected data, verify the query parameters and request body correctness.

Links and References


This summary focuses on the static code analysis of the execute() method for the Speed Analysis API's List Monitorings operation, describing its inputs, outputs, dependencies, and common troubleshooting points.

Discussion