Organization change line aggregate
GET /organization/{orgId}/aggregates/change-lines
Sum an organization's issued change order money by budget, origin and reason
Authorization
bearer In: header
Path Parameters
Query Parameters
Which lines to count. Only all: every line of money on an issued change order or cash allowance. Default all.
"all""all"Budget kind: a comma list; write a comma or a backslash inside a value as , or \. The budgetKind dimension in the list. Values: contractOverage, contingency, allowance.
length <= 500Initiated by: a comma list; write a comma or a backslash inside a value as , or \. The origin dimension in the list. Values: PC, CD, SI.
length <= 500Change type: a comma list; write a comma or a backslash inside a value as , or \. CO or CA. Values: CO, CA.
length <= 500Project: a comma list; write a comma or a backslash inside a value as , or \. project_id in the list.
length <= 500The first breakdown. One row per value, in the dimension's order.
"budgetKind" | "budget" | "origin" | "reason" | "changeType" | "project"A second breakdown inside each group (a stacked bar). At most two of group, split and bucketDate.
"budgetKind" | "budget" | "origin" | "reason" | "changeType" | "project"A flow, for a Sankey (P3-8551): 2 to 4 single-valued dimensions, comma separated, in stage order. The response carries flow (stages, nodes, links) and an empty rows. Not with group, split, bucketDate or order. Measures must add up (count, sum). top caps each stage with no fixed values (default 8). A row with no value at a stage leaves the flow there; includeNull makes that a None node instead.
^[A-Za-z]+(,[A-Za-z]+)*$length <= 200A time axis: which date to bucket on (issuedAt). Every bucket in the window is returned, empty ones included. No bucket runs past today.
"issuedAt"Bucket size. Most buckets per request: day 365, week 52, month 24, quarter 12.
"month""day" | "week" | "month" | "quarter"First day of the time axis, YYYY-MM-DD, in the response's zone. With bucketDate only. Default: 12 buckets ending with the current one; for dueDate, 12 buckets starting 3 before the current one.
dateLast day of the time axis, inclusive. With bucketDate only. Clamped to today for every date but dueDate.
dateAdds a "No date" bucket or a "None" group for rows without a value (for budgetKind and budget, "Budget not recorded"; for origin, "No initiating document").
false1 to 4 measure tokens, comma separated, as fn[.field][:population]: count, countDistinct.document, sum.amount. A :population narrows that measure only.
"count"^[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)?(:[a-zA-Z]+)?(,[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)?(:[a-zA-Z]+)?){0,3}$length <= 200The group's order; needs group. Default: fixed where the dimension has a natural order (stage, due window), else value, largest first.
"value" | "label" | "fixed"Keep the N largest groups by the first measure. Without top, a group with no fixed set of values (budget, reason, project) keeps as many as fit the cell limit, at most 50, plus "Other". A top whose grid would pass the cell limit is a 400.
1 <= value <= 50Fold the values cut by top, or by the default cap, into one "Other" value, so the totals still add up.
trueHow each figure moved against an earlier period (P3-9085): sets the request's window (its time axis, or its one date filter with a from day; a from day alone ends today) against an earlier one, and the answer is in comparison. previous: the same number of days, ending the day before the window. week, month, quarter, year: the same days one step earlier (a whole month moves back as a whole month); a median, average, percentile or share over this week, month, quarter or year so far compares with the whole one before. A level.* measure on a time axis compares its value at each end. Refused (400): with since; with path; with no window, two windows, or one that ends after today; with includeNull on a time axis; a step shorter than the window (the periods would overlap: use previous); any measure that cannot take it (definition.measures[].compares says which can). Never run two requests and subtract.
"previous" | "week" | "month" | "quarter" | "year"How each figure moved since the start of this day, YYYY-MM-DD (P3-9085); the figure itself is unchanged and the answer is in comparison. A count or sum: its rows dated before the day (a row with no date counts as before) against today's figure, on the population's date (returned: returnedAt) or sinceDate. A count or sum of open or overdue work: the count as it stood at the end of the day before, rebuilt from each document's dates as they are now. A median or share takes compare instead. Refused (400): with compare, bucketDate or path; a count or sum with no date to count from (name sinceDate); open or overdue work with a filter that reads today's value (status, reviewStatus, assigneeId, dueDate), an axis that reads today's value and leaves documents out (ballInCourt, party, holderWhenLate, onTime, changeStage; reviewStatus, assignee or overdueAge without includeNull=true; any of them with top and other=false), or at org scope; any measure that cannot take it.
dateWith since only: the date a count or sum is counted from, when its population, its measure and the date filters name none (all documents filtered by status, say). A date a row can have by today.
"issuedAt"Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://api.part3.io/v1/organization/string/aggregates/change-lines"{
"entity": "documents",
"scope": {
"orgId": "string",
"projectId": "string",
"projects": 0,
"tz": "string"
},
"request": "string",
"definition": {
"rowUnit": "documents",
"population": {
"name": "string",
"label": "string",
"rule": "string"
},
"versions": "latest",
"drafts": "exclude",
"filters": [
{
"field": "string",
"label": "string",
"op": "in",
"values": [
"string"
]
}
],
"group": {
"name": "string",
"label": "string",
"multiplicity": "one"
},
"split": {
"name": "string",
"label": "string",
"multiplicity": "one"
},
"bucket": {
"date": "string",
"label": "string",
"interval": "day",
"from": "2019-08-24",
"to": "2019-08-24"
},
"path": [
{
"name": "string",
"label": "string"
}
],
"measures": [
{
"token": "string",
"label": "string",
"unit": "documents",
"rule": "string",
"compares": {
"kind": "total",
"steps": [
"previous"
],
"since": true,
"sinceDate": "string",
"why": "string"
}
}
],
"text": "string"
},
"axes": {
"group": [
{
"key": "string",
"label": "string"
}
],
"split": [
{
"key": "string",
"label": "string"
}
],
"bucket": [
{
"key": "string",
"label": "string",
"start": "2019-08-24",
"end": "2019-08-24"
}
]
},
"rows": [
{
"group": "string",
"split": "string",
"bucket": "string",
"values": {
"property1": 0,
"property2": 0
},
"n": {
"property1": 0,
"property2": 0
}
}
],
"flow": {
"stages": [
{
"dimension": "string",
"label": "string",
"values": [
{
"key": "string",
"label": "string"
}
]
}
],
"nodes": [
{
"stage": 0,
"key": "string",
"values": {
"property1": 0,
"property2": 0
},
"n": {
"property1": 0,
"property2": 0
}
}
],
"links": [
{
"from": {
"stage": 0,
"key": "string"
},
"to": {
"stage": 0,
"key": "string"
},
"values": {
"property1": 0,
"property2": 0
},
"n": {
"property1": 0,
"property2": 0
}
}
]
},
"totals": {
"values": {
"property1": 0,
"property2": 0
},
"n": {
"property1": 0,
"property2": 0
},
"distinct": 0
},
"truncated": true,
"comparison": {
"asked": {
"compare": "previous",
"since": "2019-08-24",
"sinceDate": "string"
},
"figures": [
{
"measure": "string",
"kind": "total",
"basis": "daysBefore",
"date": "string",
"current": {
"from": "2019-08-24",
"to": "2019-08-24",
"value": 0,
"n": 0
},
"earlier": {
"from": "2019-08-24",
"to": "2019-08-24",
"value": 0,
"n": 0
},
"change": 0,
"changePercent": 0,
"direction": "up",
"reads": "better",
"reason": "noRows",
"text": "string"
}
]
},
"generatedAt": "2019-08-24T14:15:22Z"
}{
"error": "Insufficient permissions"
}{
"error": "Insufficient permissions"
}{
"error": "Insufficient permissions"
}{
"error": "Insufficient permissions"
}{
"error": "Insufficient permissions"
}