/v1/reports/usage-by-user
Usage by user report
Each person's and API key's filament use, and what to bill them A print counts for whoever queued its job: a person or an API key. Prints whose job has no creator recorded are counted under `unattributedGrams` and `unattributedPrints`, and never billed to anyone. `from` and `to` are inclusive days in the store's timezone, matched against when each print ended. Each job line is what one print drew from one spool or color (grams from the stock ledger, so this needs the filament-inventory add-on). `rate` picks what a line bills: `cost` at the spool's price, else the color's, else the material's; `billable` at the material's billable rate in effect when the print ended. A line with no rate (or, at cost, no price) has a null `billCents`, is counted in `unratedGrams`, and adds nothing to the bill. Grams are rounded to the tenth and money to the cent on each line, and every total is the sum of its lines. `actors` lists everyone with usage in the range and printers, whatever `actorIds` selects, for a picker.
Query Parameters
Response Schema
Example Response
{
"from": "string",
"to": "string",
"timezone": "string",
"rate": "cost",
"summary": {
"billCents": 1,
"costCents": 1,
"grams": 1,
"prints": 1,
"users": 1,
"unratedGrams": 1,
"unattributedGrams": 1,
"unattributedPrints": 1,
"unattributedCostCents": 1
},
"users": [
{
"prints": 1,
"grams": 1,
"costCents": 1,
"billCents": 1,
"unratedGrams": 1,
"jobs": [
{
"at": "2025-01-15T12:00:00.000Z",
"printHistoryId": "string",
"printJobId": "string",
"label": "string",
"materialId": "string",
"materialLabel": "string",
"color": "string",
"spoolId": "string",
"spoolCode": "string",
"spoolDeleted": true,
"grams": 1,
"costCents": 1,
"ratePer1000g": 1,
"billCents": 1
}
],
"actorId": "string",
"label": "string",
"name": "string",
"type": "string"
}
],
"actors": [
{
"actorId": "string",
"label": "string",
"name": "string",
"type": "string"
}
],
"unattributedJobs": [
{
"at": "2025-01-15T12:00:00.000Z",
"printHistoryId": "string",
"printJobId": "string",
"label": "string",
"materialId": "string",
"materialLabel": "string",
"color": "string",
"spoolId": "string",
"spoolCode": "string",
"spoolDeleted": true,
"grams": 1,
"costCents": 1,
"ratePer1000g": 1,
"billCents": 1
}
]
}