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 - Delete Event operation, it allows users to delete a specific event from the speed analysis data. This is useful for managing and cleaning up events that are no longer relevant or were created by mistake.

Typical use cases include:

  • Removing obsolete or incorrect performance monitoring events.
  • Managing event data to keep reports and analyses accurate.
  • Automating cleanup of speed analysis events as part of a larger workflow.

Example: A user might automate deletion of outdated speed test events after a certain period or after a new test run to maintain clean data sets.

Properties

Name Meaning
Query Parameters Collection of optional filters and parameters to refine the request. Includes options such as Device (All, Desktop, Mobile, Tablet), date ranges (Start Date, End Date), Format, Frequency, Limit, Metric Type, Order, Page, etc.
Request Body JSON object containing the details required by the API to perform the delete event operation. The exact structure depends on the API specification for deleting an event.

Details on "Query Parameters" options (for context, though not all may apply to Delete Event):

  • Device: Filter by device type (All, Desktop, Mobile, Tablet).
  • End Date / Start Date / To / From: Date range filters.
  • Format, Frequency, Scope, State: Various filtering options.
  • Goal ID, IDs, Segment IDs, Project ID: Identifiers for goals, segments, projects.
  • Limit, Page, Order: Pagination and sorting controls.
  • Metric Type: Quantile or Average.
  • Period: Granularity of results (Daily or None).
  • Quantile: Percentile value if metric type is quantile.

Note: For the Delete Event operation, the main input is likely the Request Body specifying which event to delete; query parameters may be less relevant but are available as per the generic property definition.

Output

The output is the JSON response returned by the Contentsquare API after attempting to delete the event. It typically contains confirmation of the deleted event or status information.

  • If the API returns a JSON string, it is parsed and returned as JSON.
  • If the response is empty or a 204 No Content status, the node outputs a simple status message indicating no content.
  • The output does not include binary data.

Example output JSON might look like:

{
  "eventId": 12345,
  "status": "deleted",
  "message": "Event successfully deleted"
}

Dependencies

  • Requires an API key credential with Client ID, Client Secret, Project ID, and scope configured in n8n credentials.
  • Uses OAuth2 client credentials flow to obtain an access token before making API requests.
  • Makes HTTP requests to the Contentsquare API endpoint.
  • Requires network access to https://api.contentsquare.com.

Troubleshooting

  • Missing Client ID or Client Secret: The node will throw an error if these credentials are not provided. Ensure credentials are correctly set up.
  • Failed to retrieve access token or endpoint: Indicates issues with authentication or API configuration. Verify credentials and API availability.
  • Required parameters missing: For some operations, required IDs (e.g., Job ID, Zone ID) must be provided; otherwise, the node throws an error.
  • API errors: Any error returned by the API is wrapped and reported with the message "Error calling Contentsquare API" along with the original error message and stack trace.
  • Invalid JSON in Request Body: Ensure the JSON input for the request body is valid and matches the API's expected schema.

Links and References


This summary focuses on the "Speed Analysis API" resource and the "Delete Event" operation as requested, based on static analysis of the provided source code and properties.

Discussion