Contentsquare icon

Contentsquare

Use the Contentsquare API

Actions76

Overview

This node integrates with the Contentsquare API, specifically supporting multiple resources including the Data Export API. The "Get Job Run" operation under the Data Export API resource allows users to retrieve detailed information about a specific run of an export job by providing both the Job ID and the Run ID.

Typical use cases include:

  • Monitoring the status and details of a particular data export job run.
  • Fetching results or metadata related to a specific execution instance of an export job.
  • Automating workflows that depend on the completion or outcome of export jobs in Contentsquare.

For example, a user might want to programmatically check if a data export job run has completed successfully and then trigger downstream processing of the exported data.

Properties

Name Meaning
Job ID Numeric identifier of the export job. Required to specify which job's run to retrieve.
Run ID Numeric identifier of the specific run of the export job. Required to identify the exact run.
Query Parameters Optional collection of filters and parameters to refine the request. Includes options like:
- Device (All, Desktop, Mobile, Tablet)
- End Date (string date)
- Format (string)
- Frequency (string)
- From (string)
- Goal ID (number)
- IDs (string, comma-separated)
- Limit (number, max results to return)
- Metric Type (Quantile, Average)
- Order (Ascending, Descending)
- Page (number)
- Period (Daily, None)
- Project ID (number)
- Quantile (number, percentile for quantile metrics)
- Scope (string)
- Segment IDs (number)
- Start Date (string date)
- State (string)
- To (string date)

These query parameters allow fine-tuning of the data returned by the API call.

Output

The output is a JSON array where each element corresponds to the response from the Contentsquare API for the requested job run. The structure depends on the API response but typically includes:

  • Details about the job run such as status, timestamps, and any associated metadata.
  • Data exported or summary statistics related to that run.

If the API returns no content, the node outputs a status code message indicating "204 No Content".

No binary data output is indicated for this operation.

Dependencies

  • Requires an API authentication token obtained via OAuth2 client credentials flow using:

    • Client ID
    • Client Secret
    • Project ID (optional depending on scope)
    • Scope string
  • The node makes HTTP requests to the Contentsquare API endpoint, which is dynamically retrieved during authentication.

  • Proper credentials must be configured in n8n to enable access.

Troubleshooting

  • Missing Credentials: Errors will occur if Client ID or Client Secret are not provided. Ensure these are set correctly in the node credentials.
  • Required Parameters Missing: For this operation, both Job ID and Run ID must be provided; otherwise, the node throws an error indicating the missing parameter.
  • API Token Retrieval Failure: If the OAuth token cannot be obtained, the node will throw an error. Verify credentials and network connectivity.
  • Invalid Parameter Values: Passing empty or invalid values for required parameters will cause errors.
  • Unexpected API Response: If the API returns a non-JSON response or an error, the node attempts to parse it; if parsing fails, raw text or error messages are returned.
  • Rate Limits or API Errors: Standard API error handling applies; check API limits and error messages for guidance.

Links and References

Discussion