# Get custom report (Explorer)

GET https://api.close.com/api/v1/report/custom/{org_id}/

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.

Reference: https://developer.close.com/api/resources/reporting/get-custom

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Close API
  version: 1.0.0
paths:
  /report/custom/{org_id}/:
    get:
      operationId: get-custom
      summary: Get custom report (Explorer)
      description: >-
        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.
      tags:
        - subpackage_reporting
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: string
        - name: query
          in: query
          required: false
          schema:
            type: string
        - name: x
          in: query
          required: false
          schema:
            type: string
        - name: 'y'
          in: query
          required: false
          schema:
            type: string
        - name: group_by
          in: query
          required: false
          schema:
            type: string
        - name: transform_y
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/ReportCustomOrgIdGetParametersTransformY'
        - name: interval
          in: query
          required: false
          schema:
            type: string
        - name: start
          in: query
          required: false
          schema:
            type: string
        - name: end
          in: query
          required: false
          schema:
            type: string
        - name: Authorization
          in: header
          description: Basic authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/reporting_getCustom_Response_200'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                description: Any type
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                description: Any type
        '404':
          description: Not found
          content:
            application/json:
              schema:
                description: Any type
servers:
  - url: https://api.close.com/api/v1
components:
  schemas:
    ReportCustomOrgIdGetParametersTransformY:
      type: string
      enum:
        - sum
        - avg
        - min
        - max
      title: ReportCustomOrgIdGetParametersTransformY
    reporting_getCustom_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: reporting_getCustom_Response_200
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: basic
    OAuth2:
      type: http
      scheme: bearer

```