Contentsquare icon

Contentsquare

Use the Contentsquare API

Actions76

Overview

This node integrates with the Contentsquare API, specifically enabling users to create export jobs via the Data Export API. Creating an export job allows users to request data exports based on various filters and parameters, facilitating detailed analysis of user behavior and metrics collected by Contentsquare.

Common scenarios where this node is beneficial include:

  • Automating the creation of data export jobs for scheduled or ad-hoc reporting.
  • Extracting filtered datasets (e.g., by device type, date range, segments) for further processing or integration with other systems.
  • Initiating large data exports that can be processed asynchronously.

For example, a marketing analyst could use this node to create an export job that extracts conversion metrics for mobile devices over the last month, which can then be used in downstream analytics workflows.

Properties

Name Meaning
Query Parameters A collection of optional filters and settings to customize the export job query. Options include:
- Device: Filter by device type (All, Desktop, Mobile, Tablet).
- End Date: End of date range.
- Format: Export format.
- Frequency: Export frequency filter.
- From: Filter based on export format.
- Goal ID: Conversion metrics for a non-ecommerce goal.
- IDs: Comma-separated list of segment IDs.
- Limit: Max number of results (minimum 1, default 50).
- Metric Type: Quantile or Average.
- Order: Result order, Ascending or Descending.
- Page: Page number of results.
- Period: Granularity, Daily or None.
- Project ID: Target project ID (required for account-level API keys).
- Quantile: Percentile for quantile metric type (default 75).
- Scope: Scope filter.
- Segment IDs: Multiple segments separated by commas.
- Start Date: Start of date range.
- State: Status filter.
- To: End date of query range.
Request Body JSON object representing the body of the export job creation request. This allows specifying detailed export job configurations beyond query parameters. Defaults to an empty JSON object {}.

Output

The node outputs the response from the Contentsquare API as JSON. The structure depends on the API response for creating an export job, typically including details such as:

  • Export job ID
  • Status of the job creation request
  • Any metadata related to the export job

If the API returns a string response, the node attempts to parse it as JSON; otherwise, it outputs the raw text or a status code message if no content is returned.

The node does not output binary data.

Dependencies

  • Requires an API authentication token obtained via OAuth2 client credentials flow using a Client ID and Client Secret.
  • Needs a valid Contentsquare API endpoint URL provided by the authentication response.
  • Requires configuration of an API key credential containing at least Client ID, Client Secret, Project ID, and scope.
  • Makes HTTP requests to the Contentsquare API endpoints.

Troubleshooting

  • Missing Client ID or Client Secret: The node will throw an error if these credentials are not provided. Ensure your API credentials are correctly configured.
  • Failed to retrieve access token or endpoint: Indicates issues with authentication. Verify that the credentials are valid and have the necessary permissions.
  • Required parameters missing: For some operations, required parameters like Job ID or Run ID must be provided; otherwise, the node throws an error.
  • API errors: If the API returns an error, the node wraps it in a descriptive error message. Check the API response and ensure all parameters and request bodies are correct.
  • Invalid JSON in Request Body: Ensure the JSON provided in the Request Body property is well-formed.

Links and References

Discussion