curl --request GET \
--url https://api.muveya.com/v1/analytics/consumption-trend \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.muveya.com/v1/analytics/consumption-trend', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.muveya.com/v1/analytics/consumption-trend"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"metric": "<string>",
"definition": "<string>",
"granularity": "day",
"period": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z"
},
"movementCount": 123,
"timezone": "<string>",
"asOf": "2023-11-07T05:31:56Z",
"freshness": "live",
"evidenceId": "<string>",
"truncated": true,
"filters": {},
"coverage": {
"measuredMovementCount": 123,
"unverifiedMovementCount": 123,
"warehouseScope": "all",
"coveredFrom": "2023-11-07T05:31:56Z"
},
"series": [
{
"seriesKey": "<string>",
"catalogItemId": "<string>",
"unitOfMeasure": "<string>",
"totalConsumed": 123,
"usedQuantity": 123,
"issuedQuantity": 123,
"movementCount": 123,
"buckets": [
{
"bucketStart": "2023-11-07T05:31:56Z",
"consumedQuantity": 123,
"usedQuantity": 123,
"issuedQuantity": 123,
"movementCount": 123
}
],
"itemName": "<string>",
"sku": "<string>"
}
],
"unverifiedItems": [
{
"catalogItemId": "<string>",
"movementCount": 123,
"itemName": "<string>",
"sku": "<string>"
}
],
"narration": {
"evidenceId": "<string>",
"period": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z"
},
"acknowledgesTruncation": true,
"acknowledgesUnverified": true,
"acknowledgesRestrictedScope": true,
"claims": [
{
"kind": "series",
"seriesKey": "<string>",
"field": "totalConsumed",
"value": 123,
"unit": "<string>"
}
]
}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"requestId": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"requestId": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"requestId": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"requestId": "<string>"
}Get consumption per supply
Reads consumption per supply in its own unit, bucketed by UTC day or week from the immutable stock ledger, as an evidence contract. Requires analytics:read. Quantities of different supplies or units are never added together; coverage reports movements without a verified unit, a restricted warehouse scope and the covered window when the scan is truncated. A narration is included only when it passes the deterministic numeric-faithfulness check. Quantities only. The window defaults to the last 30 days ending now; a malformed, backwards, or too-wide window is a 400. Deterministic; computed live over the workspace data.
curl --request GET \
--url https://api.muveya.com/v1/analytics/consumption-trend \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.muveya.com/v1/analytics/consumption-trend', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.muveya.com/v1/analytics/consumption-trend"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"metric": "<string>",
"definition": "<string>",
"granularity": "day",
"period": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z"
},
"movementCount": 123,
"timezone": "<string>",
"asOf": "2023-11-07T05:31:56Z",
"freshness": "live",
"evidenceId": "<string>",
"truncated": true,
"filters": {},
"coverage": {
"measuredMovementCount": 123,
"unverifiedMovementCount": 123,
"warehouseScope": "all",
"coveredFrom": "2023-11-07T05:31:56Z"
},
"series": [
{
"seriesKey": "<string>",
"catalogItemId": "<string>",
"unitOfMeasure": "<string>",
"totalConsumed": 123,
"usedQuantity": 123,
"issuedQuantity": 123,
"movementCount": 123,
"buckets": [
{
"bucketStart": "2023-11-07T05:31:56Z",
"consumedQuantity": 123,
"usedQuantity": 123,
"issuedQuantity": 123,
"movementCount": 123
}
],
"itemName": "<string>",
"sku": "<string>"
}
],
"unverifiedItems": [
{
"catalogItemId": "<string>",
"movementCount": 123,
"itemName": "<string>",
"sku": "<string>"
}
],
"narration": {
"evidenceId": "<string>",
"period": {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z"
},
"acknowledgesTruncation": true,
"acknowledgesUnverified": true,
"acknowledgesRestrictedScope": true,
"claims": [
{
"kind": "series",
"seriesKey": "<string>",
"field": "totalConsumed",
"value": 123,
"unit": "<string>"
}
]
}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"requestId": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"requestId": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"requestId": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"requestId": "<string>"
}Authorizations
Opaque mvy_test_ API key sent as a Bearer token. It derives exactly one workspace server-side; the path never carries a workspace selector.
Query Parameters
Inclusive ISO-8601 start of the window (defaults to 30 days before to).
Exclusive ISO-8601 end of the window (defaults to now).
Bucket size; defaults to day.
day, week Narrows the trend to one catalog item.
Response
The consumption trend.
The human-readable definition of the metric.
day, week Show child attributes
Show child attributes
Every consumption movement read, measured or not.
live True when the ledger scan hit its cap; it reads newest first, so coverage.coveredFrom says where the figures start.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The claims a summary may state, each equal to the evidence in its own unit. Included only when it passes the deterministic numeric-faithfulness check.
Show child attributes
Show child attributes