Get custom report (Explorer)
This endpoint returns data that allows graphing of arbitrary metrics and is what powers "Explorer" in the UI.
- `query` is an optional search query filter. When reporting on leads, any regular lead search query may be used. When reporting on activities or opportunities, only properties of the chosen object type may be used. For example, `direction:incoming` may be used if `x` starts with `email.`. Defaults to `*`, which includes all objects.
- `y` is made up of the object type and field which is reported on the Y axis. For example the value `lead.count` (used by default) may be used to graph the number of leads, or a numeric field may be used. Examples: `call.duration` (for call length), `opportunity.value` (for value of opportunities).
- `x` is the field which is reported on the X axis, for example "lead.custom.MRR" or "opportunity.date_created".
- `interval`: Graph interval, i.e. the precision of the X axis. For time based graphs (`x` is a date field), one of `auto`, `hour`, `day`, `week`, `month`, `quarter`, `year` (defaults to `auto`, which is chosen based on `start` and `end`). For graphs with a numeric X axis, an integer number can be specified to indicate the histogram interval (`auto` by default).
- `group_by`: Optional field name by which the report will be grouped. When grouping, a separate series will be returned for each group. By default no grouping is applied.
- `transform_y`: Transformation function that gets applied to the `y` parameter. One of `sum` (default), `avg`, `min`, or `max`. Does not apply for `.count` `y` values if `x` is of the same object type.
- `start`: Date or integer of the start of the X axis range. For dates, defaults to the date of creation of your organization.
- `end`: Date or integer of the end of the X axis range. For dates, defaults to now.
To get a full list of fields that can be used, do a GET to `/report/custom/fields/`. Only the `number` data type can be used for the `y` parameter.
Authentication
AuthorizationBasic
Basic authentication of the form Basic <base64(username:)>.
OR
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
org_id
Query parameters
query
x
y
group_by
transform_y
Allowed values:
interval
start
end
Response
Successful response
Errors
400
Bad Request Error
401
Unauthorized Error
404
Not Found Error