Get custom report (Explorer)
This endpoint returns data that allows graphing of arbitrary metrics and is what powers “Explorer” in the UI.
queryis 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:incomingmay be used ifxstarts withemail.. Defaults to*, which includes all objects.yis made up of the object type and field which is reported on the Y axis. For example the valuelead.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).xis 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 (xis a date field), one ofauto,hour,day,week,month,quarter,year(defaults toauto, which is chosen based onstartandend). For graphs with a numeric X axis, an integer number can be specified to indicate the histogram interval (autoby 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 theyparameter. One ofsum(default),avg,min, ormax. Does not apply for.countyvalues ifxis 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
Use your API key as the username and leave the password empty.
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