# Calculate aggregate for profile with period conditions

- Operation ID: `analytics-calculate-aggregate-for-profile-with-period-uuid`
- HTTP method: `POST`
- Path: `/analytics/analytics/definitions-manager/aggregates/{AggregateIdentifier}/client/{ProfileId}/calculate/histogram`
- [Human-readable API reference](https://hub.synerise.com/api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics-calculate-aggregate-for-profile-with-period-uuid)

## Self-contained OpenAPI method

The fenced document below contains this method's documentation and all of its local references. It is self-contained; no category or master specification fetch is required.

```yaml
openapi: 3.0.0
info:
  title: Synerise Public API
  version: 1.9.1
paths:
  /analytics/analytics/definitions-manager/aggregates/{AggregateIdentifier}/client/{ProfileId}/calculate/histogram:
    post:
      tags:
        - "Analytics: Aggregates"
      summary: Calculate aggregate for profile with period conditions
      description: |
        Calculate the results of an aggregate in context of a single profile. The results can be date-filtered and aggregated in time periods.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ANALYTICS_BACKEND_AGGREGATE_HISTOGRAM_FOR_CLIENT_READ`

        **User role permission required:** `analytics: read`
      operationId: analytics-calculate-aggregate-for-profile-with-period-uuid
      parameters:
        - name: AggregateIdentifier
          in: path
          description: Aggregate identifier (UUID or numeric ID)
          required: true
          style: simple
          explode: false
          schema:
            type: string
        - name: ProfileId
          in: path
          description: Unique identifier of a profile
          required: true
          style: simple
          explode: false
          schema:
            type: integer
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                variables:
                  type: array
                  description: A list of variable values to use in this calculation
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        description: The name of the variable (dynamic key) which will receive this value for the current calculation.
                      value:
                        description: |
                          The value of the variable. Can be one of: string, integer, boolean, string[], integer[], or a DateFilter object (with type ABSOLUTE/RELATIVE).
                        example: example-string-value
                    required:
                      - name
                      - value
                dateFilter:
                  description: |
                    Definition of a date filter. Only data that meets the result of the filter will be included in the analysis. For no filter, leave this object empty.

                    An absolute date filter lets you define static dates and times that always apply to the analysis.

                    A relative date filter lets you create a date filter that goes back a certain time from the moment of calculating the analysis.
                  discriminator:
                    propertyName: type
                    mapping:
                      ABSOLUTE: "#/components/schemas/analytics-AbsoluteDateFilter"
                      RELATIVE: "#/components/schemas/analytics-RelativeDateFilter"
                  oneOf:
                    - type: object
                      title: AbsoluteDateFilter
                      properties:
                        type:
                          title: AbsoluteDateFilterType
                          x-class-name: AbsoluteDateFilterType
                          x-interface-name-ts: AbsoluteDateFilterType
                          type: string
                          enum:
                            - ABSOLUTE
                          description: Absolute filters have the same start and end regardless of when the analysis is calculated.
                        from:
                          type: string
                          format: date-time
                          description: The lower boundary of the date filter.
                        to:
                          type: string
                          format: date-time
                          description: The upper boundary of the date filter. Must be later than `from`.
                        filter:
                          description: This object allows you to define a pattern for a more detailed time filter. These patterns are applied within the constraints of the `dateFilter` object that contains them, regardless of its type relative or absolute).
                          oneOf:
                            - type: object
                              title: Daily
                              x-class-name: CustomDailyFilter
                              x-interface-name-ts: CustomDailyFilter
                              properties:
                                type:
                                  type: string
                                  x-class-name: CustomDailyFilterType
                                  x-interface-name-ts: CustomDailyFilterType
                                  enum:
                                    - DAILY
                                  description: Daily filters limit the data scope to a range of hours every day.
                                nestingType:
                                  x-class-name: CustomDailyFilterNestingType
                                  type: string
                                  enum:
                                    - IN_PLACE
                                from:
                                  type: string
                                  description: Lower boundary of the pattern's timeframe, in HH:MM:SS format.
                                to:
                                  type: string
                                  description: Upper boundary of the pattern's timeframe, in HH:MM:SS format.
                                inverted:
                                  type: boolean
                                  default: false
                                  description: "Inverts the pattern's timeframe. For example: if `from` is 12:00:00; `to` is 14:00:00; and `inverted` is true, the analysis does NOT include anything between 12:00:01 and 13:59:59."
                              required:
                                - nestingType
                                - type
                                - from
                                - to
                            - type: object
                              title: Weekly
                              x-class-name: CustomWeeklyFilter
                              x-interface-name-ts: CustomWeeklyFilter
                              properties:
                                type:
                                  type: string
                                  x-class-name: CustomWeeklyFilterType
                                  x-interface-name-ts: CustomWeeklyFilterType
                                  enum:
                                    - WEEKLY
                                  description: Weekly filters let you define separate rules for each day of the week.
                                nestingType:
                                  x-class-name: CustomWeeklyFilterNestingType
                                  type: string
                                  enum:
                                    - IN_PLACE
                                days:
                                  type: array
                                  description: An array of rules for different days of the week.
                                  items:
                                    type: object
                                    properties:
                                      day:
                                        type: integer
                                        description: The day that this rule applies to. In weekly patterns, `1` is Monday (Sunday if inverted).
                                      from:
                                        type: string
                                        description: Lower boundary of the pattern's timeframe, in HH:MM:SS format.
                                      to:
                                        type: string
                                        description: Upper boundary of the pattern's timeframe, in HH:MM:SS format.
                                      mode:
                                        type: string
                                        enum:
                                          - Range
                                          - Hour
                                      inverted:
                                        type: boolean
                                        default: false
                                        description: "Inverts the pattern's timeframe. For example: if `from` is 12:00:00; `to` is 14:00:00; and `inverted` is true, the analysis does NOT include anything between 12:00:01 and 13:59:59."
                                    required:
                                      - day
                                      - from
                                      - inverted
                                      - to
                              required:
                                - days
                                - nestingType
                                - type
                            - type: object
                              title: Monthly
                              x-class-name: CustomMonthlyFilterType
                              x-interface-name-ts: CustomMonthlyFilterType
                              properties:
                                type:
                                  type: string
                                  x-class-name: CustomMonthlyFilterType
                                  x-interface-name-ts: CustomMonthlyFilterType
                                  enum:
                                    - MONTHLY
                                  description: Monthly filters allow you to build rules for days of the month and/or weeks, including rules for different days of the week.
                                nestingType:
                                  x-class-name: CustomMonthlyFilterNestingType
                                  type: string
                                  enum:
                                    - IN_PLACE
                                rules:
                                  description: A set of rules. Within a monthly filter, you can include a mixture of rules for days of the month and days of the week.
                                  oneOf:
                                    - type: object
                                      title: Days of the week
                                      x-class-name: WeekDateRule
                                      x-interface-name-ts: WeekDateRule
                                      properties:
                                        type:
                                          type: string
                                          x-class-name: WeekDateRuleType
                                          x-interface-name-ts: WeekDateRuleType
                                          enum:
                                            - WEEK
                                          description: Weekly filters limit the scope to days in a week
                                        weeks:
                                          type: array
                                          description: Weeks of the month included in the pattern
                                          items:
                                            type: object
                                            properties:
                                              week:
                                                type: integer
                                                description: Number of the week. The direction of counting depends on the `inverted` boolean property of the ancestor object.
                                              days:
                                                type: array
                                                description: Days included in the pattern
                                                items:
                                                  type: object
                                                  properties:
                                                    day:
                                                      type: integer
                                                      description: The day that this rule applies to. In weekly patterns, `1` is Monday (Sunday if inverted).
                                                    from:
                                                      type: string
                                                      description: Lower boundary of the pattern's timeframe, in HH:MM:SS format.
                                                    to:
                                                      type: string
                                                      description: Upper boundary of the pattern's timeframe, in HH:MM:SS format.
                                                    mode:
                                                      type: string
                                                      enum:
                                                        - Range
                                                        - Hour
                                                    inverted:
                                                      type: boolean
                                                      default: false
                                                      description: "Inverts the pattern's timeframe. For example: if `from` is 12:00:00; `to` is 14:00:00; and `inverted` is true, the analysis does NOT include anything between 12:00:01 and 13:59:59."
                                                  required:
                                                    - day
                                                    - from
                                                    - inverted
                                                    - to
                                            required:
                                              - days
                                              - type
                                        inverted:
                                          type: boolean
                                          default: false
                                          description: |
                                            When set to `true`, weeks are counted from the end of the month.

                                            For example, if `inverted` is true and `week` is set to 1, the rule applies to the last week of each month. This lets you take into account the varying length of months.

                                            **NOTE:** Remember that this `inverted` field is not the same as the `inverted` field of each object in the `days` array of each week..
                                      required:
                                        - type
                                        - weeks
                                    - type: object
                                      title: Days of the month
                                      x-class-name: MonthDateRule
                                      x-interface-name-ts: MonthDateRule
                                      properties:
                                        type:
                                          description: Rules for days of the month
                                          type: string
                                          x-class-name: MonthDateRuleType
                                          x-interface-name-ts: MonthDateRuleType
                                          enum:
                                            - MONTH
                                        days:
                                          type: array
                                          description: Days of the month included in the pattern.
                                          items:
                                            type: object
                                            properties:
                                              day:
                                                type: integer
                                                description: The day that this rule applies to. In weekly patterns, `1` is Monday (Sunday if inverted).
                                              from:
                                                type: string
                                                description: Lower boundary of the pattern's timeframe, in HH:MM:SS format.
                                              to:
                                                type: string
                                                description: Upper boundary of the pattern's timeframe, in HH:MM:SS format.
                                              mode:
                                                type: string
                                                enum:
                                                  - Range
                                                  - Hour
                                              inverted:
                                                type: boolean
                                                default: false
                                                description: "Inverts the pattern's timeframe. For example: if `from` is 12:00:00; `to` is 14:00:00; and `inverted` is true, the analysis does NOT include anything between 12:00:01 and 13:59:59."
                                            required:
                                              - day
                                              - from
                                              - inverted
                                              - to
                                        inverted:
                                          type: boolean
                                          default: false
                                          description: |
                                            When set to `true`, days are counted from the end of the month.

                                            For example, if `inverted` is true and `day` is set to 1, the rule applies to the last day of each month. This lets you take into account the varying length of months.  

                                            **NOTE:** Remember that this `inverted` field is not the same as the `inverted` field of each object in the `days` array.
                                      required:
                                        - days
                                        - type
                                  discriminator:
                                    propertyName: type
                                    mapping:
                                      WEEK: "#/components/schemas/analytics-WeekDateRule"
                                      MONTH: "#/components/schemas/analytics-MonthDateRule"
                              required:
                                - nestingType
                                - rules
                                - type
                          discriminator:
                            propertyName: type
                            mapping:
                              DAILY: "#/components/schemas/analytics-CustomDailyDateFilter"
                              WEEKLY: "#/components/schemas/analytics-CustomWeeklyDateFilter"
                              MONTHLY: "#/components/schemas/analytics-CustomMonthlyDateFilter"
                      required:
                        - type
                    - type: object
                      title: RelativeDateFilter
                      properties:
                        type:
                          title: RelativeDateFilterType
                          x-class-name: RelativeDateFilterType
                          x-interface-name-ts: RelativeDateFilterType
                          type: string
                          enum:
                            - RELATIVE
                          description: |
                            Relative filters allow you to create a filter that depends on when the analysis is calculated. 

                            - `duration` is the length of time that the filter covers.
                            - `offset` is the time that the filter goes back to set the beginning of the duration.
                        duration:
                          type: object
                          description: The definition of a length of time.
                          properties:
                            type:
                              type: string
                              x-class-name: TimePeriod
                              x-interface-name-ts: TimePeriod
                              description: The unit of time
                              enum:
                                - YEARS
                                - MONTHS
                                - WEEKS
                                - DAYS
                                - HOURS
                                - MINUTES
                                - SECONDS
                                - UNKNOWN
                            value:
                              type: integer
                              description: The number of time units
                              format: int64
                          required:
                            - type
                            - value
                        offset:
                          type: object
                          description: The definition of a length of time.
                          properties:
                            type:
                              type: string
                              x-class-name: TimePeriod
                              x-interface-name-ts: TimePeriod
                              description: The unit of time
                              enum:
                                - YEARS
                                - MONTHS
                                - WEEKS
                                - DAYS
                                - HOURS
                                - MINUTES
                                - SECONDS
                                - UNKNOWN
                            value:
                              type: integer
                              description: The number of time units
                              format: int64
                          required:
                            - type
                            - value
                        filter:
                          description: This object allows you to define a pattern for a more detailed time filter. These patterns are applied within the constraints of the `dateFilter` object that contains them, regardless of its type relative or absolute).
                          oneOf:
                            - type: object
                              title: Daily
                              x-class-name: CustomDailyFilter
                              x-interface-name-ts: CustomDailyFilter
                              properties:
                                type:
                                  type: string
                                  x-class-name: CustomDailyFilterType
                                  x-interface-name-ts: CustomDailyFilterType
                                  enum:
                                    - DAILY
                                  description: Daily filters limit the data scope to a range of hours every day.
                                nestingType:
                                  x-class-name: CustomDailyFilterNestingType
                                  type: string
                                  enum:
                                    - IN_PLACE
                                from:
                                  type: string
                                  description: Lower boundary of the pattern's timeframe, in HH:MM:SS format.
                                to:
                                  type: string
                                  description: Upper boundary of the pattern's timeframe, in HH:MM:SS format.
                                inverted:
                                  type: boolean
                                  default: false
                                  description: "Inverts the pattern's timeframe. For example: if `from` is 12:00:00; `to` is 14:00:00; and `inverted` is true, the analysis does NOT include anything between 12:00:01 and 13:59:59."
                              required:
                                - nestingType
                                - type
                                - from
                                - to
                            - type: object
                              title: Weekly
                              x-class-name: CustomWeeklyFilter
                              x-interface-name-ts: CustomWeeklyFilter
                              properties:
                                type:
                                  type: string
                                  x-class-name: CustomWeeklyFilterType
                                  x-interface-name-ts: CustomWeeklyFilterType
                                  enum:
                                    - WEEKLY
                                  description: Weekly filters let you define separate rules for each day of the week.
                                nestingType:
                                  x-class-name: CustomWeeklyFilterNestingType
                                  type: string
                                  enum:
                                    - IN_PLACE
                                days:
                                  type: array
                                  description: An array of rules for different days of the week.
                                  items:
                                    type: object
                                    properties:
                                      day:
                                        type: integer
                                        description: The day that this rule applies to. In weekly patterns, `1` is Monday (Sunday if inverted).
                                      from:
                                        type: string
                                        description: Lower boundary of the pattern's timeframe, in HH:MM:SS format.
                                      to:
                                        type: string
                                        description: Upper boundary of the pattern's timeframe, in HH:MM:SS format.
                                      mode:
                                        type: string
                                        enum:
                                          - Range
                                          - Hour
                                      inverted:
                                        type: boolean
                                        default: false
                                        description: "Inverts the pattern's timeframe. For example: if `from` is 12:00:00; `to` is 14:00:00; and `inverted` is true, the analysis does NOT include anything between 12:00:01 and 13:59:59."
                                    required:
                                      - day
                                      - from
                                      - inverted
                                      - to
                              required:
                                - days
                                - nestingType
                                - type
                            - type: object
                              title: Monthly
                              x-class-name: CustomMonthlyFilterType
                              x-interface-name-ts: CustomMonthlyFilterType
                              properties:
                                type:
                                  type: string
                                  x-class-name: CustomMonthlyFilterType
                                  x-interface-name-ts: CustomMonthlyFilterType
                                  enum:
                                    - MONTHLY
                                  description: Monthly filters allow you to build rules for days of the month and/or weeks, including rules for different days of the week.
                                nestingType:
                                  x-class-name: CustomMonthlyFilterNestingType
                                  type: string
                                  enum:
                                    - IN_PLACE
                                rules:
                                  description: A set of rules. Within a monthly filter, you can include a mixture of rules for days of the month and days of the week.
                                  oneOf:
                                    - type: object
                                      title: Days of the week
                                      x-class-name: WeekDateRule
                                      x-interface-name-ts: WeekDateRule
                                      properties:
                                        type:
                                          type: string
                                          x-class-name: WeekDateRuleType
                                          x-interface-name-ts: WeekDateRuleType
                                          enum:
                                            - WEEK
                                          description: Weekly filters limit the scope to days in a week
                                        weeks:
                                          type: array
                                          description: Weeks of the month included in the pattern
                                          items:
                                            type: object
                                            properties:
                                              week:
                                                type: integer
                                                description: Number of the week. The direction of counting depends on the `inverted` boolean property of the ancestor object.
                                              days:
                                                type: array
                                                description: Days included in the pattern
                                                items:
                                                  type: object
                                                  properties:
                                                    day:
                                                      type: integer
                                                      description: The day that this rule applies to. In weekly patterns, `1` is Monday (Sunday if inverted).
                                                    from:
                                                      type: string
                                                      description: Lower boundary of the pattern's timeframe, in HH:MM:SS format.
                                                    to:
                                                      type: string
                                                      description: Upper boundary of the pattern's timeframe, in HH:MM:SS format.
                                                    mode:
                                                      type: string
                                                      enum:
                                                        - Range
                                                        - Hour
                                                    inverted:
                                                      type: boolean
                                                      default: false
                                                      description: "Inverts the pattern's timeframe. For example: if `from` is 12:00:00; `to` is 14:00:00; and `inverted` is true, the analysis does NOT include anything between 12:00:01 and 13:59:59."
                                                  required:
                                                    - day
                                                    - from
                                                    - inverted
                                                    - to
                                            required:
                                              - days
                                              - type
                                        inverted:
                                          type: boolean
                                          default: false
                                          description: |
                                            When set to `true`, weeks are counted from the end of the month.

                                            For example, if `inverted` is true and `week` is set to 1, the rule applies to the last week of each month. This lets you take into account the varying length of months.

                                            **NOTE:** Remember that this `inverted` field is not the same as the `inverted` field of each object in the `days` array of each week..
                                      required:
                                        - type
                                        - weeks
                                    - type: object
                                      title: Days of the month
                                      x-class-name: MonthDateRule
                                      x-interface-name-ts: MonthDateRule
                                      properties:
                                        type:
                                          description: Rules for days of the month
                                          type: string
                                          x-class-name: MonthDateRuleType
                                          x-interface-name-ts: MonthDateRuleType
                                          enum:
                                            - MONTH
                                        days:
                                          type: array
                                          description: Days of the month included in the pattern.
                                          items:
                                            type: object
                                            properties:
                                              day:
                                                type: integer
                                                description: The day that this rule applies to. In weekly patterns, `1` is Monday (Sunday if inverted).
                                              from:
                                                type: string
                                                description: Lower boundary of the pattern's timeframe, in HH:MM:SS format.
                                              to:
                                                type: string
                                                description: Upper boundary of the pattern's timeframe, in HH:MM:SS format.
                                              mode:
                                                type: string
                                                enum:
                                                  - Range
                                                  - Hour
                                              inverted:
                                                type: boolean
                                                default: false
                                                description: "Inverts the pattern's timeframe. For example: if `from` is 12:00:00; `to` is 14:00:00; and `inverted` is true, the analysis does NOT include anything between 12:00:01 and 13:59:59."
                                            required:
                                              - day
                                              - from
                                              - inverted
                                              - to
                                        inverted:
                                          type: boolean
                                          default: false
                                          description: |
                                            When set to `true`, days are counted from the end of the month.

                                            For example, if `inverted` is true and `day` is set to 1, the rule applies to the last day of each month. This lets you take into account the varying length of months.  

                                            **NOTE:** Remember that this `inverted` field is not the same as the `inverted` field of each object in the `days` array.
                                      required:
                                        - days
                                        - type
                                  discriminator:
                                    propertyName: type
                                    mapping:
                                      WEEK: "#/components/schemas/analytics-WeekDateRule"
                                      MONTH: "#/components/schemas/analytics-MonthDateRule"
                              required:
                                - nestingType
                                - rules
                                - type
                          discriminator:
                            propertyName: type
                            mapping:
                              DAILY: "#/components/schemas/analytics-CustomDailyDateFilter"
                              WEEKLY: "#/components/schemas/analytics-CustomWeeklyDateFilter"
                              MONTHLY: "#/components/schemas/analytics-CustomMonthlyDateFilter"
                      required:
                        - duration
                        - offset
                        - type
                aggregateDataBy:
                  type: object
                  description: The definition of a length of time.
                  properties:
                    type:
                      type: string
                      x-class-name: TimePeriod
                      x-interface-name-ts: TimePeriod
                      description: The unit of time
                      enum:
                        - YEARS
                        - MONTHS
                        - WEEKS
                        - DAYS
                        - HOURS
                        - MINUTES
                        - SECONDS
                        - UNKNOWN
                    value:
                      type: integer
                      description: The number of time units
                      format: int64
                  required:
                    - type
                    - value
              required:
                - aggregateDataBy
                - dateFilter
                - variables
      responses:
        "200":
          description: Aggregate calculation result
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    description: The numerical results, divided into time units according to `aggregateDataBy`. Each object in the array holds the results for a particular aggregation period.
                    items:
                      type: object
                      properties:
                        aggregateTimeDescription:
                          type: string
                          description: Time when this interval ended
                        values:
                          type: array
                          description: The result of the aggregate
                          items:
                            type: object
                            properties:
                              uuid:
                                description: Identifier of the value
                                type: string
                                format: uuid
                              value:
                                description: The value
                                type: number
                                format: double
                            required:
                              - metricId
                              - value
                      required:
                        - aggregateTimeDescription
                        - values
                  metadata:
                    type: object
                    description: Time constraints and aggregation details
                    properties:
                      period:
                        type: object
                        description: The definition of a length of time.
                        properties:
                          type:
                            type: string
                            x-class-name: TimePeriod
                            x-interface-name-ts: TimePeriod
                            description: The unit of time
                            enum:
                              - YEARS
                              - MONTHS
                              - WEEKS
                              - DAYS
                              - HOURS
                              - MINUTES
                              - SECONDS
                              - UNKNOWN
                          value:
                            type: integer
                            description: The number of time units
                            format: int64
                        required:
                          - type
                          - value
                      dateFilter:
                        description: |
                          Definition of a date filter. Only data that meets the result of the filter will be included in the analysis. For no filter, leave this object empty.

                          An absolute date filter lets you define static dates and times that always apply to the analysis.

                          A relative date filter lets you create a date filter that goes back a certain time from the moment of calculating the analysis.
                        discriminator:
                          propertyName: type
                          mapping:
                            ABSOLUTE: "#/components/schemas/analytics-AbsoluteDateFilter"
                            RELATIVE: "#/components/schemas/analytics-RelativeDateFilter"
                        oneOf:
                          - type: object
                            title: AbsoluteDateFilter
                            properties:
                              type:
                                title: AbsoluteDateFilterType
                                x-class-name: AbsoluteDateFilterType
                                x-interface-name-ts: AbsoluteDateFilterType
                                type: string
                                enum:
                                  - ABSOLUTE
                                description: Absolute filters have the same start and end regardless of when the analysis is calculated.
                              from:
                                type: string
                                format: date-time
                                description: The lower boundary of the date filter.
                              to:
                                type: string
                                format: date-time
                                description: The upper boundary of the date filter. Must be later than `from`.
                              filter:
                                description: This object allows you to define a pattern for a more detailed time filter. These patterns are applied within the constraints of the `dateFilter` object that contains them, regardless of its type relative or absolute).
                                oneOf:
                                  - type: object
                                    title: Daily
                                    x-class-name: CustomDailyFilter
                                    x-interface-name-ts: CustomDailyFilter
                                    properties:
                                      type:
                                        type: string
                                        x-class-name: CustomDailyFilterType
                                        x-interface-name-ts: CustomDailyFilterType
                                        enum:
                                          - DAILY
                                        description: Daily filters limit the data scope to a range of hours every day.
                                      nestingType:
                                        x-class-name: CustomDailyFilterNestingType
                                        type: string
                                        enum:
                                          - IN_PLACE
                                      from:
                                        type: string
                                        description: Lower boundary of the pattern's timeframe, in HH:MM:SS format.
                                      to:
                                        type: string
                                        description: Upper boundary of the pattern's timeframe, in HH:MM:SS format.
                                      inverted:
                                        type: boolean
                                        default: false
                                        description: "Inverts the pattern's timeframe. For example: if `from` is 12:00:00; `to` is 14:00:00; and `inverted` is true, the analysis does NOT include anything between 12:00:01 and 13:59:59."
                                    required:
                                      - nestingType
                                      - type
                                      - from
                                      - to
                                  - type: object
                                    title: Weekly
                                    x-class-name: CustomWeeklyFilter
                                    x-interface-name-ts: CustomWeeklyFilter
                                    properties:
                                      type:
                                        type: string
                                        x-class-name: CustomWeeklyFilterType
                                        x-interface-name-ts: CustomWeeklyFilterType
                                        enum:
                                          - WEEKLY
                                        description: Weekly filters let you define separate rules for each day of the week.
                                      nestingType:
                                        x-class-name: CustomWeeklyFilterNestingType
                                        type: string
                                        enum:
                                          - IN_PLACE
                                      days:
                                        type: array
                                        description: An array of rules for different days of the week.
                                        items:
                                          type: object
                                          properties:
                                            day:
                                              type: integer
                                              description: The day that this rule applies to. In weekly patterns, `1` is Monday (Sunday if inverted).
                                            from:
                                              type: string
                                              description: Lower boundary of the pattern's timeframe, in HH:MM:SS format.
                                            to:
                                              type: string
                                              description: Upper boundary of the pattern's timeframe, in HH:MM:SS format.
                                            mode:
                                              type: string
                                              enum:
                                                - Range
                                                - Hour
                                            inverted:
                                              type: boolean
                                              default: false
                                              description: "Inverts the pattern's timeframe. For example: if `from` is 12:00:00; `to` is 14:00:00; and `inverted` is true, the analysis does NOT include anything between 12:00:01 and 13:59:59."
                                          required:
                                            - day
                                            - from
                                            - inverted
                                            - to
                                    required:
                                      - days
                                      - nestingType
                                      - type
                                  - type: object
                                    title: Monthly
                                    x-class-name: CustomMonthlyFilterType
                                    x-interface-name-ts: CustomMonthlyFilterType
                                    properties:
                                      type:
                                        type: string
                                        x-class-name: CustomMonthlyFilterType
                                        x-interface-name-ts: CustomMonthlyFilterType
                                        enum:
                                          - MONTHLY
                                        description: Monthly filters allow you to build rules for days of the month and/or weeks, including rules for different days of the week.
                                      nestingType:
                                        x-class-name: CustomMonthlyFilterNestingType
                                        type: string
                                        enum:
                                          - IN_PLACE
                                      rules:
                                        description: A set of rules. Within a monthly filter, you can include a mixture of rules for days of the month and days of the week.
                                        oneOf:
                                          - type: object
                                            title: Days of the week
                                            x-class-name: WeekDateRule
                                            x-interface-name-ts: WeekDateRule
                                            properties:
                                              type:
                                                type: string
                                                x-class-name: WeekDateRuleType
                                                x-interface-name-ts: WeekDateRuleType
                                                enum:
                                                  - WEEK
                                                description: Weekly filters limit the scope to days in a week
                                              weeks:
                                                type: array
                                                description: Weeks of the month included in the pattern
                                                items:
                                                  type: object
                                                  properties:
                                                    week:
                                                      type: integer
                                                      description: Number of the week. The direction of counting depends on the `inverted` boolean property of the ancestor object.
                                                    days:
                                                      type: array
                                                      description: Days included in the pattern
                                                      items:
                                                        type: object
                                                        properties:
                                                          day:
                                                            type: integer
                                                            description: The day that this rule applies to. In weekly patterns, `1` is Monday (Sunday if inverted).
                                                          from:
                                                            type: string
                                                            description: Lower boundary of the pattern's timeframe, in HH:MM:SS format.
                                                          to:
                                                            type: string
                                                            description: Upper boundary of the pattern's timeframe, in HH:MM:SS format.
                                                          mode:
                                                            type: string
                                                            enum:
                                                              - Range
                                                              - Hour
                                                          inverted:
                                                            type: boolean
                                                            default: false
                                                            description: "Inverts the pattern's timeframe. For example: if `from` is 12:00:00; `to` is 14:00:00; and `inverted` is true, the analysis does NOT include anything between 12:00:01 and 13:59:59."
                                                        required:
                                                          - day
                                                          - from
                                                          - inverted
                                                          - to
                                                  required:
                                                    - days
                                                    - type
                                              inverted:
                                                type: boolean
                                                default: false
                                                description: |
                                                  When set to `true`, weeks are counted from the end of the month.

                                                  For example, if `inverted` is true and `week` is set to 1, the rule applies to the last week of each month. This lets you take into account the varying length of months.

                                                  **NOTE:** Remember that this `inverted` field is not the same as the `inverted` field of each object in the `days` array of each week..
                                            required:
                                              - type
                                              - weeks
                                          - type: object
                                            title: Days of the month
                                            x-class-name: MonthDateRule
                                            x-interface-name-ts: MonthDateRule
                                            properties:
                                              type:
                                                description: Rules for days of the month
                                                type: string
                                                x-class-name: MonthDateRuleType
                                                x-interface-name-ts: MonthDateRuleType
                                                enum:
                                                  - MONTH
                                              days:
                                                type: array
                                                description: Days of the month included in the pattern.
                                                items:
                                                  type: object
                                                  properties:
                                                    day:
                                                      type: integer
                                                      description: The day that this rule applies to. In weekly patterns, `1` is Monday (Sunday if inverted).
                                                    from:
                                                      type: string
                                                      description: Lower boundary of the pattern's timeframe, in HH:MM:SS format.
                                                    to:
                                                      type: string
                                                      description: Upper boundary of the pattern's timeframe, in HH:MM:SS format.
                                                    mode:
                                                      type: string
                                                      enum:
                                                        - Range
                                                        - Hour
                                                    inverted:
                                                      type: boolean
                                                      default: false
                                                      description: "Inverts the pattern's timeframe. For example: if `from` is 12:00:00; `to` is 14:00:00; and `inverted` is true, the analysis does NOT include anything between 12:00:01 and 13:59:59."
                                                  required:
                                                    - day
                                                    - from
                                                    - inverted
                                                    - to
                                              inverted:
                                                type: boolean
                                                default: false
                                                description: |
                                                  When set to `true`, days are counted from the end of the month.

                                                  For example, if `inverted` is true and `day` is set to 1, the rule applies to the last day of each month. This lets you take into account the varying length of months.  

                                                  **NOTE:** Remember that this `inverted` field is not the same as the `inverted` field of each object in the `days` array.
                                            required:
                                              - days
                                              - type
                                        discriminator:
                                          propertyName: type
                                          mapping:
                                            WEEK: "#/components/schemas/analytics-WeekDateRule"
                                            MONTH: "#/components/schemas/analytics-MonthDateRule"
                                    required:
                                      - nestingType
                                      - rules
                                      - type
                                discriminator:
                                  propertyName: type
                                  mapping:
                                    DAILY: "#/components/schemas/analytics-CustomDailyDateFilter"
                                    WEEKLY: "#/components/schemas/analytics-CustomWeeklyDateFilter"
                                    MONTHLY: "#/components/schemas/analytics-CustomMonthlyDateFilter"
                            required:
                              - type
                          - type: object
                            title: RelativeDateFilter
                            properties:
                              type:
                                title: RelativeDateFilterType
                                x-class-name: RelativeDateFilterType
                                x-interface-name-ts: RelativeDateFilterType
                                type: string
                                enum:
                                  - RELATIVE
                                description: |
                                  Relative filters allow you to create a filter that depends on when the analysis is calculated. 

                                  - `duration` is the length of time that the filter covers.
                                  - `offset` is the time that the filter goes back to set the beginning of the duration.
                              duration:
                                type: object
                                description: The definition of a length of time.
                                properties:
                                  type:
                                    type: string
                                    x-class-name: TimePeriod
                                    x-interface-name-ts: TimePeriod
                                    description: The unit of time
                                    enum:
                                      - YEARS
                                      - MONTHS
                                      - WEEKS
                                      - DAYS
                                      - HOURS
                                      - MINUTES
                                      - SECONDS
                                      - UNKNOWN
                                  value:
                                    type: integer
                                    description: The number of time units
                                    format: int64
                                required:
                                  - type
                                  - value
                              offset:
                                type: object
                                description: The definition of a length of time.
                                properties:
                                  type:
                                    type: string
                                    x-class-name: TimePeriod
                                    x-interface-name-ts: TimePeriod
                                    description: The unit of time
                                    enum:
                                      - YEARS
                                      - MONTHS
                                      - WEEKS
                                      - DAYS
                                      - HOURS
                                      - MINUTES
                                      - SECONDS
                                      - UNKNOWN
                                  value:
                                    type: integer
                                    description: The number of time units
                                    format: int64
                                required:
                                  - type
                                  - value
                              filter:
                                description: This object allows you to define a pattern for a more detailed time filter. These patterns are applied within the constraints of the `dateFilter` object that contains them, regardless of its type relative or absolute).
                                oneOf:
                                  - type: object
                                    title: Daily
                                    x-class-name: CustomDailyFilter
                                    x-interface-name-ts: CustomDailyFilter
                                    properties:
                                      type:
                                        type: string
                                        x-class-name: CustomDailyFilterType
                                        x-interface-name-ts: CustomDailyFilterType
                                        enum:
                                          - DAILY
                                        description: Daily filters limit the data scope to a range of hours every day.
                                      nestingType:
                                        x-class-name: CustomDailyFilterNestingType
                                        type: string
                                        enum:
                                          - IN_PLACE
                                      from:
                                        type: string
                                        description: Lower boundary of the pattern's timeframe, in HH:MM:SS format.
                                      to:
                                        type: string
                                        description: Upper boundary of the pattern's timeframe, in HH:MM:SS format.
                                      inverted:
                                        type: boolean
                                        default: false
                                        description: "Inverts the pattern's timeframe. For example: if `from` is 12:00:00; `to` is 14:00:00; and `inverted` is true, the analysis does NOT include anything between 12:00:01 and 13:59:59."
                                    required:
                                      - nestingType
                                      - type
                                      - from
                                      - to
                                  - type: object
                                    title: Weekly
                                    x-class-name: CustomWeeklyFilter
                                    x-interface-name-ts: CustomWeeklyFilter
                                    properties:
                                      type:
                                        type: string
                                        x-class-name: CustomWeeklyFilterType
                                        x-interface-name-ts: CustomWeeklyFilterType
                                        enum:
                                          - WEEKLY
                                        description: Weekly filters let you define separate rules for each day of the week.
                                      nestingType:
                                        x-class-name: CustomWeeklyFilterNestingType
                                        type: string
                                        enum:
                                          - IN_PLACE
                                      days:
                                        type: array
                                        description: An array of rules for different days of the week.
                                        items:
                                          type: object
                                          properties:
                                            day:
                                              type: integer
                                              description: The day that this rule applies to. In weekly patterns, `1` is Monday (Sunday if inverted).
                                            from:
                                              type: string
                                              description: Lower boundary of the pattern's timeframe, in HH:MM:SS format.
                                            to:
                                              type: string
                                              description: Upper boundary of the pattern's timeframe, in HH:MM:SS format.
                                            mode:
                                              type: string
                                              enum:
                                                - Range
                                                - Hour
                                            inverted:
                                              type: boolean
                                              default: false
                                              description: "Inverts the pattern's timeframe. For example: if `from` is 12:00:00; `to` is 14:00:00; and `inverted` is true, the analysis does NOT include anything between 12:00:01 and 13:59:59."
                                          required:
                                            - day
                                            - from
                                            - inverted
                                            - to
                                    required:
                                      - days
                                      - nestingType
                                      - type
                                  - type: object
                                    title: Monthly
                                    x-class-name: CustomMonthlyFilterType
                                    x-interface-name-ts: CustomMonthlyFilterType
                                    properties:
                                      type:
                                        type: string
                                        x-class-name: CustomMonthlyFilterType
                                        x-interface-name-ts: CustomMonthlyFilterType
                                        enum:
                                          - MONTHLY
                                        description: Monthly filters allow you to build rules for days of the month and/or weeks, including rules for different days of the week.
                                      nestingType:
                                        x-class-name: CustomMonthlyFilterNestingType
                                        type: string
                                        enum:
                                          - IN_PLACE
                                      rules:
                                        description: A set of rules. Within a monthly filter, you can include a mixture of rules for days of the month and days of the week.
                                        oneOf:
                                          - type: object
                                            title: Days of the week
                                            x-class-name: WeekDateRule
                                            x-interface-name-ts: WeekDateRule
                                            properties:
                                              type:
                                                type: string
                                                x-class-name: WeekDateRuleType
                                                x-interface-name-ts: WeekDateRuleType
                                                enum:
                                                  - WEEK
                                                description: Weekly filters limit the scope to days in a week
                                              weeks:
                                                type: array
                                                description: Weeks of the month included in the pattern
                                                items:
                                                  type: object
                                                  properties:
                                                    week:
                                                      type: integer
                                                      description: Number of the week. The direction of counting depends on the `inverted` boolean property of the ancestor object.
                                                    days:
                                                      type: array
                                                      description: Days included in the pattern
                                                      items:
                                                        type: object
                                                        properties:
                                                          day:
                                                            type: integer
                                                            description: The day that this rule applies to. In weekly patterns, `1` is Monday (Sunday if inverted).
                                                          from:
                                                            type: string
                                                            description: Lower boundary of the pattern's timeframe, in HH:MM:SS format.
                                                          to:
                                                            type: string
                                                            description: Upper boundary of the pattern's timeframe, in HH:MM:SS format.
                                                          mode:
                                                            type: string
                                                            enum:
                                                              - Range
                                                              - Hour
                                                          inverted:
                                                            type: boolean
                                                            default: false
                                                            description: "Inverts the pattern's timeframe. For example: if `from` is 12:00:00; `to` is 14:00:00; and `inverted` is true, the analysis does NOT include anything between 12:00:01 and 13:59:59."
                                                        required:
                                                          - day
                                                          - from
                                                          - inverted
                                                          - to
                                                  required:
                                                    - days
                                                    - type
                                              inverted:
                                                type: boolean
                                                default: false
                                                description: |
                                                  When set to `true`, weeks are counted from the end of the month.

                                                  For example, if `inverted` is true and `week` is set to 1, the rule applies to the last week of each month. This lets you take into account the varying length of months.

                                                  **NOTE:** Remember that this `inverted` field is not the same as the `inverted` field of each object in the `days` array of each week..
                                            required:
                                              - type
                                              - weeks
                                          - type: object
                                            title: Days of the month
                                            x-class-name: MonthDateRule
                                            x-interface-name-ts: MonthDateRule
                                            properties:
                                              type:
                                                description: Rules for days of the month
                                                type: string
                                                x-class-name: MonthDateRuleType
                                                x-interface-name-ts: MonthDateRuleType
                                                enum:
                                                  - MONTH
                                              days:
                                                type: array
                                                description: Days of the month included in the pattern.
                                                items:
                                                  type: object
                                                  properties:
                                                    day:
                                                      type: integer
                                                      description: The day that this rule applies to. In weekly patterns, `1` is Monday (Sunday if inverted).
                                                    from:
                                                      type: string
                                                      description: Lower boundary of the pattern's timeframe, in HH:MM:SS format.
                                                    to:
                                                      type: string
                                                      description: Upper boundary of the pattern's timeframe, in HH:MM:SS format.
                                                    mode:
                                                      type: string
                                                      enum:
                                                        - Range
                                                        - Hour
                                                    inverted:
                                                      type: boolean
                                                      default: false
                                                      description: "Inverts the pattern's timeframe. For example: if `from` is 12:00:00; `to` is 14:00:00; and `inverted` is true, the analysis does NOT include anything between 12:00:01 and 13:59:59."
                                                  required:
                                                    - day
                                                    - from
                                                    - inverted
                                                    - to
                                              inverted:
                                                type: boolean
                                                default: false
                                                description: |
                                                  When set to `true`, days are counted from the end of the month.

                                                  For example, if `inverted` is true and `day` is set to 1, the rule applies to the last day of each month. This lets you take into account the varying length of months.  

                                                  **NOTE:** Remember that this `inverted` field is not the same as the `inverted` field of each object in the `days` array.
                                            required:
                                              - days
                                              - type
                                        discriminator:
                                          propertyName: type
                                          mapping:
                                            WEEK: "#/components/schemas/analytics-WeekDateRule"
                                            MONTH: "#/components/schemas/analytics-MonthDateRule"
                                    required:
                                      - nestingType
                                      - rules
                                      - type
                                discriminator:
                                  propertyName: type
                                  mapping:
                                    DAILY: "#/components/schemas/analytics-CustomDailyDateFilter"
                                    WEEKLY: "#/components/schemas/analytics-CustomWeeklyDateFilter"
                                    MONTHLY: "#/components/schemas/analytics-CustomMonthlyDateFilter"
                            required:
                              - duration
                              - offset
                              - type
                    required:
                      - aggregateDataBy
                      - dateFilter
                required:
                  - items
                  - metadata
        4XX:
          description: See error message for details
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      source:
                        type: object
                        nullable: true
                        description: Information about a parameter that caused the error, if applicable.
                        properties:
                          pointer:
                            type: string
                            description: Information about a parameter
                          value:
                            type: string
                            nullable: true
                            description: Currently unused
                      errors:
                        type: array
                        description: An array of errors, if applicable
                        items:
                          type: object
                          properties:
                            timestamp:
                              type: string
                              format: date-time
                              description: Time when the error occurred
                            errorCode:
                              type: string
                              description: Code of the error, needed for troubleshooting. See [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html).
                            httpStatus:
                              type: integer
                              description: HTTP status code
                            message:
                              type: string
                              description: Description of the problem
                            traceId:
                              type: string
                              description: Currently unused
                              nullable: true
                            help:
                              type: string
                              nullable: true
                              description: Currently unused
                  - type: object
                    properties:
                      timestamp:
                        type: string
                        format: date-time
                        description: Time when the error occurred
                      errorCode:
                        type: string
                        description: Code of the error, needed for troubleshooting. See [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html).
                      httpStatus:
                        type: integer
                        description: HTTP status code
                      message:
                        type: string
                        description: Description of the problem
                      traceId:
                        type: string
                        description: Currently unused
                        nullable: true
                      help:
                        type: string
                        nullable: true
                        description: Currently unused
        5XX:
          description: See error message for details
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      source:
                        type: object
                        nullable: true
                        description: Information about a parameter that caused the error, if applicable.
                        properties:
                          pointer:
                            type: string
                            description: Information about a parameter
                          value:
                            type: string
                            nullable: true
                            description: Currently unused
                      errors:
                        type: array
                        description: An array of errors, if applicable
                        items:
                          type: object
                          properties:
                            timestamp:
                              type: string
                              format: date-time
                              description: Time when the error occurred
                            errorCode:
                              type: string
                              description: Code of the error, needed for troubleshooting. See [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html).
                            httpStatus:
                              type: integer
                              description: HTTP status code
                            message:
                              type: string
                              description: Description of the problem
                            traceId:
                              type: string
                              description: Currently unused
                              nullable: true
                            help:
                              type: string
                              nullable: true
                              description: Currently unused
                  - type: object
                    properties:
                      timestamp:
                        type: string
                        format: date-time
                        description: Time when the error occurred
                      errorCode:
                        type: string
                        description: Code of the error, needed for troubleshooting. See [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html).
                      httpStatus:
                        type: integer
                        description: HTTP status code
                      message:
                        type: string
                        description: Description of the problem
                      traceId:
                        type: string
                        description: Currently unused
                        nullable: true
                      help:
                        type: string
                        nullable: true
                        description: Currently unused
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Analytics:-Aggregates/operation/analytics-calculate-aggregate-for-profile-with-period-uuid
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/analytics/analytics/definitions-manager/aggregates/%7BAggregateIdentifier%7D/client/%7BProfileId%7D/calculate/histogram \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"variables":[{"name":"string","value":"example-string-value"}],"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"aggregateDataBy":{"type":"YEARS","value":0}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}],\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0}}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/analytics/analytics/definitions-manager/aggregates/%7BAggregateIdentifier%7D/client/%7BProfileId%7D/calculate/histogram", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "variables": [
                {
                  "name": "string",
                  "value": "example-string-value"
                }
              ],
              "dateFilter": {
                "type": "ABSOLUTE",
                "from": "2019-08-24T14:15:22Z",
                "to": "2019-08-24T14:15:22Z",
                "filter": {
                  "type": "DAILY",
                  "nestingType": "IN_PLACE",
                  "from": "string",
                  "to": "string",
                  "inverted": false
                }
              },
              "aggregateDataBy": {
                "type": "YEARS",
                "value": 0
              }
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/analytics/analytics/definitions-manager/aggregates/%7BAggregateIdentifier%7D/client/%7BProfileId%7D/calculate/histogram");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/analytics/analytics/definitions-manager/aggregates/%7BAggregateIdentifier%7D/client/%7BProfileId%7D/calculate/histogram",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              variables: [{name: 'string', value: 'example-string-value'}],
              dateFilter: {
                type: 'ABSOLUTE',
                from: '2019-08-24T14:15:22Z',
                to: '2019-08-24T14:15:22Z',
                filter: {
                  type: 'DAILY',
                  nestingType: 'IN_PLACE',
                  from: 'string',
                  to: 'string',
                  inverted: false
                }
              },
              aggregateDataBy: {type: 'YEARS', value: 0}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/analytics/analytics/definitions-manager/aggregates/%7BAggregateIdentifier%7D/client/%7BProfileId%7D/calculate/histogram');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"variables":[{"name":"string","value":"example-string-value"}],"dateFilter":{"type":"ABSOLUTE","from":"2019-08-24T14:15:22Z","to":"2019-08-24T14:15:22Z","filter":{"type":"DAILY","nestingType":"IN_PLACE","from":"string","to":"string","inverted":false}},"aggregateDataBy":{"type":"YEARS","value":0}}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/analytics/analytics/definitions-manager/aggregates/%7BAggregateIdentifier%7D/client/%7BProfileId%7D/calculate/histogram")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"variables\":[{\"name\":\"string\",\"value\":\"example-string-value\"}],\"dateFilter\":{\"type\":\"ABSOLUTE\",\"from\":\"2019-08-24T14:15:22Z\",\"to\":\"2019-08-24T14:15:22Z\",\"filter\":{\"type\":\"DAILY\",\"nestingType\":\"IN_PLACE\",\"from\":\"string\",\"to\":\"string\",\"inverted\":false}},\"aggregateDataBy\":{\"type\":\"YEARS\",\"value\":0}}")
              .asString();
servers:
  - description: Microsoft Azure EU
    url: https://api.synerise.com
  - description: Microsoft Azure USA
    url: https://api.azu.synerise.com
  - description: Google Cloud Platform
    url: https://api.geb.synerise.com
tags:
  - name: "Analytics: Aggregates"
components:
  securitySchemes:
    JWT:
      type: http
      scheme: bearer
      description: |-
        JWT Bearer token. The header looks like this: `Bearer {JWT}`

        Remember to include the space between 'Bearer' and the token.

        Generate a token via the **Authorization** endpoints.
```
