curl --request GET \
--url https://api.muveya.com/v1/analytics/metrics/{metric} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.muveya.com/v1/analytics/metrics/{metric}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.muveya.com/v1/analytics/metrics/{metric}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"metric": "LOW_STOCK",
"value": 123,
"unit": "<string>",
"timezone": "<string>",
"asOf": "2023-11-07T05:31:56Z",
"freshness": "live",
"evidenceId": "<string>",
"truncated": true,
"filters": {},
"definition": "<string>",
"numerator": 123,
"denominator": 123,
"sampleCount": 123,
"caveats": [
"<string>"
],
"currency": "<string>",
"period": {
"from": "<string>",
"to": "<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 an operational metric
Reads one allowlisted deterministic operational metric as an evidence contract (value, unit, asOf, filters), computed live over the workspace data. Requires analytics:read. An unknown metric name is a 400. Value metrics are redacted unless the key holds the value scope (none in v1).
curl --request GET \
--url https://api.muveya.com/v1/analytics/metrics/{metric} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.muveya.com/v1/analytics/metrics/{metric}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.muveya.com/v1/analytics/metrics/{metric}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"metric": "LOW_STOCK",
"value": 123,
"unit": "<string>",
"timezone": "<string>",
"asOf": "2023-11-07T05:31:56Z",
"freshness": "live",
"evidenceId": "<string>",
"truncated": true,
"filters": {},
"definition": "<string>",
"numerator": 123,
"denominator": 123,
"sampleCount": 123,
"caveats": [
"<string>"
],
"currency": "<string>",
"period": {
"from": "<string>",
"to": "<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.
Path Parameters
The allowlisted metric key.
LOW_STOCK, EXPIRING_STOCK, DELIVERY_EXCEPTIONS, RECEIPT_DISCREPANCIES, PENDING_ORDERS, BOX_TRACEABILITY, APPROVAL_DECISION_MEDIAN_HOURS, DISTINCT_CUSTODY_ACTORS Query Parameters
Narrows the stock metrics (LOW_STOCK, EXPIRING_STOCK) to one catalog item.
Inclusive ISO-8601 start of the window for APPROVAL_DECISION_MEDIAN_HOURS (by submission) and DISTINCT_CUSTODY_ACTORS (by receipt).
Exclusive ISO-8601 end of that window.
Response
The requested metric.
LOW_STOCK, EXPIRING_STOCK, DELIVERY_EXCEPTIONS, RECEIPT_DISCREPANCIES, PENDING_ORDERS, BOX_TRACEABILITY, APPROVAL_DECISION_MEDIAN_HOURS, DISTINCT_CUSTODY_ACTORS The figure; null when a percentage or median has no sample, never zero.
The value's unit: count, percent or hours.
When the metric was computed.
live A stable descriptor of the metric and its filters, for drill-down/citation.
True when a bounded scan hit its cap: the value is a lower bound.
Show child attributes
Show child attributes
What the figure measures, in words.
What a percentage counts.
What a percentage divides by.
How many observations the figure stands on.
Machine-readable limits of the figure, e.g. wall_clock_hours_no_business_calendar.
Show child attributes
Show child attributes