DefensX icon

DefensX

Call DefensX Partner API endpoints.

Actions47

Usage → Get the calculated usage of customers

AI-generated

Summary

Retrieves calculated usage data for customers within a specified date range.

Inputs

  • Customer ID — Filter usage report to a specific customer ID; omit to return data for all customer subscriptions.
  • From (required) — Start date for the usage range (format YYYY-MM-DD or ISO 8601).
  • To — End date for the usage range (defaults to current time if omitted).
  • Return All — Automatically fetch all pages of results.
  • Max Results — Limit the total number of items returned (0 means no limit).
  • Page Size — Number of records to return per page (default: 1000).
  • Output Mode — If set to 'items', returns one n8n item per element; if set to 'raw', returns the full response in a single item.

Output shape

A list of items, each representing usage data (typically grouped by subscription).

The API supports a maximum date range of 6 months. If the range exceeds this limit, an error will be returned.

Examples

Example 1: Fetch usage for all customers from January 1, 2024 to January 31, 2024.

From: 2024-01-01, To: 2024-01-31, Return All: true

Example 2: Retrieve usage for a specific customer from the start of the current month to today.

Customer ID: [selected ID], Return All: true, Output Mode: items

Example 3: Limit results to the top 5000 usage records for a customer within a 30-day window.

Customer ID: [selected ID], From: [date], Max Results: 5000

Links

Discussion