Read one of a workspace's metrics over time
Authenticate with an operator token or a signed-in Foliot Console session.
One metric from GET /metrics/catalog, for this workspace only, in step buckets (minute, hour or day, aligned in UTC) from from to to. A counter answers each bucket’s count with a running total, and each series’ total over the range; a live gauge answers its current value as one point. Minute buckets are kept 48 hours, hour buckets 30 days and day buckets 13 months: a range reaching further back is 400, and so is one holding more than 1440 buckets (ask for a coarser step). Housekeeping deletes the events of runs that finished more than FOLIOT_RETENTION_DAYS ago, so a metric that counts events and was first counted after some of them were gone has no complete history before that point: a range starting earlier is 400, and the message names the oldest complete bucket. Every number is computed from Foliot’s own tables, so it is the same whichever server answers. Housekeeping counts each metric about once a minute, and the answer’s to ends at the bucket counting has reached: a bucket not counted yet is left out, never shown as zero, and that bucket fills in as housekeeping catches up. A range starting after it, or any counted metric before housekeeping’s first pass, is 503: retry shortly. Any member of the workspace (viewer and up), or an operator token. A workspace the caller is not in answers 404, exactly as one that does not exist. A metric that is not in the workspace catalog answers 404. For a counted metric, app narrows to that app’s history in this workspace, which an app moved to another workspace keeps here; an app with none is an empty series, whether it never existed or is elsewhere. For a live gauge, an app this workspace does not hold now answers 404.
Path parameters
string (uuid)The workspace.
Query parameters
stringA name from GET /metrics/catalog.
max length 200
"minute" | "hour" | "day"The bucket size.
string (date-time)Inclusive; aligned down to the step.
string (date-time)Exclusive; aligned up to the step.
stringOnly this app's series. For a counted metric, its history in this workspace (empty if it has none here); for a live gauge, it must be in the workspace now, or the answer is 404.
max length 200
stringOnly this workflow's series.
max length 200