Analytics

Get print spending split into filament, electricity and maintenance, grouped by material type and brand, with the cost of failed prints.

Covers the authenticated user's own prints only. Every analytics endpoint takes the same filter: a half-open fromDate/toDate range (omit both for all time), an IANA timeZone for bucketing (default UTC), optional printerIds, filamentIds, projectIds and statuses, a granularity (Auto, Day, Week or Month) and comparePrevious to add the preceding window of the same length. Ids the caller does not own match nothing.

get/api/Analytics/costs

Request

  • Base URL: https://api.3dprintlog.com
  • URL: https://api.3dprintlog.com/api/Analytics/costs
  • Auth: one of:
    • OAuth 2 (authorization code, authorization URL https://3dprintlog.auth0.com/authorize, token URL https://3dprintlog.auth0.com/oauth/token)
    • API key in header X-Api-Key
    • API key in query parameter api_key

Query parameters

FromDatestring date-time
ToDatestring date-time
TimeZonestring
PrinterIdsinteger[]
FilamentIdsstring[]
ProjectIdsstring[]
StatusesPrintLogApiModelsPrintPrintStatus[]
Granularity0 | 1 | 2 | 3

Sent as an integer: 0 = Auto, 1 = Day, 2 = Week, 3 = Month.

ComparePreviousboolean
HasRangeboolean

True when both ends of the range are set. The attribute is what lets callers write filter.FromDate.Value after gating on this — without it the compiler cannot see that a property getter implies anything about two other properties, and every such dereference raises CS8629.

Response

Cost totals, groups and series for the filtered window.

fromstring date-time nullable
tostring date-time nullable
timeZonestring nullable
granularitystring nullable
currencystring nullable
costOfFailureSharePercentnumber double nullable

Changes

No recorded changes to this operation across all 1 revision of this API.