openapi: 3.0.2
info:
  title: Holistics API
  version: '2.0'
  description: >
    Using these APIs, you can programmatically work with Holistics - retrieve
    report data, trigger schedules, manage users, and more.


    For setup instructions, see the [Getting Started
    guide](/api/v2/getting-started).
  contact:
    name: Holistics Support
    email: support@holistics.io
servers:
  - url: https://secure.holistics.io/api/v2
    description: APAC-region API
  - url: https://us.holistics.io/api/v2
    description: US-region API
  - url: https://eu.holistics.io/api/v2
    description: EU-region API
security:
  - ApiKeyAuthentication: []
components:
  securitySchemes:
    ApiKeyAuthentication:
      type: apiKey
      in: header
      name: X-Holistics-Key
    BearerAuth:
      type: http
      scheme: bearer
      description: OAuth 2.1 Bearer token authentication
  schemas:
    _ExampleArrayQueryParam:
      type: object
      properties:
        ids:
          type: array
          items:
            type: integer
          description: |
            IDs of the objects that you want to list
        names:
          type: array
          items:
            type: string
          description: |
            Names of the objects that you want to list
        limit:
          type: integer
    _BaseError:
      $ref: '#/components/schemas/BaseError'
    _RecordError:
      $ref: '#/components/schemas/RecordError'
    _DataModelingCondition:
      $ref: '#/components/schemas/Condition'
    _DataSetQuery:
      $ref: '#/components/schemas/Query'
    Schedule:
      type: object
      properties:
        repeat:
          type: string
          description: >
            Crontab expression. Example: `0 4 * * *` will start a job at 4:00

            AM everyday. You can check your crontab expression by using
            https://crontab.guru.


            We recommend that you should change the `repeat` time to prevent
            anti-spam filter from your email provider.

            For example `0 4 * * *` (job start at 4:00 AM) could be `1 4 * * *`
            (job start at 4:01 AM) or `5 4 * * *`(job start at 4:05 AM).

            This will also help your database does not get overload when there
            are many email schedules that execute at the same time.
        paused:
          type: boolean
          description: Pause execution temporarily.
        is_archived:
          type: boolean
          description: The schedule is paused because the associated dashboard is archived.
          readOnly: true
      required:
        - repeat
        - paused
    ConditionValue:
      anyOf:
        - type: string
        - type: boolean
        - type: number
    Condition:
      title: DataModelingCondition
      type: object
      description: >-
        Condition that can be applied on the Data Modeling layer to filter your
        data.
      properties:
        modifier:
          type: string
          nullable: true
        operator:
          type: string
        values:
          type: array
          items:
            $ref: '#/components/schemas/ConditionValue'
      discriminator:
        propertyName: operator
        mapping:
          is: '#/components/schemas/Is'
          is_not: '#/components/schemas/IsNot'
          is_null: '#/components/schemas/IsNull'
          not_null: '#/components/schemas/NotNull'
          greater_than: '#/components/schemas/GreaterThan'
          less_than: '#/components/schemas/LessThan'
          between: '#/components/schemas/Between'
          matches_user_attribute: '#/components/schemas/MatchesUserAttribute'
          contains: '#/components/schemas/Contains'
          does_not_contain: '#/components/schemas/DoesNotContain'
          starts_with: '#/components/schemas/StartsWith'
          ends_with: '#/components/schemas/EndsWith'
          is_true: '#/components/schemas/IsTrue'
          is_false: '#/components/schemas/IsFalse'
          last: '#/components/schemas/Last'
          next: '#/components/schemas/Next'
          before: '#/components/schemas/Before'
          after: '#/components/schemas/After'
          matches: '#/components/schemas/Matches'
          transform_pop_relative: '#/components/schemas/TransformPopRelative'
          transform_pop_absolute: '#/components/schemas/TransformPopAbsolute'
          transform_pop_none: '#/components/schemas/TransformPopNone'
          transform_date_drill: '#/components/schemas/TransformDateDrill'
          none: '#/components/schemas/None'
      required:
        - operator
        - values
    Is:
      type: object
      allOf:
        - type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/ConditionValue'
          example:
            operator: is
            values:
              - Alice
              - Bob
        - $ref: '#/components/schemas/Condition'
    IsNot:
      type: object
      allOf:
        - type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/ConditionValue'
          example:
            operator: is_not
            values:
              - Alice
              - Bob
        - $ref: '#/components/schemas/Condition'
    IsNull:
      type: object
      allOf:
        - type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/ConditionValue'
              minItems: 0
              maxItems: 0
          example:
            operator: is_null
            values: []
        - $ref: '#/components/schemas/Condition'
    NotNull:
      type: object
      allOf:
        - type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/ConditionValue'
              minItems: 0
              maxItems: 0
          example:
            operator: not_null
            values: []
        - $ref: '#/components/schemas/Condition'
    GreaterThan:
      type: object
      allOf:
        - type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/ConditionValue'
              minItems: 1
              maxItems: 1
          example:
            operator: greater_than
            values:
              - 3
        - $ref: '#/components/schemas/Condition'
    LessThan:
      type: object
      allOf:
        - type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/ConditionValue'
              minItems: 1
              maxItems: 1
          example:
            operator: less_than
            values:
              - 3
        - $ref: '#/components/schemas/Condition'
    Between:
      type: object
      allOf:
        - type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/ConditionValue'
              minItems: 2
              maxItems: 2
          example:
            operator: between
            values:
              - 3
              - 5
        - $ref: '#/components/schemas/Condition'
    MatchesUserAttribute:
      type: object
      allOf:
        - type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/ConditionValue'
              minItems: 1
          example:
            operator: matches_user_attribute
            values:
              - h_email
        - $ref: '#/components/schemas/Condition'
    Contains:
      type: object
      allOf:
        - type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/ConditionValue'
              minItems: 1
          example:
            operator: contains
            values:
              - a
              - b
        - $ref: '#/components/schemas/Condition'
    DoesNotContain:
      type: object
      allOf:
        - type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/ConditionValue'
              minItems: 1
          example:
            operator: does_not_contain
            values:
              - a
              - b
        - $ref: '#/components/schemas/Condition'
    StartsWith:
      type: object
      allOf:
        - type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/ConditionValue'
              minItems: 1
          example:
            operator: starts_with
            values:
              - a
              - b
        - $ref: '#/components/schemas/Condition'
    EndsWith:
      type: object
      allOf:
        - type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/ConditionValue'
              minItems: 1
          example:
            operator: ends_with
            values:
              - a
              - b
        - $ref: '#/components/schemas/Condition'
    IsTrue:
      type: object
      allOf:
        - type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/ConditionValue'
              minItems: 0
              maxItems: 0
          example:
            operator: is_true
            values: []
        - $ref: '#/components/schemas/Condition'
    IsFalse:
      type: object
      allOf:
        - type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/ConditionValue'
              minItems: 0
              maxItems: 0
          example:
            operator: is_false
            values: []
        - $ref: '#/components/schemas/Condition'
    DateTime:
      type: string
      enum:
        - year
        - quarter
        - month
        - week
        - day
        - hour
        - minute
    Last:
      type: object
      allOf:
        - type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/ConditionValue'
              minItems: 1
              maxItems: 1
            modifier:
              $ref: '#/components/schemas/DateTime'
          example:
            operator: last
            values:
              - 2
            modifier: day
        - $ref: '#/components/schemas/Condition'
    Next:
      type: object
      allOf:
        - type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/ConditionValue'
              minItems: 1
              maxItems: 1
            modifier:
              $ref: '#/components/schemas/DateTime'
          example:
            operator: next
            values:
              - 2
            modifier: day
        - $ref: '#/components/schemas/Condition'
    Before:
      type: object
      allOf:
        - type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/ConditionValue'
              minItems: 1
              maxItems: 1
          example:
            operator: before
            values:
              - 2020-03-21
        - $ref: '#/components/schemas/Condition'
    After:
      type: object
      allOf:
        - type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/ConditionValue'
              minItems: 1
              maxItems: 1
          example:
            operator: after
            values:
              - 2020-03-21
        - $ref: '#/components/schemas/Condition'
    Matches:
      type: object
      allOf:
        - type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/ConditionValue'
              minItems: 1
              maxItems: 1
          example:
            operator: matches
            values:
              - last 3 days
        - $ref: '#/components/schemas/Condition'
    TransformPopRelative:
      type: object
      allOf:
        - type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/ConditionValue'
              minItems: 1
              maxItems: 1
            modifier:
              $ref: '#/components/schemas/DateTime'
          example:
            operator: transform_pop_relative
            values:
              - 1
            modifier: year
        - $ref: '#/components/schemas/Condition'
    TransformPopAbsolute:
      type: object
      allOf:
        - type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/ConditionValue'
              minItems: 2
              maxItems: 2
          example:
            operator: transform_pop_absolute
            values:
              - 2020-07-05
              - 2021-02-19
            modifier: year
        - $ref: '#/components/schemas/Condition'
    TransformPopNone:
      type: object
      allOf:
        - type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/ConditionValue'
              minItems: 0
              maxItems: 0
          example:
            operator: transform_pop_none
            values: null
        - $ref: '#/components/schemas/Condition'
    TransformDateDrill:
      type: object
      allOf:
        - type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/ConditionValue'
              minItems: 1
              maxItems: 1
          example:
            operator: transform_date_drill
            values:
              - datetrunc month
        - $ref: '#/components/schemas/Condition'
    None:
      type: object
      allOf:
        - type: object
          properties:
            values:
              type: array
              items:
                $ref: '#/components/schemas/ConditionValue'
              minItems: 0
              maxItems: 0
          example:
            operator: none
            values: []
        - type: object
          properties:
            operator:
              type: string
              description: >-
                None condition applied. This Condition will be skipped and have
                no effect on the exploration.
        - $ref: '#/components/schemas/Condition'
    DynamicFilterPreset:
      type: object
      properties:
        id:
          type: integer
        dynamic_filter_id:
          anyOf:
            - type: string
            - type: integer
        preset_condition:
          $ref: '#/components/schemas/Condition'
        public_hidden:
          type: boolean
          default: false
          description: >-
            (Only available in Shareable Links)


            Whether the associated filter should be hidden to public users.


            Note: This is an UI-only setting and should not be used for
            permission control.
          nullable: true
      required:
        - dynamic_filter_id
        - preset_condition
    DataScheduleEmailDest:
      type: object
      allOf:
        - type: object
          properties:
            title:
              type: string
              nullable: true
              description: >-
                Email subject. In default, source title will be used if title is
                not available. Dynamic title: [Dynamic
                Variables](/docs/delivery/email-schedules/#dynamic-variables).
            recipients:
              type: array
              items:
                type: string
                format: email
            options:
              type: object
              properties:
                preview:
                  type: boolean
                  description: Include preview inside email content.
                include_header:
                  type: boolean
                  description: Include column headers in Excel, CSV attachments.
                include_report_link:
                  type: boolean
                  description: Include link to report / dashboard.
                include_filters:
                  type: boolean
                  description: Include filters info in email content.
                dont_send_when_empty:
                  type: boolean
                  description: Only send the email when at least one widget has data.
                body_text:
                  type: string
                  nullable: true
                  description: Text content inside email body.
                selected_type:
                  type: string
                  nullable: true
                  description: >-
                    Specifies the type of content to be exported, which
                    determines how the data will be structured in the export
                    output.
                  enum:
                    - dashboard
                    - tab
                    - widget
                selected_values:
                  type: array
                  items:
                    anyOf:
                      - type: string
                      - type: integer
                  nullable: true
                  description: >-
                    An array of selected export option values, which can include
                    tab names or widget IDs.
                attachment_formats:
                  type: array
                  items:
                    $ref: '#/components/schemas/DataScheduleAttachmentFormat'
        - $ref: '#/components/schemas/DataScheduleDest'
      required:
        - recipients
    DataScheduleEmailSubscriptionDest:
      type: object
      properties:
        recipients:
          type: array
          items:
            type: string
            format: email
        options:
          type: object
          properties:
            type:
              type: string
              enum:
                - EmailSubscriptionDest
            preview:
              type: boolean
              description: Include preview inside email content.
            include_header:
              type: boolean
              description: Include column headers in Excel, CSV attachments.
            include_report_link:
              type: boolean
              description: Include link to report / dashboard.
            include_filters:
              type: boolean
              description: Include filters info in email content.
            dont_send_when_empty:
              type: boolean
              description: Only send the email when at least one widget has data.
            body_text:
              type: string
              nullable: true
              description: Text content inside email body.
            selected_type:
              type: string
              nullable: true
              description: >-
                Specifies the type of content to be exported, which determines
                how the data will be structured in the export output.
              enum:
                - dashboard
                - tab
                - widget
            selected_values:
              type: array
              items:
                anyOf:
                  - type: string
                  - type: integer
              nullable: true
              description: >-
                An array of selected export option values, which can include tab
                names or widget IDs.
            attachment_formats:
              type: array
              items:
                $ref: '#/components/schemas/DataScheduleAttachmentFormat'
    DataScheduleSftpDest:
      type: object
      allOf:
        - type: object
          properties:
            dashboard_widget_id:
              anyOf:
                - $ref: '#/components/schemas/NullableString'
                - $ref: '#/components/schemas/NullableNumber'
              description: >-
                The widget whose data will be exported to the SFTP destination.
                Only available for dashboard data schedules.
            data_source_id:
              type: integer
            file_path:
              type: string
            format:
              $ref: '#/components/schemas/DataScheduleDataAttachmentFormat'
            include_header:
              type: boolean
              description: Include column headers in the attachment.
            separator:
              type: string
              description: CSV separator.
              nullable: true
              enum:
                - ','
                - '|'
                - "\t"
                - ^
                - ;
        - $ref: '#/components/schemas/DataScheduleDest'
      required:
        - data_source_id
        - file_path
    DataScheduleSlackDest:
      type: object
      allOf:
        - type: object
          properties:
            hide_filters:
              type: boolean
            message:
              type: string
              nullable: true
            slack_channels:
              type: array
              items:
                type: object
            title:
              type: string
              nullable: true
        - $ref: '#/components/schemas/DataScheduleDest'
      required:
        - slack_channels
    DataScheduleGoogleSheetDest:
      type: object
      allOf:
        - type: object
          properties:
            sheet_url:
              type: string
            sheet_title:
              type: string
        - $ref: '#/components/schemas/DataScheduleDest'
      required:
        - sheet_url
        - sheet_title
    DataScheduleAttachmentFormat:
      description: Attachment format.
      type: string
      enum:
        - csv
        - xlsx
        - excel
        - pdf
        - png
        - excel_dashboard
        - csv_formatted_data
    DataScheduleDest:
      type: object
      properties:
        type:
          type: string
          enum:
            - EmailDest
            - EmailSubscriptionDest
            - SlackDest
            - SftpDest
            - GsheetDest
      required:
        - type
    NullableString:
      type: string
      nullable: true
    NullableNumber:
      type: integer
      nullable: true
    DataScheduleDataAttachmentFormat:
      description: Attachment format.
      type: string
      enum:
        - csv
        - xlsx
    DataSchedule:
      type: object
      properties:
        id:
          type: integer
          description: Unique Data Schedule identifier.
        title:
          type: string
          nullable: true
        source_type:
          type: string
          enum:
            - Dashboard
            - QueryReport
        source_id:
          type: integer
        schedule:
          $ref: '#/components/schemas/Schedule'
        dynamic_filter_presets:
          type: array
          items:
            $ref: '#/components/schemas/DynamicFilterPreset'
        dest:
          type: object
          oneOf:
            - $ref: '#/components/schemas/DataScheduleEmailDest'
            - $ref: '#/components/schemas/DataScheduleEmailSubscriptionDest'
            - $ref: '#/components/schemas/DataScheduleSftpDest'
            - $ref: '#/components/schemas/DataScheduleSlackDest'
            - $ref: '#/components/schemas/DataScheduleGoogleSheetDest'
          discriminator:
            propertyName: type
            mapping:
              EmailDest: '#/components/schemas/DataScheduleEmailDest'
              EmailSubscriptionDest: '#/components/schemas/DataScheduleEmailSubscriptionDest'
              SftpDest: '#/components/schemas/DataScheduleSftpDest'
              SlackDest: '#/components/schemas/DataScheduleSlackDest'
              GsheetDest: '#/components/schemas/DataScheduleGoogleSheetDest'
      required:
        - source_type
        - source_id
        - dest
        - schedule
    PaginationCursor:
      type: object
      properties:
        cursors:
          type: object
          properties:
            previous:
              type: string
              nullable: true
              description: >-
                Put this value in the `before` parameter to go to previous page.
                Current page is the first page if this value is null.
            next:
              type: string
              nullable: true
              description: >-
                Put this value in the `after` parameter to go to next page.
                Current page is the last page if this value is null.
      required:
        - cursors
    BaseError:
      type: object
      properties:
        type:
          type: string
          enum:
            - BaseError
            - RecordError
            - InvalidParameterError
            - AuthError
            - MaintenanceError
            - SubscriptionError
            - PermissionDeniedError
            - InternalHolisticsError
            - RateLimitExceedError
            - InvalidOperationError
            - InvalidEmailsInvitationError
        message:
          type: string
        details:
          type: object
          description: Details about this error.
          properties:
            description:
              type: string
            docs:
              type: string
      required:
        - type
        - message
    Message:
      type: object
      properties:
        message:
          type: string
      required:
        - message
    JobStatus:
      type: object
      properties:
        status:
          type: string
          enum:
            - created
            - queued
            - running
            - success
            - failure
            - cancelled
            - cancelling
            - already_existed
            - flow_pending
    AsyncResult:
      type: object
      properties:
        job:
          type: object
          allOf:
            - type: object
              properties:
                id:
                  type: integer
                existing_job_id:
                  type: integer
                  nullable: true
                  description: >-
                    The ID of an existing job. Only present if the job has
                    status `already_existed`.
            - $ref: '#/components/schemas/JobStatus'
      required:
        - job
    FilterSource:
      type: object
      properties:
        source_type:
          type: string
          enum:
            - ManualFilterSource
            - DmFieldFilterSource
      required:
        - source_type
    ManualFilterSource:
      type: object
      allOf:
        - type: object
          properties:
            manual_options:
              type: array
              items:
                type: object
                properties:
                  value:
                    oneOf:
                      - type: string
                      - type: integer
        - $ref: '#/components/schemas/FilterSource'
    FieldPath:
      anyOf:
        - type: object
          properties:
            field_name:
              type: string
            model_id:
              type: integer
              nullable: true
            data_set_id:
              type: integer
              nullable: true
            is_metric:
              type: boolean
              nullable: true
        - type: object
          properties:
            field_name:
              type: string
            model_id:
              type: string
              nullable: true
            data_set_id:
              type: integer
              nullable: true
            is_metric:
              type: boolean
              nullable: true
    DmFieldFilterSource:
      type: object
      allOf:
        - type: object
          properties:
            data_set_id:
              type: integer
            field_path:
              $ref: '#/components/schemas/FieldPath'
        - $ref: '#/components/schemas/FilterSource'
    DynamicFilterDefinition:
      type: object
      properties:
        id:
          type: integer
          nullable: true
        label:
          type: string
        default_condition:
          $ref: '#/components/schemas/Condition'
        filter_type:
          type: string
          enum:
            - number
            - string
            - date
            - boolean
            - pop
            - date_drill
        input_type:
          type: string
          nullable: true
          enum:
            - single_select
            - multi_operator
            - single_select_with_empty_value
            - null
        is_sharable:
          type: boolean
        filter_source:
          type: object
          oneOf:
            - $ref: '#/components/schemas/ManualFilterSource'
            - $ref: '#/components/schemas/DmFieldFilterSource'
          discriminator:
            propertyName: source_type
        constraints:
          type: object
          nullable: true
    DynamicFilterMapping:
      type: object
      properties:
        id:
          type: integer
        viz_conditionable_id:
          type: integer
          description: The id of DashboardWidget that this filter will apply to.
        viz_conditionable_type:
          type: string
          enum:
            - DashboardWidget
        field_path:
          $ref: '#/components/schemas/FieldPath'
        aggregation:
          type: string
          nullable: true
        permissions:
          type: object
          properties:
            crud:
              type: boolean
    DynamicFilter:
      type: object
      properties:
        id:
          anyOf:
            - type: integer
            - type: string
        order:
          type: integer
        uname:
          type: string
        permissions:
          type: object
          properties:
            read:
              type: boolean
            crud:
              type: boolean
            use:
              type: boolean
        definition:
          $ref: '#/components/schemas/DynamicFilterDefinition'
        drillthrough_enabled:
          type: boolean
        mappings:
          type: array
          items:
            $ref: '#/components/schemas/DynamicFilterMapping'
    Dashboard:
      type: object
      properties:
        id:
          type: integer
        owner_id:
          type: integer
        title:
          type: string
        category_id:
          type: integer
        version:
          type: integer
          enum:
            - 1
            - 3
            - 4
        dynamic_filters:
          type: array
          items:
            $ref: '#/components/schemas/DynamicFilter'
        widgets:
          type: array
          items:
            $ref: '#/components/schemas/DashboardWidget'
        url:
          type: string
        tags:
          type: array
          items:
            type: string
          nullable: true
        embed_info:
          $ref: '#/components/schemas/DashboardEmbedInfo'
    VizType:
      type: string
      enum:
        - data_table
        - area_chart
        - line_chart
        - bar_chart
        - column_chart
        - pie_chart
        - scatter_chart
        - pyramid_chart
        - funnel_chart
        - bubble_chart
        - retention_heatmap
        - pivot_table
        - geo_heatmap
        - conversion_funnel
        - combination_chart
        - metric_kpi
        - radar_chart
        - wordcloud
        - solid_gauge
        - filled_map
        - point_map
        - metric_sheet
        - new_conversion_funnel
        - heatmap
    VizSetting:
      type: object
      properties:
        viz_type:
          $ref: '#/components/schemas/VizType'
        source_id:
          type: integer
        adhoc_fields:
          type: array
          nullable: true
          items:
            type: object
        fields:
          type: object
        settings:
          type: object
        format:
          type: object
        filters:
          type: array
          nullable: true
          items:
            type: object
        hashid:
          type: string
          nullable: true
        custom_chart_id:
          type: integer
          nullable: true
    PersonalItem:
      type: object
      nullable: true
      properties:
        id:
          type: integer
        owner_id:
          type: integer
        category_id:
          type: integer
    QueryReport:
      type: object
      properties:
        id:
          type: integer
        title:
          type: string
        data_set_id:
          type: integer
        viz_setting:
          $ref: '#/components/schemas/VizSetting'
        data_source_id:
          type: integer
        owner_id:
          type: integer
        category_id:
          type: integer
        is_adhoc:
          type: boolean
        personal_item:
          $ref: '#/components/schemas/PersonalItem'
          x-holistics-internal: true
    Viz:
      type: object
      properties:
        dataset_id:
          type: number
        viz_setting:
          $ref: '#/components/schemas/VizSetting'
      required:
        - dataset_id
        - viz_setting
    VizBlock:
      type: object
      properties:
        type:
          type: string
          enum:
            - VizBlock
        uname:
          type: string
        label:
          nullable: true
          type: string
        description:
          nullable: true
          type: string
        viz:
          $ref: '#/components/schemas/Viz'
    DashboardWidget:
      type: object
      properties:
        id:
          anyOf:
            - type: string
            - type: integer
        source_id:
          anyOf:
            - type: string
            - type: integer
        source_type:
          type: string
          enum:
            - QueryReport
            - QueryMetric
            - Text
            - VizBlock
        source_title:
          type: string
        permissions:
          type: object
          properties:
            can_explore:
              type: boolean
              description: Current User can explore the Widget's Data Set.
            can_export:
              type: boolean
              description: Current User can use the Export Feature on this Widget.
            can_export_data:
              type: boolean
              description: >-
                Current User can export data as csv, xlsx. This is a
                sub-permission of the `export` permission.
          required:
            - can_explore
            - can_export
            - can_export_data
        url:
          type: string
        dashboard:
          $ref: '#/components/schemas/Dashboard'
        query_report:
          $ref: '#/components/schemas/QueryReport'
        viz_block_definition:
          x-holistics-internal: true
          $ref: '#/components/schemas/VizBlock'
      required:
        - id
        - source_id
        - source_type
        - permissions
    label:
      type: string
    filter_type:
      type: string
      enum:
        - number
        - string
        - date
        - boolean
        - pop
        - date_drill
    input_type:
      type: string
      nullable: true
      enum:
        - single_select
        - multi_operator
        - single_select_with_empty_value
        - null
    filter_source:
      type: object
      oneOf:
        - $ref: '#/components/schemas/ManualFilterSource'
        - $ref: '#/components/schemas/DmFieldFilterSource'
      discriminator:
        propertyName: source_type
    constraints:
      type: object
      nullable: true
    AsCodeDynamicFilterDefinition:
      type: object
      properties:
        label:
          nullable: true
          $ref: '#/components/schemas/label'
        default_condition:
          type: object
          nullable: true
        filter_type:
          $ref: '#/components/schemas/filter_type'
        input_type:
          nullable: true
          $ref: '#/components/schemas/input_type'
        is_sharable:
          type: boolean
        filter_source:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/filter_source'
        constraints:
          $ref: '#/components/schemas/constraints'
    FilterBlock:
      type: object
      properties:
        type:
          type: string
          enum:
            - FilterBlock
        uname:
          type: string
        label:
          nullable: true
          type: string
        filter:
          $ref: '#/components/schemas/AsCodeDynamicFilterDefinition'
    TextBlock:
      type: object
      properties:
        type:
          type: string
          enum:
            - TextBlock
        uname:
          type: string
        content:
          type: string
    PopBlock:
      type: object
      properties:
        type:
          type: string
          enum:
            - PopBlock
        uname:
          type: string
        label:
          nullable: true
          type: string
        settings:
          nullable: true
          type: object
        description:
          nullable: true
          type: string
        pop:
          $ref: '#/components/schemas/AsCodeDynamicFilterDefinition'
    DateDrillBlock:
      type: object
      properties:
        type:
          type: string
          enum:
            - DateDrillBlock
        uname:
          type: string
        label:
          nullable: true
          type: string
        date_drill:
          $ref: '#/components/schemas/AsCodeDynamicFilterDefinition'
    Position:
      type: object
      properties:
        x:
          type: number
        'y':
          type: number
        w:
          type: number
        h:
          type: number
    BlockPosition:
      type: object
      properties:
        position:
          $ref: '#/components/schemas/Position'
        layer:
          type: number
    CanvasLayout:
      type: object
      properties:
        type:
          type: string
          enum:
            - CanvasLayout
        uname:
          type: string
        label:
          nullable: true
          type: string
        width:
          nullable: true
          type: number
        height:
          nullable: true
          type: number
        margin:
          nullable: true
          type: number
        blocks:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/BlockPosition'
    LinearLayout:
      type: object
      properties:
        type:
          type: string
          enum:
            - LinearLayout
        uname:
          type: string
        label:
          nullable: true
          type: string
    FilterInteraction:
      type: object
      properties:
        type:
          type: string
          enum:
            - FilterInteraction
            - DateDrillInteraction
        from:
          type: string
        to:
          type: string
        field_path:
          $ref: '#/components/schemas/FieldPath'
    CrossFilterInteraction:
      type: object
      properties:
        type:
          type: string
          enum:
            - CrossFilterInteraction
        from:
          type: string
        to:
          type: string
    DashboardDefinition:
      type: object
      x-holistics-internal: true
      nullable: true
      properties:
        title:
          type: string
        description:
          type: string
        owner:
          type: string
          nullable: true
        blocks:
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/VizBlock'
              - $ref: '#/components/schemas/FilterBlock'
              - $ref: '#/components/schemas/TextBlock'
              - $ref: '#/components/schemas/PopBlock'
              - $ref: '#/components/schemas/DateDrillBlock'
        views:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/CanvasLayout'
              - $ref: '#/components/schemas/LinearLayout'
        interactions:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/FilterInteraction'
              - $ref: '#/components/schemas/CrossFilterInteraction'
    DashboardEmbedInfo:
      type: object
      nullable: true
      description: >-
        Embed info of the Dashboard. Can be null if Dashboard has not generated
        Embed Link.
      properties:
        hash_code:
          type: string
        secret_key:
          type: string
    UserRole:
      description: User role.
      type: string
      enum:
        - user
        - explorer
        - analyst
        - admin
        - growth_admin
        - it_admin
    UserSettings:
      type: object
      description: Personal settings (AI preferences, etc.).
      properties:
        personal:
          type: object
          properties:
            ai:
              type: object
              properties:
                auto_generate_charts:
                  description: Automatically generate charts for query results.
                  type: boolean
                  nullable: true
                include_past_conversations:
                  description: Include past conversations.
                  type: boolean
                  nullable: true
    User:
      type: object
      properties:
        id:
          type: integer
        email:
          type: string
        name:
          type: string
          nullable: true
        initials:
          type: string
        role:
          $ref: '#/components/schemas/UserRole'
        is_deleted:
          type: boolean
        is_activated:
          type: boolean
        has_authentication_token:
          type: boolean
        allow_authentication_token:
          type: boolean
        enable_export_data:
          type: boolean
        current_sign_in_at:
          type: string
          format: date-time
          nullable: true
        last_sign_in_at:
          type: string
          format: date-time
          nullable: true
        created_at:
          type: string
          format: date-time
        title:
          type: string
          nullable: true
        job_title:
          type: string
          nullable: true
        settings:
          $ref: '#/components/schemas/UserSettings'
      required:
        - id
        - email
        - initials
        - role
        - is_deleted
        - is_activated
        - has_authentication_token
        - allow_authentication_token
        - enable_export_data
        - created_at
    DashboardStats:
      type: object
      x-holistics-internal: true
      properties:
        id:
          type: integer
        description:
          type: string
        created_at:
          type: string
        created_user:
          $ref: '#/components/schemas/User'
        last_edited_at:
          type: string
          nullable: true
        last_edited_user:
          anyOf:
            - type: object
              nullable: true
            - $ref: '#/components/schemas/User'
        frequent_viewers:
          type: array
          items:
            $ref: '#/components/schemas/User'
        favourites_count:
          type: integer
          description: The total favourities of dashboard.
        views_count:
          type: integer
          description: The total views of dashboard.
    DynamicFilterCondition:
      type: object
      description: Selected Condition on a DynamicFilter.
      properties:
        dynamic_filter_id:
          anyOf:
            - type: integer
            - type: string
        condition:
          $ref: '#/components/schemas/Condition'
      required:
        - dynamic_filter_id
        - condition
    DashboardCategory:
      type: string
      description: The category type to place the dashboard in
      enum:
        - ReportCategory
        - EmbedOrgWorkspace
        - EmbedPersonalWorkspace
        - PersonalCategory
    Job:
      type: object
      allOf:
        - type: object
          properties:
            id:
              type: integer
            user_id:
              type: integer
            start_time:
              type: string
              nullable: true
            end_time:
              type: string
              nullable: true
            cancellable:
              type: boolean
            last_error_log:
              description: The last ERROR-level log of the Job.
              type: string
              nullable: true
            data_source_stats:
              description: >
                Data Source statistics collected when running queries in this
                Job.  


                Note: Only available in Jobs which run queries on Data Sources
                that

                * support Data Source statistics

                * and have Holistics Canal enabled


                Otherwise, this field will be `null`.
              type: array
              nullable: true
              items:
                type: object
                properties:
                  id:
                    description: |
                      Identifier of the execution unit in the Data Source.
                      * BigQuery: BigQuery Job ID
                      * Amazon Athena: Athena query ID
                    type: string
                  cost:
                    description: Cost of execution in the Data Source
                    type: string
                  cost_unit:
                    type: string
                example:
                  id: XoBDpSVo2mMsHiQHNrPtEtfnozm
                  cost: 1681980
                  cost_unit: B
            source:
              description: Information of the source where the Job is created
              type: object
              nullable: true
              properties:
                type:
                  type: string
                id:
                  anyOf:
                    - type: string
                    - type: integer
                  nullable: true
                action:
                  type: string
                details:
                  description: Additional details about the Job source, if any
                  type: object
                  nullable: true
              example:
                type: Dashboard
                id: '1'
                action: view_viz
                details:
                  block_id: v1
                  block_type: VizBlock
                  block_display_title: Yearly Report
            existing_job_id:
              description: >
                The ID of another existing Pending/Starting/Running job.

                For more information, see [Job
                duplication](/docs/api/jobs#job-duplication).


                Note: Only available for Jobs with status `already_existed`.
                Otherwise, this field will be `null`.
              type: integer
              nullable: true
        - $ref: '#/components/schemas/JobStatus'
    JobLog:
      type: object
      properties:
        level:
          type: string
          enum:
            - INFO
            - ERROR
        message:
          type: string
        timestamp:
          type: string
          format: date-time
          x-faker: date.recent
    WithData:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
        error:
          type: string
          description: The error value will always be null
          nullable: true
        result:
          type: object
          discriminator:
            propertyName: type
            mapping:
              AmlStudio::Publish.call: '#/components/schemas/SubmitDeployResult'
              AmlStudio::RemoteObjectValidation.call: '#/components/schemas/SubmitValidateResult'
              DataModel.execute_model_query: '#/components/schemas/SubmitQueryResult'
          oneOf:
            - $ref: '#/components/schemas/SubmitDeployResult'
            - $ref: '#/components/schemas/SubmitValidateResult'
            - $ref: '#/components/schemas/SubmitQueryResult'
    EmptyData:
      type: object
      properties:
        status:
          type: string
          enum:
            - created
            - queued
            - running
            - cancelled
            - cancelling
            - already_existed
        error:
          type: string
          nullable: true
        result:
          description: The result value will always be null
          type: object
          nullable: true
    WithFailureData:
      type: object
      properties:
        status:
          type: string
          enum:
            - failure
        error:
          type: string
          description: Error class name
        result:
          type: object
          discriminator:
            propertyName: type
            mapping:
              AmlStudio::Publish.call: '#/components/schemas/FailedDeployResult'
              AmlStudio::RemoteDeploy.call: '#/components/schemas/FailedDeployResult'
              AmlStudio::RemoteObjectValidation.call: '#/components/schemas/FailedValidateResult'
          oneOf:
            - $ref: '#/components/schemas/FailedDeployResult'
            - $ref: '#/components/schemas/FailedValidateResult'
    SuccessDeploy:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
        preparing_production_job:
          type: object
          allOf:
            - type: object
              properties:
                job_id:
                  type: integer
            - $ref: '#/components/schemas/JobStatus'
        objects_status:
          type: object
          properties:
            id:
              type: integer
              description: id of object in Reporting
            type:
              type: string
              enum:
                - Dataset
                - Dashboard
            uname:
              type: string
              description: uname of object in Modeling
            title:
              type: string
            status:
              type: string
              enum:
                - created
                - updated
        target_commit:
          type: string
          description: target commit of the deployment
    SubmitDeployResult:
      type: object
      properties:
        type:
          type: string
          enum:
            - AmlStudio::Publish.call
        data:
          type: object
          discriminator:
            propertyName: status
            mapping:
              success: '#/components/schemas/SuccessDeploy'
          oneOf:
            - $ref: '#/components/schemas/SuccessDeploy'
    SuccessValidate:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
    SubmitValidateResult:
      type: object
      properties:
        type:
          type: string
          enum:
            - AmlStudio::RemoteObjectValidation.call
        data:
          type: object
          discriminator:
            propertyName: status
            mapping:
              success: '#/components/schemas/SuccessValidate'
          oneOf:
            - $ref: '#/components/schemas/SuccessValidate'
    Data:
      type: object
      properties:
        values:
          type: array
          description: List of result rows
          items:
            type: array
            items:
              type: string
          example:
            - - refunded
              - '181'
            - - cancelled
              - '800'
            - - delivered
              - '2317'
        meta:
          type: object
          properties:
            page:
              type: integer
              example: 1
            page_size:
              type: integer
              example: 20
            num_rows:
              type: integer
              example: 3
        fields:
          type: array
          items:
            type: string
          example:
            - Status
            - CountD of Id
      required:
        - values
        - meta
        - fields
    SubmitQueryResult:
      type: object
      properties:
        type:
          type: string
          enum:
            - DataModel.execute_model_query
        data:
          $ref: '#/components/schemas/Data'
    SyntaxError:
      type: object
      properties:
        diagnostics:
          type: array
          items:
            type: object
            properties:
              category:
                type: string
                enum:
                  - Error
              code:
                type: integer
              message:
                type: string
              file_path:
                type: string
              start:
                type: integer
                description: start offset
              end:
                type: integer
                description: end offset
    DatasetMapping:
      type: object
      properties:
        message:
          type: string
        is_orphaned:
          type: boolean
        orphaned_dataset:
          type: array
          items:
            type: object
        deploying_dataset:
          type: array
          items:
            type: object
    DashboardMapping:
      type: array
      items:
        type: object
        properties:
          type:
            type: string
            enum:
              - Dataset
              - Dashboard
          id:
            type: integer
          uname:
            type: string
          title:
            type: string
          dependencies:
            type: array
            items:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - EmbedLink
                    - ShareableLink
                id:
                  type: integer
    DashboardDeployment:
      type: string
      description: Error message
    AmlServerError:
      type: object
      properties:
        message:
          type: string
          description: error message
    FailedDeploy:
      type: object
      nullable: true
      properties:
        status:
          type: string
          enum:
            - error
        error_type:
          type: string
          enum:
            - syntax_error
            - dataset_mapping
            - dashboard_mapping
            - dashboard_deployment
            - aml_server_error
        error_details:
          oneOf:
            - $ref: '#/components/schemas/SyntaxError'
            - $ref: '#/components/schemas/DatasetMapping'
            - $ref: '#/components/schemas/DashboardMapping'
            - $ref: '#/components/schemas/DashboardDeployment'
            - $ref: '#/components/schemas/AmlServerError'
        target_commit:
          type: string
          description: target commit of the deployment
    FailedDeployResult:
      type: object
      properties:
        type:
          type: string
          enum:
            - AmlStudio::Publish.call
            - AmlStudio::RemoteDeploy.call
        data:
          $ref: '#/components/schemas/FailedDeploy'
          nullable: true
    FailedValidate:
      type: object
      properties:
        status:
          type: string
          enum:
            - error
        errors:
          description: List of errors
          type: array
          items:
            type: object
    FailedValidateResult:
      type: object
      properties:
        type:
          type: string
          enum:
            - AmlStudio::RemoteObjectValidation.call
        data:
          $ref: '#/components/schemas/FailedValidate'
          nullable: true
    JobResult:
      type: object
      discriminator:
        propertyName: status
        mapping:
          success: '#/components/schemas/WithData'
          created: '#/components/schemas/EmptyData'
          queued: '#/components/schemas/EmptyData'
          running: '#/components/schemas/EmptyData'
          failure: '#/components/schemas/WithFailureData'
          cancelled: '#/components/schemas/EmptyData'
          cancelling: '#/components/schemas/EmptyData'
          already_existed: '#/components/schemas/EmptyData'
      oneOf:
        - $ref: '#/components/schemas/WithData'
        - $ref: '#/components/schemas/WithFailureData'
        - $ref: '#/components/schemas/EmptyData'
    DataAlertDest:
      type: object
      properties:
        type:
          type: string
          enum:
            - EmailDest
            - SlackDest
            - WebhookDest
      required:
        - type
    DataAlertEmailDest:
      type: object
      allOf:
        - type: object
          properties:
            title:
              type: string
              description: >-
                Email subject. In default, source title will be used if title is
                not available. Dynamic title: [Dynamic
                Variables](/docs/delivery/email-schedules/#dynamic-variables).
            recipients:
              type: array
              items:
                type: string
                format: email
            options:
              type: object
              properties:
                body_text:
                  type: string
                  nullable: true
                  description: Text content inside email body.
        - $ref: '#/components/schemas/DataAlertDest'
      required:
        - recipients
    DataAlertSlackDest:
      type: object
      allOf:
        - type: object
          properties:
            title:
              type: string
              description: Slack message title.
            message:
              type: string
            slack_channels:
              description: Destination Slack channels where the Data Alert will be sent to.
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
        - $ref: '#/components/schemas/DataAlertDest'
      required:
        - slack_channels
    DataAlertWebhookDest:
      type: object
      allOf:
        - type: object
          properties:
            endpoint:
              type: string
              description: Webhook endpoint.
        - $ref: '#/components/schemas/DataAlertDest'
      required:
        - endpoint
    VizCondition:
      type: object
      properties:
        id:
          type: integer
          description: Unique viz condition identifier.
        field_path:
          $ref: '#/components/schemas/FieldPath'
        aggregation:
          description: >-
            The aggregation that will be applied on the field when processing
            the condition.
          type: string
          nullable: true
          enum:
            - sum
            - avg
            - max
            - min
            - running sum
            - running avg
            - running max
            - running min
            - count
            - count distinct
            - median
            - stdev
            - stdevp
            - var
            - varp
            - custom
        transformation:
          description: >-
            The transformation that will be applied on the field when processing
            the condition.
          type: string
          nullable: true
          enum:
            - datetrunc year
            - datetrunc quarter
            - datetrunc month
            - datetrunc week
            - datetrunc day
            - datetrunc hour
            - datetrunc minute
        condition:
          $ref: '#/components/schemas/Condition'
      required:
        - field_path
        - condition
    DataAlert:
      type: object
      properties:
        id:
          type: integer
          description: Unique Data Schedule identifier.
        title:
          type: string
        source_id:
          anyOf:
            - type: integer
            - type: string
        source_type:
          type: string
          enum:
            - DashboardWidget
            - VizBlock
        dest:
          type: string
          oneOf:
            - $ref: '#/components/schemas/DataAlertEmailDest'
            - $ref: '#/components/schemas/DataAlertSlackDest'
            - $ref: '#/components/schemas/DataAlertWebhookDest'
          discriminator:
            propertyName: type
            mapping:
              EmailDest: '#/components/schemas/DataAlertEmailDest'
              SlackDest: '#/components/schemas/DataAlertSlackDest'
              WebhookDest: '#/components/schemas/DataAlertWebhookDest'
        dynamic_filter_presets:
          type: array
          items:
            $ref: '#/components/schemas/DynamicFilterPreset'
        viz_conditions:
          description: Alert conditions for Data Alert.
          nullable: true
          type: array
          items:
            $ref: '#/components/schemas/VizCondition'
        schedule:
          $ref: '#/components/schemas/Schedule'
      required:
        - source_type
        - source_id
        - dest
        - schedule
        - dynamic_filter_presets
    DataSource:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        dbtype:
          type: string
        settings:
          type: object
          properties:
            require_ssl:
              type: boolean
            query_timeout:
              type: integer
              nullable: true
            enable_schema_info:
              type: boolean
            use_connection_str:
              type: boolean
            timezone:
              type: string
              description: Timezone name from the IANA database.
        is_sample:
          type: boolean
        is_default:
          type: boolean
    name:
      type: string
    settings:
      type: object
      properties:
        require_ssl:
          type: boolean
        query_timeout:
          type: integer
          nullable: true
        enable_schema_info:
          type: boolean
        use_connection_str:
          type: boolean
        timezone:
          type: string
          description: Timezone name from the IANA database.
    dbconfig:
      type: object
      properties:
        database:
          type: string
          nullable: true
        host:
          type: string
          nullable: true
        port:
          type: string
          nullable: true
        username:
          type: string
          nullable: true
        password:
          type: string
          nullable: true
    DbtManifestLog:
      type: object
      x-holistics-internal: true
      properties:
        id:
          type: integer
          description: Unique dbt log identifier.
        filename:
          type: string
        uploader:
          type: string
        data_source_name:
          type: string
        data_source_type:
          type: string
        uploaded_at:
          type: string
      required:
        - filename
        - source_id
    DbtIntegration:
      type: object
      x-holistics-internal: true
      properties:
        id:
          type: integer
          description: Unique dbt integration identifier.
        uploader:
          type: string
        upload_method:
          type: string
        data_source_name:
          type: string
        data_source_type:
          type: string
        updated_date:
          type: string
    Join:
      type: object
      description: Join data.
      properties:
        id:
          type: integer
          nullable: true
        name:
          type: string
          nullable: true
        link_type:
          type: string
          nullable: true
        join_on:
          type: string
          nullable: true
        data_source_id:
          type: integer
        source_model_id:
          oneOf:
            - type: string
            - type: integer
          nullable: true
        dest_model_id:
          oneOf:
            - type: string
            - type: integer
          nullable: true
        source_model:
          type: object
          nullable: true
          properties:
            id:
              oneOf:
                - type: string
                - type: integer
              nullable: true
            name:
              type: string
        dest_model:
          type: object
          nullable: true
          properties:
            id:
              oneOf:
                - type: string
                - type: integer
              nullable: true
            name:
              type: string
        missing_source_fields:
          description: Fields that is in join but not available in the source model.
          type: array
          nullable: true
          items:
            type: string
        missing_dest_fields:
          description: Fields that is in join but not available in the dest model.
          type: array
          nullable: true
          items:
            type: string
    JoinConfig:
      type: object
      properties:
        id:
          type: integer
          nullable: true
        data_set_id:
          type: integer
          nullable: true
        join_id:
          type: integer
          nullable: true
        active:
          type: boolean
        direction:
          type: string
        join:
          type: object
          nullable: true
          properties:
            name:
              type: string
              nullable: true
            source_model:
              type: string
            dest_model:
              type: string
            link_type:
              type: string
            join_on:
              type: string
              nullable: true
    AggregationType:
      type: string
      enum:
        - avg
        - sum
        - count
        - min
        - max
        - count distinct
        - median
        - stdev
        - stdevp
        - var
        - varp
        - custom
        - not_supported
      nullable: true
    TransformType:
      type: string
      enum:
        - datetrunc year
        - datetrunc quarter
        - datetrunc month
        - datetrunc week
        - datetrunc day
        - datetrunc hour
        - datetrunc minute
      nullable: true
    FieldType:
      type: string
      enum:
        - date
        - datetime
        - number
        - text
        - truefalse
        - duration
        - time
        - composite
        - binary
        - unknown
    SyntaxType:
      type: string
      enum:
        - sql
        - aml
        - aql
        - ''
    DataModelField:
      type: object
      properties:
        aggregation_type:
          $ref: '#/components/schemas/AggregationType'
        custom_label:
          type: string
          nullable: true
        field_format:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        is_custom:
          type: boolean
          nullable: true
        is_custom_measure:
          type: boolean
          nullable: true
        primary_key:
          type: boolean
          nullable: true
        label:
          type: string
        model:
          type: object
          nullable: true
          properties:
            id:
              oneOf:
                - type: string
                - type: integer
            name:
              type: string
        name:
          type: string
        sql:
          type: string
        transform_type:
          $ref: '#/components/schemas/TransformType'
        type:
          $ref: '#/components/schemas/FieldType'
        syntax:
          $ref: '#/components/schemas/SyntaxType'
    DataModel:
      type: object
      properties:
        id:
          oneOf:
            - type: integer
            - type: string
          nullable: true
        data_source_id:
          type: integer
        name:
          type: string
        label:
          type: string
        fields:
          type: array
          items:
            $ref: '#/components/schemas/DataModelField'
        dimensions:
          type: array
          items:
            $ref: '#/components/schemas/DataModelField'
        measures:
          type: array
          items:
            $ref: '#/components/schemas/DataModelField'
        params:
          type: array
          items:
            $ref: '#/components/schemas/DataModelField'
        category_id:
          type: integer
          nullable: true
        metadata:
          type: object
          description: AML metadata from dbt.
        sql:
          type: string
          nullable: true
        table_name:
          type: string
          nullable: true
    DataSet:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        label:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        owner_id:
          type: integer
          nullable: true
        owner:
          type: string
          nullable: true
        tenant_id:
          type: integer
        data_source_id:
          type: integer
        category_id:
          type: integer
          nullable: true
        related_joins:
          type: array
          description: List of join data.
          items:
            $ref: '#/components/schemas/Join'
        join_configs:
          type: array
          items:
            type: object
            $ref: '#/components/schemas/JoinConfig'
        data_models:
          type: array
          items:
            $ref: '#/components/schemas/DataModel'
        permission:
          type: object
          properties:
            can_crud:
              type: boolean
            can_read:
              type: boolean
        uname:
          type: string
        from_aml:
          type: boolean
        project_id:
          type: integer
          nullable: true
        tags:
          type: array
          items:
            type: string
          nullable: true
    AMLDataSet:
      type: object
      allOf:
        - type: object
          properties:
            version:
              type: string
            version_timestamp:
              type: string
            is_frontend_cached:
              type: boolean
            data_models:
              type: array
              items:
                $ref: '#/components/schemas/DataModel'
              nullable: true
        - $ref: '#/components/schemas/DataSet'
    Metric:
      title: DataSetQueryMetric
      type: object
      required:
        - field
      properties:
        id:
          description: >-
            A unique identifier for this metric. Use this ID to reference the
            metric in the order-by clause.
          type: string
        field:
          type: string
        aggregation:
          description: >-
            The aggregation that will be applied on the field when processing
            the condition.
          type: string
          nullable: true
          enum:
            - sum
            - avg
            - max
            - min
            - running sum
            - running avg
            - running max
            - running min
            - count
            - count distinct
            - median
            - stdev
            - stdevp
            - var
            - varp
            - custom
    Dimension:
      title: DataSetQueryDimension
      type: object
      required:
        - field
      properties:
        id:
          description: >-
            A unique identifier for this dimension. Use this ID to reference the
            dimension in the order-by clause.
          type: string
        field:
          type: string
        transformation:
          description: >-
            The transformation that will be applied on the field when processing
            the condition.
          type: string
          nullable: true
          enum:
            - datetrunc year
            - datetrunc quarter
            - datetrunc month
            - datetrunc week
            - datetrunc day
            - datetrunc hour
            - datetrunc minute
    Filter:
      title: DataSetQueryFilter
      type: object
      required:
        - field
        - operator
        - values
      properties:
        field:
          type: string
        modifier:
          type: string
          nullable: true
        operator:
          type: string
        values:
          type: array
          items:
            $ref: '#/components/schemas/ConditionValue'
      discriminator:
        propertyName: operator
        mapping:
          is: '#/components/schemas/Is'
          is_not: '#/components/schemas/IsNot'
          is_null: '#/components/schemas/IsNull'
          not_null: '#/components/schemas/NotNull'
          greater_than: '#/components/schemas/GreaterThan'
          less_than: '#/components/schemas/LessThan'
          between: '#/components/schemas/Between'
          matches_user_attribute: '#/components/schemas/MatchesUserAttribute'
          contains: '#/components/schemas/Contains'
          does_not_contain: '#/components/schemas/DoesNotContain'
          starts_with: '#/components/schemas/StartsWith'
          ends_with: '#/components/schemas/EndsWith'
          is_true: '#/components/schemas/IsTrue'
          is_false: '#/components/schemas/IsFalse'
          last: '#/components/schemas/Last'
          next: '#/components/schemas/Next'
          before: '#/components/schemas/Before'
          after: '#/components/schemas/After'
          matches: '#/components/schemas/Matches'
          transform_pop_relative: '#/components/schemas/TransformPopRelative'
          transform_pop_absolute: '#/components/schemas/TransformPopAbsolute'
          transform_pop_none: '#/components/schemas/TransformPopNone'
          transform_date_drill: '#/components/schemas/TransformDateDrill'
          none: '#/components/schemas/None'
    OrderBy:
      title: DataSetQueryOrderBy
      type: object
      description: The identifier of the metric or dimension to apply ordering to.
      required:
        - id
        - order
      properties:
        id:
          type: string
        order:
          type: string
          enum:
            - asc
            - desc
    Query:
      title: DataSetQuery
      type: object
      properties:
        metrics:
          type: array
          items:
            $ref: '#/components/schemas/Metric'
        dimensions:
          type: array
          items:
            $ref: '#/components/schemas/Dimension'
        filters:
          type: array
          items:
            $ref: '#/components/schemas/Filter'
        limit:
          type: integer
          minimum: 1
          maximum: 1000000
        page:
          type: integer
          minimum: 1
        page_size:
          type: integer
          minimum: -1
          maximum: 1000
        order:
          type: array
          items:
            $ref: '#/components/schemas/OrderBy'
        timezone:
          type: string
          pattern: ^[A-Za-z]+/[A-Za-z_]+$
        bust_cache:
          type: boolean
          default: false
    UserStatus:
      description: User status.
      type: string
      enum:
        - active
        - deleted
        - pending
    UsersCounters:
      type: object
      properties:
        total:
          description: Total number of (filtered) users.
          type: integer
        by_role:
          description: An object containing the user counters for each user role.
          type: object
          additionalProperties:
            type: integer
          example:
            viewer: 0
            explorer: 0
            analyst: 0
            admin: 0
            growth_admin: 0
      required:
        - total
        - by_role
    Group:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        user_ids:
          type: array
          items:
            type: integer
    InvalidEmailsInvitationError:
      description: Some emails are invalid when inviting users.
      type: object
      allOf:
        - type: object
          properties:
            data:
              description: A list of emails with their invalid reasons.
              type: array
              items:
                type: object
                properties:
                  email:
                    type: string
                  reason:
                    type: string
        - $ref: '#/components/schemas/BaseError'
      required:
        - data
    UserAttribute:
      type: object
      properties:
        id:
          type: number
        name:
          type: string
          nullable: false
        attribute_type:
          type: string
          nullable: false
        label:
          type: string
          nullable: false
        description:
          type: string
        is_system_attribute:
          type: boolean
          example: false
      required:
        - name
        - attribute_type
        - label
    UserAttributeInput:
      type: object
      properties:
        name:
          type: string
          nullable: false
        attribute_type:
          type: string
          nullable: false
        label:
          type: string
          nullable: false
        description:
          type: string
      required:
        - name
        - attribute_type
        - label
    RecordError:
      type: object
      description: Error when saving a record.
      allOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - RecordError
        - type: object
          properties:
            record:
              description: Detailed errors of the record being created/updated.
              type: object
              properties:
                base:
                  description: >-
                    Overall errors of the whole record (not specific to a single
                    field).
                  type: array
                  items:
                    type: string
              additionalProperties:
                description: Errors of a specific field.
                type: array
                items:
                  type: string
        - $ref: '#/components/schemas/BaseError'
    UserAttributeEntryOutput:
      type: object
      properties:
        user_attribute_id:
          type: number
        input_type:
          type: string
          enum:
            - manual
            - inherit
            - all
        subject_type:
          type: string
          enum:
            - User
            - Group
        subject_id:
          type: number
      required:
        - user_attribute_id
        - input_type
        - subject_type
        - subject_id
    UserAttributeEntryInput:
      type: object
      properties:
        user_attribute_entries:
          type: array
          description: >-
            The number of entries that can be processed at once is limited to
            100.
          items:
            type: object
            allOf:
              - properties:
                  input_type:
                    type: string
                    enum:
                      - manual
                      - inherit
                      - all
                  values:
                    type: array
                    items:
                      type: string
                  subject_type:
                    type: string
                    enum:
                      - User
                      - Group
                  subject_id:
                    type: number
              - anyOf:
                  - title: with User Attribute name
                    properties:
                      user_attribute_id:
                        type: integer
                  - title: with User Attribute ID
                    properties:
                      user_attribute_name:
                        type: string
            required:
              - user_attribute_id
              - user_attribute_name
              - subject_type
              - subject_id
      required:
        - user_attribute_entries
    ProjectEvent:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier for the event
        event_type:
          type: string
          description: Type of the event
        data:
          type: object
          description: Event-specific data payload
        created_at:
          type: string
          format: date-time
          description: Timestamp when the event was created
      required:
        - id
        - event_type
        - data
        - created_at
    DashboardTemplate:
      type: object
      properties:
        uname:
          type: string
          description: Unique name of the dashboard template
        title:
          type: string
          description: Title of the dashboard template
        description:
          type: string
          nullable: true
          description: Description of the dashboard template
        definition:
          type: object
          description: Dashboard definition object
        render_options:
          type: object
          nullable: true
          description: Rendering options for the dashboard
        tags:
          type: array
          items:
            type: string
          nullable: true
          description: Tags associated with the template
        template:
          type: object
          nullable: true
          description: Template configuration
      required:
        - uname
        - title
        - definition
    RowBasedPermissionRule:
      type: object
      properties:
        condition:
          type: object
          $ref: '#/components/schemas/Condition'
        field_path:
          type: object
          $ref: '#/components/schemas/FieldPath'
    ShareableLink:
      type: object
      properties:
        resource_type:
          type: string
          enum:
            - Dashboard
        resource_id:
          type: number
        title:
          type: string
          nullable: true
        password_enabled:
          type: boolean
          nullable: false
        password:
          nullable: true
        expired_at:
          type: string
          nullable: true
        dynamic_filter_presets:
          type: array
          items:
            $ref: '#/components/schemas/DynamicFilterPreset'
        permission_rules:
          type: object
          properties:
            row_based:
              type: array
              items:
                $ref: '#/components/schemas/RowBasedPermissionRule'
      required:
        - resource_type
        - resource_id
    JobQueue:
      type: object
      properties:
        id:
          type: integer
        queue:
          type: string
        total_workers:
          type: integer
        busy_workers:
          type: integer
      required:
        - id
        - queue
        - total_workers
        - busy_workers
    SectionItem:
      type: object
      description: Homepage section item, currently only support Dashboard type
      properties:
        id:
          type: integer
        type:
          type: string
          enum:
            - Dashboard
        title:
          type: string
        slug:
          type: string
        icon:
          type: string
          enum:
            - dashboard
            - canvas
        data:
          type: object
    Agent:
      type: object
      properties:
        _name:
          type: string
          enum:
            - phoebe
            - docsearch
            - aqua
            - scout
            - suga_commit_message
            - suga_dataset_description
            - suga_model_field_description
            - suga_pr_description
            - suga_tag_description
            - agentic
            - suga_explore_dataset
            - vivid
      required:
        - _name
    AgentPhoebe:
      type: object
      allOf:
        - type: object
          properties:
            viz_setting:
              type: object
              nullable: true
            dataset_id:
              anyOf:
                - type: string
                - type: integer
            dataset_aml_binding:
              type: object
              nullable: true
            project_id:
              type: integer
              nullable: true
        - $ref: '#/components/schemas/Agent'
    AgentDocsearch:
      type: object
      allOf:
        - type: object
          properties: {}
        - $ref: '#/components/schemas/Agent'
    AgentScout:
      type: object
      allOf:
        - type: object
          properties:
            text_before_cursor:
              type: string
            text_after_cursor:
              type: string
            models:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                  data_source_name:
                    type: string
                  dimensions:
                    type: array
                    items:
                      type: string
        - $ref: '#/components/schemas/Agent'
    AgentSugaCommitMessage:
      type: object
      allOf:
        - type: object
          properties:
            git_diffs:
              type: string
            project_id:
              type: number
            current_commit_message:
              type: string
          required:
            - git_diffs
            - project_id
        - $ref: '#/components/schemas/Agent'
    AgentSugaDatasetDescription:
      type: object
      allOf:
        - type: object
          properties:
            aml_binding:
              type: object
              nullable: true
            project_id:
              type: integer
            dataset_description:
              type: string
        - $ref: '#/components/schemas/Agent'
    AgentSugaModelFieldDescription:
      type: object
      allOf:
        - type: object
          properties:
            aml_binding:
              type: object
              nullable: true
            project_id:
              type: integer
            field_name:
              type: string
            field_description:
              type: string
        - $ref: '#/components/schemas/Agent'
    AgentSugaPrDescription:
      type: object
      allOf:
        - type: object
          properties:
            project_id:
              type: number
          required:
            - project_id
        - $ref: '#/components/schemas/Agent'
    AgentSugaTagDescription:
      type: object
      allOf:
        - type: object
          properties:
            tag_name:
              type: string
            existing_description:
              type: string
            endorsed_tag:
              type: string
            archived_tag:
              type: string
            tag_list:
              type: object
              additionalProperties:
                type: string
          required:
            - tag_name
        - $ref: '#/components/schemas/Agent'
    AgentAgentic:
      type: object
      allOf:
        - type: object
          properties: {}
        - $ref: '#/components/schemas/Agent'
    AgentSugaExploreDataset:
      type: object
      allOf:
        - type: object
          properties: {}
        - $ref: '#/components/schemas/Agent'
    AgentVivid:
      type: object
      allOf:
        - type: object
          properties: {}
        - $ref: '#/components/schemas/Agent'
    Answer:
      type: object
      properties:
        answer:
          type: string
        next:
          type: integer
          nullable: true
      required:
        - answer
    Conversation:
      type: object
      properties:
        id:
          type: string
        tenant_id:
          type: integer
        user_id:
          type: integer
        created_at:
          type: string
        updated_at:
          type: string
        title:
          type: string
    UserChatLog:
      type: object
      properties:
        type:
          type: string
          enum:
            - user
        message:
          type: string
        start_timestamp:
          type: string
        end_timestamp:
          type: string
        pinned_contexts:
          type: array
          items:
            type: string
        tenant_id:
          type: integer
        user_id:
          type: integer
    BotChatLog:
      type: object
      properties:
        type:
          type: string
          enum:
            - bot
        query:
          type: string
        answer:
          type: string
        start_timestamp:
          type: string
        end_timestamp:
          type: string
        tenant_id:
          type: integer
        user_id:
          type: integer
    SecretProvider:
      type: string
      enum:
        - openai
        - gemini
        - anthropic
        - holistics_openai
        - holistics_gemini
        - holistics_anthropic
    WebhookTenantResult:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
            - failed
            - skipped
          description: The result status for this tenant
        base_url:
          type: string
          description: The base URL of the tenant
        tenant_name:
          type: string
          description: The name of the tenant
        tenant_id:
          type: integer
          description: The ID of the tenant
        message:
          type: string
          description: Optional message describing the result
      required:
        - status
        - base_url
        - tenant_name
        - tenant_id
    BaseSecret:
      type: object
      properties:
        id:
          type: number
          readOnly: true
        provider:
          $ref: '#/components/schemas/SecretProvider'
        status:
          type: string
          enum:
            - active
            - inactive
      required:
        - provider
    OpenAISecret:
      type: object
      allOf:
        - type: object
          properties:
            content:
              type: object
              properties:
                api_key:
                  type: string
                  nullable: true
            settings:
              type: object
              properties:
                base_url:
                  type: string
                  nullable: true
        - $ref: '#/components/schemas/BaseSecret'
    AnthropicSecret:
      type: object
      allOf:
        - type: object
          properties:
            content:
              type: object
              properties:
                api_key:
                  type: string
                  nullable: true
        - $ref: '#/components/schemas/BaseSecret'
    GeminiSecret:
      type: object
      allOf:
        - type: object
          properties:
            content:
              type: object
              properties:
                api_key:
                  type: string
                  nullable: true
        - $ref: '#/components/schemas/BaseSecret'
    Secret:
      type: object
      properties:
        secret:
          type: object
          oneOf:
            - $ref: '#/components/schemas/OpenAISecret'
          discriminator:
            propertyName: provider
            mapping:
              openai: '#/components/schemas/OpenAISecret'
              anthropic: '#/components/schemas/AnthropicSecret'
              gemini: '#/components/schemas/GeminiSecret'
    Tool:
      type: object
      properties:
        name:
          type: string
        title:
          type: string
        description:
          type: string
        input_schema:
          type: object
        output_schema:
          type: object
  parameters:
    Before:
      name: before
      in: query
      description: Only get records before this cursor.
      schema:
        type: string
    After:
      name: after
      in: query
      description: Only get records after this cursor.
      schema:
        type: string
    Limit:
      name: limit
      in: query
      description: Limit number of records per page.
      schema:
        type: integer
        default: 20
        minimum: 1
        maximum: 100
    Page:
      name: page
      in: query
      description: >-
        Page number for offset-based pagination (1-indexed). When provided,
        cursor-based pagination (before/after) is ignored.
      schema:
        type: integer
        minimum: 1
    SearchTerm:
      name: search_term
      in: query
      description: Search records by its name, title...
      schema:
        type: string
    IntResourceId:
      name: id
      in: path
      description: Resource id with type integer
      required: true
      schema:
        type: integer
    ResourceId:
      name: id
      in: path
      description: Resource id.
      required: true
      schema:
        anyOf:
          - type: string
          - type: integer
    EmailAttribute:
      name: email
      in: query
      description: Query parameter for email attribute.
      schema:
        type: string
  responses:
    UnauthorizedError:
      description: Unauthorized access or invalid credential was used.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BaseError'
    InvalidParametersError:
      description: Invalid parameters were sent.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BaseError'
    PermissionDeniedError:
      description: Access forbidden.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BaseError'
    InvalidOperationError:
      description: Invalid Operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BaseError'
    NotFoundError:
      description: Resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BaseError'
    AsyncResult:
      description: >-
        Async result.

        The operation will be executed asynchronously in a Job. You can check
        Job status using [Jobs APIs](#tag/Jobs). 
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AsyncResult'
    JobResult:
      description: Job result.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/JobResult'
    ExportJobNotReady:
      description: Job is not successful or not ready to be downloaded yet.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BaseError'
    BaseError:
      description: Base error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BaseError'
    DataOrAsyncResult:
      description: >-
        Will return result data directly if cached, else create job to do the
        action and return job's status.
      content:
        application/json:
          schema:
            type: object
            oneOf:
              - $ref: '#/components/schemas/Data'
              - $ref: '#/components/schemas/AsyncResult'
    RateLimitExceedError:
      description: Rate Limit Exceed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BaseError'
    MessageOrAsyncResult:
      description: >-
        Will return result message of action immediately, else create job to do
        the action and return job's status.
      content:
        application/json:
          schema:
            type: object
            oneOf:
              - $ref: '#/components/schemas/AsyncResult'
              - $ref: '#/components/schemas/Message'
    InvalidEmailsInvitationError:
      description: Some emails are invalid when inviting users.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InvalidEmailsInvitationError'
    RecordError:
      description: Record was not valid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RecordError'
    AiAnswerOrAsyncResult:
      description: >-
        Will return AI answer immediately, else create job to do the action and
        return job's status. This is based on params skip_job
      content:
        application/json:
          schema:
            type: object
            oneOf:
              - $ref: '#/components/schemas/AsyncResult'
              - $ref: '#/components/schemas/Answer'
    McpToolResultOrAsyncResult:
      description: >-
        Will return MCP result immediately, else create job to do the action and
        return job's status. This is based on tool type
      content:
        application/json:
          schema:
            type: object
            oneOf:
              - $ref: '#/components/schemas/AsyncResult'
              - type: object
                properties:
                  result:
                    type: object
                required:
                  - result
  examples:
    DataScheduleEmailDest:
      value:
        data_schedule:
          id: 1
          source_type: Dashboard
          source_id: 1
          schedule:
            repeat: '* * * * *'
            paused: false
          dynamic_filter_presets:
            - id: 1
              dynamic_filter_id: 1
              public_hidden: true
              preset_condition:
                modifier: null
                operator: is
                values:
                  - alice
          dest:
            type: EmailDest
            title: Sale report for {{$today}}
            recipients:
              - support@holistics.io
              - hello@holistics.io
            options:
              preview: true
              include_header: true
              include_report_link: true
              include_filters: false
              dont_send_when_empty: true
              body_text: Report
              attachment_formats:
                - pdf
                - csv
    DataScheduleSftpDest:
      value:
        data_schedule:
          id: 1
          source_type: Dashboard
          source_id: 1
          schedule:
            repeat: '* * * * *'
            paused: false
          dynamic_filter_presets:
            - id: 1
              dynamic_filter_id: 1
              public_hidden: true
              preset_condition:
                modifier: null
                operator: is
                values:
                  - alice
          dest:
            type: SftpDest
            dashboard_widget_id: 1
            data_source_id: 1
            file_path: /report
            format: csv
            include_header: true
            separator: ','
paths:
  /data_schedules:
    get:
      operationId: DataSchedules_List
      summary: List Data Schedules
      tags:
        - Data Schedules
      parameters:
        - $ref: '#/components/parameters/Before'
        - $ref: '#/components/parameters/After'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Page'
        - $ref: '#/components/parameters/SearchTerm'
        - name: sort
          in: query
          description: Sort order for the records.
          schema:
            type: string
            enum:
              - id_asc
              - id_desc
              - title_asc
              - title_desc
              - destination_asc
              - destination_desc
              - source_title_asc
              - source_title_desc
              - last_run_asc
              - last_run_desc
              - org_id_asc
              - org_id_desc
              - external_user_id_asc
              - external_user_id_desc
            default: id_asc
        - name: dest_type
          in: query
          description: Filter by destination type.
          schema:
            type: string
            enum:
              - EmailDest
              - SlackDest
              - Adls2Dest
              - SftpDest
              - EmailSubscriptionDest
        - name: source_type
          in: query
          description: Filter by source type.
          schema:
            type: string
            enum:
              - QueryReport
              - Dashboard
        - name: source_id
          in: query
          description: Filter by source id.
          schema:
            type: integer
        - name: creator_roles
          in: query
          description: >-
            Filter schedules by creator roles. Default includes all roles except
            'embed'. Pass array of roles to filter by specific user roles.
          schema:
            type: array
            items:
              type: string
              enum:
                - admin
                - growth_admin
                - analyst
                - user
                - public
                - explorer
                - embed
            default:
              - admin
              - growth_admin
              - analyst
              - user
              - public
              - explorer
      responses:
        '200':
          description: List of Data Schedules.
          content:
            application/json:
              schema:
                type: object
                allOf:
                  - type: object
                    properties:
                      data_schedules:
                        type: array
                        items:
                          $ref: '#/components/schemas/DataSchedule'
                      total_count:
                        type: integer
                        description: >-
                          Total number of records matching the query (before
                          pagination).
                    required:
                      - data_schedules
                      - total_count
                  - $ref: '#/components/schemas/PaginationCursor'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
    post:
      operationId: DataSchedules_Create
      summary: Create a Data Schedule
      tags:
        - Data Schedules
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data_schedule:
                  $ref: '#/components/schemas/DataSchedule'
              required:
                - data_schedule
            examples:
              EmailSchedule:
                $ref: '#/components/examples/DataScheduleEmailDest'
              SftpSchedule:
                $ref: '#/components/examples/DataScheduleSftpDest'
      responses:
        '201':
          description: Data Schedule was created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data_schedule:
                    $ref: '#/components/schemas/DataSchedule'
                required:
                  - data_schedule
        '400':
          $ref: '#/components/responses/InvalidParametersError'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '422':
          $ref: '#/components/responses/InvalidOperationError'
  /data_schedules/{id}:
    parameters:
      - $ref: '#/components/parameters/IntResourceId'
    get:
      operationId: DataSchedules_Get
      summary: Get a Data Schedule
      tags:
        - Data Schedules
      responses:
        '200':
          description: A Data Schedule.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data_schedule:
                    $ref: '#/components/schemas/DataSchedule'
                required:
                  - data_schedule
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
    put:
      operationId: DataSchedules_Update
      summary: Update a Data Schedule
      tags:
        - Data Schedules
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data_schedule:
                  $ref: '#/components/schemas/DataSchedule'
              required:
                - data_schedule
      responses:
        '200':
          description: Data Schedule was updated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data_schedule:
                    $ref: '#/components/schemas/DataSchedule'
                required:
                  - data_schedule
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
    delete:
      operationId: DataSchedules_Delete
      summary: Delete a Data Schedule
      tags:
        - Data Schedules
      responses:
        '200':
          description: Data schedule was deleted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
  /data_schedules/submit_execute:
    post:
      operationId: DataSchedules_SubmitExecuteTest
      summary: Execute a Test Data Schedule
      tags:
        - Data Schedules
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                test_data_schedule:
                  allOf:
                    - $ref: '#/components/schemas/DataSchedule'
                    - type: object
                      properties:
                        id:
                          nullable: true
                          type: integer
                          description: Unique Data Schedule identifier.
              required:
                - test_data_schedule
      responses:
        '200':
          $ref: '#/components/responses/AsyncResult'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
  /data_schedules/{id}/submit_execute:
    parameters:
      - $ref: '#/components/parameters/IntResourceId'
    post:
      operationId: DataSchedules_SubmitExecute
      summary: Execute a Data Schedule
      tags:
        - Data Schedules
      responses:
        '200':
          $ref: '#/components/responses/AsyncResult'
  /dashboards:
    get:
      operationId: Dashboards_List
      summary: List Dashboards
      tags:
        - Dashboards
      parameters:
        - $ref: '#/components/parameters/Before'
        - $ref: '#/components/parameters/After'
        - $ref: '#/components/parameters/Limit'
        - name: sort
          in: query
          description: |
            Sort dashboards according to the specified sort order.
          schema:
            type: string
            enum:
              - natural
              - id_asc
              - id_desc
            default: natural
        - name: include_embed_info
          in: query
          description: Decide whether embed info is included or not.
          schema:
            type: boolean
      responses:
        '200':
          description: List of Dashboards.
          content:
            application/json:
              schema:
                type: object
                allOf:
                  - type: object
                    properties:
                      dashboards:
                        type: array
                        items:
                          $ref: '#/components/schemas/Dashboard'
                    required:
                      - dashboards
                  - $ref: '#/components/schemas/PaginationCursor'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
  /dashboards/{id}:
    parameters:
      - $ref: '#/components/parameters/IntResourceId'
    get:
      operationId: Dashboards_Get
      summary: Get a Dashboard
      tags:
        - Dashboards
      parameters: []
      responses:
        '200':
          description: A Dashboard.
          content:
            application/json:
              schema:
                type: object
                properties:
                  dashboard:
                    $ref: '#/components/schemas/Dashboard'
                required:
                  - dashboard
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
    delete:
      operationId: Dashboards_Delete
      summary: Delete a Dashboard
      tags:
        - Dashboards
      responses:
        '200':
          description: Dashboard was deleted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/InvalidOperationError'
  /dashboards/{id}/build_url:
    post:
      operationId: Dashboards_BuildUrl
      summary: Build a Dashboard URL with preset filter states
      tags:
        - Dashboards
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                filter_states:
                  type: array
                  items:
                    $ref: '#/components/schemas/DynamicFilterCondition'
      responses:
        '200':
          description: A Dashboard URL.
          content:
            application/json:
              schema:
                type: object
                properties:
                  dashboard_url:
                    description: >-
                      The full Dashboard URL with preset filter states. This URL
                      already includes the fstate_hash.
                    type: string
                  fstate_hash:
                    description: >-
                      The hash key representing the filter states data. Note: It
                      is null when there are no submitted filter_states.
                    type: string
                    nullable: true
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/InvalidOperationError'
    parameters:
      - $ref: '#/components/parameters/IntResourceId'
  /dashboards/{id}/submit_preload:
    parameters:
      - $ref: '#/components/parameters/IntResourceId'
    post:
      operationId: Dashboards_SubmitPreload
      summary: Preload a Dashboard
      description: >-
        Preload a Dashboard by executing its widgets (using the submitted filter
        conditions, or default filter conditions if not submitted) and storing
        the widgets' results into Holistics cache.

        Read more about [Data Caching](/docs/performance/data-caching).
      tags:
        - Dashboards
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                dashboard_filter_conditions:
                  type: array
                  items:
                    $ref: '#/components/schemas/DynamicFilterCondition'
                bust_cache:
                  type: boolean
                  description: >-
                    If set to True, ignore existing cache and always execute the
                    widgets. Otherwise, do not execute the widgets that are
                    already cached.
                  default: false
            examples:
              Use all default filter conditions:
                value: {}
              Specify some filters and use default conditions for the rest:
                value:
                  dashboard_filter_conditions:
                    - dynamic_filter_id: 101
                      condition:
                        operator: matches
                        values:
                          - last week
                    - dynamic_filter_id: 201
                      condition:
                        operator: is
                        values:
                          - alice
                          - bob
              Skipping specific default filters:
                value:
                  dashboard_filter_conditions:
                    - dynamic_filter_id: 301
                      condition:
                        operator: none
                        values: []
      responses:
        '200':
          $ref: '#/components/responses/AsyncResult'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
  /dashboards/list_metadata:
    get:
      operationId: Dashboards_ListMetadata
      summary: List all dashboards metadata
      tags:
        - Dashboards
      parameters:
        - name: version
          in: query
          description: filtered by dashboard version
          schema:
            oneOf:
              - type: integer
                nullable: true
              - type: array
                items:
                  type: integer
        - name: permission_action
          in: query
          description: filtered by dashboard permission, default is read
          schema:
            type: string
            enum:
              - create
              - read
              - update
              - destroy
            default: read
      responses:
        '200':
          description: List of Dashboards metadata.
          content:
            application/json:
              schema:
                type: object
                properties:
                  dashboards_metadata:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: dashboard id
                        title:
                          type: string
                          description: dashboard title
                        uname:
                          type: string
                          description: dashboard unique name
                          nullable: true
                        project_id:
                          type: integer
                          description: project id of AML dashboard
                          nullable: true
                        version:
                          type: integer
                          description: dashboard version
  /dashboards/{id}/clone_canvas_dashboard:
    post:
      operationId: Dashboards_CloneCanvasDashboard
      summary: Clone a canvas dashboard
      tags:
        - Dashboards
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
          description: ID of the dashboard to clone
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                category_type:
                  $ref: '#/components/schemas/DashboardCategory'
                category_id:
                  type: integer
                  description: The category ID to place the cloned dashboard in
                  nullable: true
                new_uname:
                  type: string
                  description: New unique name for the cloned dashboard
                new_title:
                  type: string
                  description: New title for the cloned dashboard
              required:
                - category_type
                - new_uname
      responses:
        '200':
          $ref: '#/components/responses/AsyncResult'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '422':
          $ref: '#/components/responses/InvalidOperationError'
  /dashboard_widgets/{id}:
    parameters:
      - $ref: '#/components/parameters/ResourceId'
    get:
      operationId: DashboardWidgets_Get
      summary: Get a Dashboard Widget
      tags:
        - Dashboard Widgets
      parameters:
        - name: include_dashboard
          in: query
          description: Decide whether dashboard is included or not.
          schema:
            type: boolean
        - name: include_report
          in: query
          description: Decide whether report is included or not.
          schema:
            type: boolean
        - name: include_url
          in: query
          description: Decide whether dashboard url, widget url is included or not.
          schema:
            type: boolean
      responses:
        '200':
          description: A Dashboard Widget.
          content:
            application/json:
              schema:
                type: object
                properties:
                  dashboard_widget:
                    $ref: '#/components/schemas/DashboardWidget'
                required:
                  - dashboard_widget
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
    delete:
      operationId: DashboardWidgets_Delete
      summary: Delete a Dashboard Widget
      tags:
        - Dashboard Widgets
      responses:
        '200':
          description: Dashboard Widget was deleted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
  /dashboard_widgets/{id}/submit_export:
    parameters:
      - $ref: '#/components/parameters/ResourceId'
    post:
      operationId: DashboardWidgets_SubmitExport
      summary: Export a Dashboard Widget
      description: >-
        See more details on how to export a widget at [Get
        Data](/api/v2/get-data). When the Job is finished, you can download the
        exported file using the [download export
        API](#tag/Exports/operation/Exports_Download).
      tags:
        - Dashboard Widgets
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                output:
                  type: string
                  description: Output file type.
                  enum:
                    - csv
                    - xlsx
                    - pdf
                dashboard_filter_conditions:
                  type: array
                  items:
                    $ref: '#/components/schemas/DynamicFilterCondition'
              required:
                - output
      responses:
        '200':
          $ref: '#/components/responses/AsyncResult'
  /jobs:
    get:
      operationId: Jobs_List
      summary: List Jobs
      tags:
        - Jobs
      parameters:
        - name: ids
          in: query
          description: >
            IDs of the Jobs that you want to list. Non-existent IDs will be
            ignored.  

            Limit: 100  

            Example: `ids[]=1&ids[]=2&ids[]=3`
          schema:
            type: array
            items:
              type: integer
          required: true
        - name: include_data_source_stats
          in: query
          description: |
            Include `data_source_stats` in the response
          schema:
            type: boolean
        - name: include_source
          in: query
          description: |
            Include `source` in the response
          schema:
            type: boolean
      responses:
        '200':
          description: List of details about the requested Jobs
          content:
            application/json:
              schema:
                type: object
                properties:
                  jobs:
                    type: array
                    items:
                      $ref: '#/components/schemas/Job'
        '400':
          $ref: '#/components/responses/InvalidParametersError'
  /jobs/{id}:
    parameters:
      - $ref: '#/components/parameters/IntResourceId'
    get:
      operationId: Jobs_Get
      summary: Get a Job
      tags:
        - Jobs
      parameters:
        - name: include_data_source_stats
          in: query
          description: |
            Include `data_source_stats` in the response
          schema:
            type: boolean
        - name: include_source
          in: query
          description: |
            Include `source` in the response
          schema:
            type: boolean
      responses:
        '200':
          description: Details about the requested Job
          content:
            application/json:
              schema:
                type: object
                properties:
                  job:
                    $ref: '#/components/schemas/Job'
                required:
                  - job
  /jobs/{id}/logs:
    parameters:
      - $ref: '#/components/parameters/IntResourceId'
    get:
      operationId: Jobs_GetLogs
      summary: Get Job's logs
      tags:
        - Jobs
      responses:
        '200':
          description: Job's logs.
          content:
            application/json:
              schema:
                type: object
                properties:
                  job_logs:
                    type: array
                    items:
                      $ref: '#/components/schemas/JobLog'
                required:
                  - job_logs
  /jobs/{id}/result:
    parameters:
      - $ref: '#/components/parameters/IntResourceId'
    get:
      operationId: Jobs_GetResult
      summary: Get Job result
      description: >
        Fetch the result data of a Job.


        Notes:

        * To check job info and status, use [GET
        /jobs/{id}](#tag/Jobs/operation/Jobs_Get).

        * To download the result of an export job, use [GET
        /exports/download](#tag/Exports/operation/Exports_Download).
      x-holistics-internal: false
      tags:
        - Jobs
      responses:
        '200':
          $ref: '#/components/responses/JobResult'
        '422':
          $ref: '#/components/responses/InvalidOperationError'
  /exports/download:
    get:
      operationId: Exports_Download
      summary: Download an exported file
      tags:
        - Exports
      parameters:
        - name: job_id
          in: query
          description: ID of the Job that has done the exporting.
          schema:
            type: integer
          required: true
      responses:
        '302':
          description: >2-
             Successful Response. You will be redirected to the exported file's secured URL on Amazon S3.
            Note that the response content type depends on your exported file.
            `text/csv` below is just an example. 
          content:
            text/csv:
              schema:
                type: string
                format: binary
        '422':
          $ref: '#/components/responses/ExportJobNotReady'
  /data_alerts:
    get:
      operationId: DataAlerts_List
      summary: List Data Alerts
      tags:
        - Data Alerts
      parameters:
        - $ref: '#/components/parameters/Before'
        - $ref: '#/components/parameters/After'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/SearchTerm'
        - name: dest_type
          in: query
          description: Filter by destination type.
          schema:
            type: string
            enum:
              - EmailDest
              - SlackDest
        - name: source_id
          in: query
          description: Filter by source id.
          schema:
            anyOf:
              - type: integer
              - type: string
        - name: source_type
          in: query
          description: Filter by source type.
          schema:
            type: string
            enum:
              - DashboardWidget
              - VizBlock
      responses:
        '200':
          description: List of Data Alerts.
          content:
            application/json:
              schema:
                type: object
                allOf:
                  - type: object
                    properties:
                      data_alerts:
                        type: array
                        items:
                          $ref: '#/components/schemas/DataAlert'
                  - $ref: '#/components/schemas/PaginationCursor'
                required:
                  - data_alerts
        '401':
          $ref: '#/components/responses/UnauthorizedError'
    post:
      operationId: DataAlerts_Create
      summary: Create a Data Alert
      tags:
        - Data Alerts
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data_alert:
                  $ref: '#/components/schemas/DataAlert'
              required:
                - data_alert
      responses:
        '201':
          description: Data Alert was created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data_alert:
                    $ref: '#/components/schemas/DataAlert'
                required:
                  - data_alert
        '400':
          $ref: '#/components/responses/InvalidParametersError'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '422':
          $ref: '#/components/responses/InvalidOperationError'
  /data_alerts/{id}:
    parameters:
      - $ref: '#/components/parameters/IntResourceId'
    get:
      operationId: DataAlerts_Get
      summary: Get a Data Alert
      tags:
        - Data Alerts
      responses:
        '200':
          description: A Data Alert.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data_alert:
                    $ref: '#/components/schemas/DataAlert'
                required:
                  - data_alert
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
    put:
      operationId: DataAlerts_Update
      summary: Update a Data Alert
      tags:
        - Data Alerts
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data_alert:
                  $ref: '#/components/schemas/DataAlert'
              required:
                - data_alert
      responses:
        '200':
          description: Data Alert was updated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data_alert:
                    $ref: '#/components/schemas/DataAlert'
                required:
                  - data_alert
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '422':
          $ref: '#/components/responses/InvalidOperationError'
    delete:
      operationId: DataAlerts_Delete
      summary: Delete a Data Alert
      tags:
        - Data Alerts
      responses:
        '200':
          description: Data Alert was deleted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
  /data_alerts/submit_execute:
    post:
      operationId: DataAlerts_SubmitExecuteTest
      summary: Execute a Test Data Alert
      tags:
        - Data Alerts
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                test_data_alert:
                  $ref: '#/components/schemas/DataAlert'
              required:
                - test_data_alert
      responses:
        '200':
          $ref: '#/components/responses/AsyncResult'
          description: Submit execute response.
  /data_alerts/{id}/submit_execute:
    parameters:
      - $ref: '#/components/parameters/IntResourceId'
    post:
      operationId: DataAlerts_SubmitExecute
      summary: Execute a Data Alert
      tags:
        - Data Alerts
      responses:
        '200':
          $ref: '#/components/responses/AsyncResult'
          description: Submit execute response.
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
  /data_sources/{id}:
    parameters:
      - $ref: '#/components/parameters/IntResourceId'
    get:
      operationId: DataSources_Get
      summary: Get a Data Source
      tags:
        - Data Sources
      responses:
        '200':
          description: A Data Source.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data_source:
                    $ref: '#/components/schemas/DataSource'
                required:
                  - data_source
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
    put:
      operationId: DataSources_Update
      summary: Update a Data Source
      tags:
        - Data Sources
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data_source:
                  type: object
                  properties:
                    name:
                      $ref: '#/components/schemas/name'
                      nullable: true
                    settings:
                      $ref: '#/components/schemas/settings'
                      nullable: true
                    dbconfig:
                      $ref: '#/components/schemas/dbconfig'
                      nullable: true
              required:
                - data_source
      responses:
        '200':
          description: A Data Source.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data_source:
                    $ref: '#/components/schemas/DataSource'
                required:
                  - data_source
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
    delete:
      operationId: DataSources_Delete
      summary: Delete a Data Source
      tags:
        - Data Sources
      responses:
        '200':
          description: Data Source was deleted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
        '422':
          $ref: '#/components/responses/InvalidOperationError'
  /data_sources/{id}/bust_exploration_cache:
    parameters:
      - $ref: '#/components/parameters/IntResourceId'
    post:
      operationId: DataSources_BustExplorationCache
      summary: Bust Exploration Cache (Beta)
      description: >
        *This feature is currently in Beta.*


        Bust (invalidate) all exploration/report
        [cache](/docs/performance/data-caching) of the specified Data Source.
        After a successful busting, all explorations/reports running on the
        specified Data Source will return fresh data.


        Please note that this does not bust or trigger the Data Source's [Model
        Storages](/docs/storage-settings). Hence, even after calling this API,
        the explorations/reports can only be as fresh as the data persisted in
        the Model Storages.
      tags:
        - Data Sources
      responses:
        '200':
          $ref: '#/components/responses/AsyncResult'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
  /data_sources/upload_dbt_manifest: {}
  /data_sources/upload_multiple_dbt_manifests:
    post:
      operationId: DataSources_UploadMultipleDbtManifests
      summary: Upload Multiple dbt manifest.json Files
      description: |
        Upload multiple dbt manifest.json files for a data source atomically.
        Files are staged synchronously (size-validated in the request); parsing
        and the sync run as a background job. Poll `/api/v2/reference/jobs-get`
        for completion.

        Limits: at most 5 files per request, 2O0 MB per file.
        Malformed JSON is reported via the job's failure status, not the HTTP
        response.

        Gated by the `data_source:dbt_multi_manifest_upload` feature toggle.
      x-holistics-internal: false
      tags:
        - Data Sources
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                data_source_name:
                  type: string
                files:
                  type: array
                  items:
                    type: string
                    format: binary
                  description: One or more manifest.json files to upload atomically
              required:
                - files
      responses:
        '200':
          $ref: '#/components/responses/AsyncResult'
        '400':
          $ref: '#/components/responses/InvalidParametersError'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
  /data_sets/{id}/submit_query:
    parameters:
      - $ref: '#/components/parameters/IntResourceId'
    post:
      operationId: DataSets_SubmitQuery
      summary: Run query on a dataset
      tags:
        - Data Sets
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  $ref: '#/components/schemas/Query'
              required:
                - query
      responses:
        '200':
          $ref: '#/components/responses/DataOrAsyncResult'
        '422':
          $ref: '#/components/responses/BaseError'
  /data_sets/{id}/generate_sql:
    parameters:
      - $ref: '#/components/parameters/IntResourceId'
    post:
      operationId: DataSets_Sql
      summary: Get a SQL of a query on a dataset
      tags:
        - Data Sets
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  $ref: '#/components/schemas/Query'
              required:
                - query
      responses:
        '200':
          description: The SQL query.
          content:
            application/json:
              schema:
                type: object
                properties:
                  sql:
                    type: string
        '422':
          $ref: '#/components/responses/BaseError'
  /data_sets/{id}:
    parameters:
      - $ref: '#/components/parameters/IntResourceId'
    get:
      operationId: DataSets_Get
      summary: Get a Data Set
      tags:
        - Data Sets
      parameters:
        - name: include_models
          in: query
          description: Decide whether data models are included or not.
          schema:
            type: boolean
        - name: include_reports
          in: query
          description: Decide whether query reports are included or not.
          schema:
            type: boolean
      responses:
        '200':
          description: A Data Set.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data_set:
                    allOf:
                      - type: object
                        properties:
                          data_models:
                            type: array
                            items:
                              type: object
                              $ref: '#/components/schemas/DataModel'
                          reports:
                            type: array
                            items:
                              type: object
                              $ref: '#/components/schemas/QueryReport'
                            nullable: true
                      - $ref: '#/components/schemas/DataSet'
                required:
                  - data_set
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceedError'
    delete:
      operationId: DataSets_Delete
      summary: Delete a Data Set
      description: >-
        We do not support deleting data set created from AML yet, try deleting
        it from Development. Send your request to support@holistics.io if you
        have any concern.
      tags:
        - Data Sets
      responses:
        '200':
          description: Data Set was deleted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/InvalidOperationError'
  /data_models:
    get:
      operationId: DataModels_List
      summary: List Data Models
      tags:
        - Data Models
      parameters:
        - in: query
          name: project_id
          description: AML Project Id
          schema:
            type: integer
          required: true
        - name: branch_name
          in: query
          description: >-
            Branch name to get list of models. branch_name param will be ignore
            if commit_oid is available.
          schema:
            type: string
          required: false
        - name: commit_oid
          in: query
          description: Commit oid to get list of models.
          schema:
            type: string
          required: false
      responses:
        '200':
          description: All Data Models.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data_models:
                    type: array
                    items:
                      $ref: '#/components/schemas/DataModel'
                required:
                  - data_models
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
  /query_reports/{id}:
    parameters:
      - $ref: '#/components/parameters/IntResourceId'
    get:
      operationId: QueryReports_Get
      summary: Get a Query Report
      tags:
        - Query Reports
      parameters:
        - name: include_data_set
          in: query
          description: Decide whether Data Set is included or not.
          schema:
            type: boolean
      responses:
        '200':
          description: A Report.
          content:
            application/json:
              schema:
                type: object
                properties:
                  query_report:
                    allOf:
                      - type: object
                        properties:
                          data_set:
                            type: object
                            $ref: '#/components/schemas/DataSet'
                      - $ref: '#/components/schemas/QueryReport'
                required:
                  - query_report
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
  /users:
    get:
      operationId: Users_List
      summary: List Users
      tags:
        - Users
      parameters:
        - $ref: '#/components/parameters/Before'
        - $ref: '#/components/parameters/After'
        - $ref: '#/components/parameters/Limit'
        - name: search_term
          in: query
          description: Search by User `email`, `name`, `initials` or Group names.
          schema:
            type: string
        - name: status
          in: query
          description: Filter by User `status`.
          schema:
            $ref: '#/components/schemas/UserStatus'
        - name: statuses
          in: query
          description: Filter by multiple User `status`es.
          schema:
            type: array
            items:
              $ref: '#/components/schemas/UserStatus'
        - name: ids
          in: query
          description: Filter by multiple User `id`s.
          schema:
            type: array
            items:
              type: integer
        - name: role
          in: query
          description: Filter by User `role`.
          schema:
            $ref: '#/components/schemas/UserRole'
        - name: has_authentication_token
          in: query
          description: >
            Whether or not to include users who have API key.


            *Note:* the result also includes users even when their API access
            has been revoked.
          schema:
            type: boolean
        - name: exclude_deleted
          in: query
          description: Whether or not to exclude deleted Users.
          schema:
            type: boolean
        - name: sort
          in: query
          description: >
            Sort the Users according to the specified sort order.


            If multiple records have the same value, the corresponding order of
            User `id` will be applied to assure consistent result.
          schema:
            type: string
            enum:
              - natural
              - id_asc
              - id_desc
              - name_asc
              - name_desc
              - initials_asc
              - initials_desc
            default: natural
      responses:
        '200':
          description: User listing response.
          content:
            application/json:
              schema:
                type: object
                allOf:
                  - type: object
                    properties:
                      counters:
                        $ref: '#/components/schemas/UsersCounters'
                      users:
                        description: >-
                          List of Users. Each `User` object also contains
                          `group_ids` which is the ID list of the Groups that
                          the User belongs to.
                        type: array
                        items:
                          allOf:
                            - type: object
                              properties:
                                group_ids:
                                  type: array
                                  items:
                                    type: integer
                              required:
                                - group_ids
                            - $ref: '#/components/schemas/User'
                      groups:
                        type: object
                        description: >
                          An object containing Group ids as keys with their
                          corressponding Group data as values.


                          > NOTE: this only contains the Groups of the Users
                          above.
                        additionalProperties:
                          type: object
                          $ref: '#/components/schemas/Group'
                        example:
                          '1':
                            id: 1
                            name: string
                          '2':
                            id: 2
                            name: string
                    required:
                      - counters
                      - users
                      - groups
                  - $ref: '#/components/schemas/PaginationCursor'
  /users/{id}:
    parameters:
      - $ref: '#/components/parameters/IntResourceId'
    put:
      operationId: Users_Update
      summary: Update a User
      tags:
        - Users
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                user:
                  type: object
                  properties:
                    password:
                      description: User password.
                      type: string
                    name:
                      description: User name.
                      type: string
                      nullable: true
                    title:
                      description: User title.
                      type: string
                      nullable: true
                    job_title:
                      description: User job title.
                      type: string
                      nullable: true
                    role:
                      allOf:
                        - $ref: '#/components/schemas/UserRole'
                    allow_authentication_token:
                      description: Allow User to have API access.
                      type: boolean
                    enable_export_data:
                      description: >-
                        [(Enterprise feature) Allow/disallow exporting
                        data](/docs/user-management#enterprise-feature-allowdisallow-exporting-data).
                      type: boolean
                    group_ids:
                      description: List of new Group ids that the User will be assigned to.
                      type: array
                      items:
                        type: integer
                    settings:
                      allOf:
                        - $ref: '#/components/schemas/UserSettings'
      responses:
        '200':
          description: The updated User.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '422':
          $ref: '#/components/responses/InvalidOperationError'
    delete:
      operationId: Users_Delete
      summary: Delete a User (soft-delete)
      description: >-
        Revoke a User from accessing and using Holistics. <br/>Note: The
        soft-deleted User will still retain ownership of their resources. You
        can contact support@holistics.io to request for an ownership transfer.
      tags:
        - Users
      responses:
        '200':
          description: User was deleted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
        '403':
          description: You don't have permission to delete user.
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          description: User not found.
          $ref: '#/components/responses/NotFoundError'
        '422':
          description: User not permitted to self-destruction.
          $ref: '#/components/responses/InvalidParametersError'
  /users/invite:
    post:
      operationId: Users_Invite
      summary: Invite Users
      tags:
        - Users
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                emails:
                  description: List of User emails to invite.
                  type: array
                  items:
                    type: string
                role:
                  description: Role that will be applied to specified Users.
                  allOf:
                    - $ref: '#/components/schemas/UserRole'
                allow_authentication_token:
                  description: Allow Users to have API access.
                  type: boolean
                enable_export_data:
                  description: >-
                    [(Enterprise feature) Allow/disallow exporting
                    data](/docs/user-management#enterprise-feature-allowdisallow-exporting-data).
                  type: boolean
                group_ids:
                  description: List of Group ids that the Users will be assigned to.
                  type: array
                  items:
                    type: integer
                message:
                  description: Greeting message that will be sent to all User emails.
                  type: string
              required:
                - emails
                - role
      responses:
        '200':
          $ref: '#/components/responses/AsyncResult'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '422':
          $ref: '#/components/responses/InvalidEmailsInvitationError'
  /users/{id}/restore:
    parameters:
      - $ref: '#/components/parameters/IntResourceId'
    post:
      operationId: Users_Restore
      summary: Restore a Deleted User
      tags:
        - Users
      responses:
        '200':
          description: User was restored successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
        '403':
          description: You don't have permission to restore User.
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          description: User not found.
          $ref: '#/components/responses/NotFoundError'
        '422':
          description: User is not deleted.
          $ref: '#/components/responses/InvalidOperationError'
  /users/{id}/resend_invite:
    parameters:
      - $ref: '#/components/parameters/IntResourceId'
    post:
      operationId: Users_ResendInvite
      summary: Resend invitation to User
      tags:
        - Users
      responses:
        '200':
          $ref: '#/components/responses/AsyncResult'
        '403':
          description: You don't have permission to resend invite User.
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          description: User not found.
          $ref: '#/components/responses/NotFoundError'
        '422':
          description: Unable to locate invitation.
          $ref: '#/components/responses/InvalidOperationError'
  /users/{id}/revoke_authentication_token:
    parameters:
      - $ref: '#/components/parameters/IntResourceId'
    post:
      operationId: Users_RevokeAuthenticationToken
      summary: Revoke User API Key
      description: Admin can revoke all users' tokens. Users can revoke their tokens.
      tags:
        - Users
      responses:
        '200':
          description: User token was revoked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
        '403':
          description: You don't have permission to revoke this User authentication token.
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          description: User not found.
          $ref: '#/components/responses/NotFoundError'
  /users/check_holistics_user:
    parameters:
      - $ref: '#/components/parameters/EmailAttribute'
    get:
      operationId: Users_CheckHolisticsUser
      summary: Check if email address is used
      description: >-
        Check if the specified email address is already used for a User in your
        Holistics workspace.
      tags:
        - Users
      responses:
        '200':
          description: Returning a Boolean Variable 'is_already_user'.
          content:
            application/json:
              schema:
                type: object
                properties:
                  is_already_user:
                    type: boolean
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
  /users/me:
    get:
      operationId: Users_Me
      summary: Get currently authorized User
      tags:
        - Users
      responses:
        '200':
          description: Info of the currently authorized User.
          content:
            application/json:
              schema:
                type: object
                properties:
                  user:
                    $ref: '#/components/schemas/User'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
  /user_attributes:
    get:
      operationId: UserAttributes_List
      summary: List User Attributes
      description: >-
        List [User Attributes](/docs/admin/user-attributes) including [System
        Attributes](/docs/admin/user-attributes#system-user-attributes)
      tags:
        - User Attributes
      parameters:
        - $ref: '#/components/parameters/Before'
        - $ref: '#/components/parameters/After'
        - $ref: '#/components/parameters/Limit'
      responses:
        '200':
          description: List of User Attributes.
          content:
            application/json:
              schema:
                type: object
                allOf:
                  - type: object
                    properties:
                      user_attributes:
                        description: List of User Attributes, including System Attributes.
                        type: array
                        items:
                          $ref: '#/components/schemas/UserAttribute'
                    required:
                      - user_attributes
                  - $ref: '#/components/schemas/PaginationCursor'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
    post:
      operationId: UserAttributes_Create
      summary: Create a User Attribute
      tags:
        - User Attributes
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                user_attribute:
                  $ref: '#/components/schemas/UserAttributeInput'
              required:
                - user_attribute
      responses:
        '200':
          description: User Attribute was created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  user_attribute:
                    $ref: '#/components/schemas/UserAttribute'
                  status:
                    type: string
                    enum:
                      - created
                required:
                  - user_attribute
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '422':
          $ref: '#/components/responses/InvalidParametersError'
  /user_attributes/{id}:
    parameters:
      - $ref: '#/components/parameters/IntResourceId'
    put:
      operationId: UserAttributes_Update
      summary: Update a User Attribute
      tags:
        - User Attributes
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                user_attribute:
                  $ref: '#/components/schemas/UserAttributeInput'
              required:
                - user_attribute
      responses:
        '200':
          description: User Attribute was updated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  user_attribute:
                    $ref: '#/components/schemas/UserAttribute'
                required:
                  - user_attribute
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '422':
          $ref: '#/components/responses/RecordError'
    delete:
      operationId: UserAttributes_Delete
      summary: Delete a User Attribute
      tags:
        - User Attributes
      responses:
        '200':
          description: User Attribute was deleted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          description: You don't have permission to delete User Attribute.
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          description: User Attribute wasn't found.
          $ref: '#/components/responses/NotFoundError'
  /user_attribute_entries:
    get:
      operationId: UserAttributeEntries_List
      summary: List User Attribute Entries
      tags:
        - User Attributes
      parameters:
        - name: subject_type
          in: query
          description: Subject type.
          schema:
            type: string
            enum:
              - User
              - Group
          required: true
        - name: subject_id
          in: query
          description: Subject Id.
          schema:
            type: number
          required: true
      responses:
        '200':
          description: List of User Attribute Entries.
          content:
            application/json:
              schema:
                type: object
                allOf:
                  - type: object
                    properties:
                      user_attribute_entries:
                        type: array
                        items:
                          $ref: '#/components/schemas/UserAttributeEntryOutput'
                  - $ref: '#/components/schemas/PaginationCursor'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
  /user_attribute_entries/computed_values:
    get:
      operationId: UserAttributeEntries_ComputedValues
      summary: Compute User Attribute Values
      tags:
        - User Attributes
      parameters:
        - name: subject_type
          in: query
          description: Subject type.
          schema:
            type: string
            enum:
              - User
              - Group
          required: true
        - name: subject_id
          in: query
          description: Subject Id.
          schema:
            type: number
          required: true
      responses:
        '200':
          description: Computed values of User Attribute.
          content:
            application/json:
              schema:
                type: object
                properties:
                  user_attribute_values:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                    example:
                      user_attribute_name_1:
                        - value_1
                        - value_2
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
  /user_attribute_entries/upsert:
    put:
      operationId: UserAttributeEntries_Upsert
      summary: Upsert User Attribute Entries
      tags:
        - User Attributes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserAttributeEntryInput'
      responses:
        '200':
          description: Upsert User Attribute Entries successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  user_attribute_entries:
                    type: array
                    items:
                      $ref: '#/components/schemas/UserAttributeEntryOutput'
        '400':
          $ref: '#/components/responses/InvalidParametersError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/BaseError'
        '422':
          $ref: '#/components/responses/InvalidOperationError'
  /dependencies/downstream_dependencies:
    get:
      operationId: Dependencies_DownstreamDependencies
      summary: Get object's downstream dependencies
      tags:
        - Dependencies
      parameters:
        - in: query
          name: id
          description: Object id.
          required: true
          schema:
            type: integer
        - in: query
          name: type
          description: Object type.
          required: true
          schema:
            type: string
            enum:
              - DataSource
              - DataModel
              - DataSet
      responses:
        '200':
          description: An object's downstream dependencies.
          content:
            application/json:
              schema:
                type: object
                properties:
                  dependants:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: integer
                    example:
                      data_model_ids:
                        - 1
                        - 2
                        - 3
                      data_set_ids:
                        - 5
                        - 6
                required:
                  - dependants
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
  /aml_studio/projects/submit_publish:
    post:
      operationId: AmlStudioProjects_SubmitDeploy
      summary: Publish the AML Project to Production
      tags:
        - Development
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                object_mapping:
                  type: object
                  description: >-
                    associate an deploying object with an orphan reporting
                    object
                  properties:
                    datasets:
                      type: object
                      description: '{ "\<dataset_id\>": "\<dataset_uname\>" }'
      responses:
        '200':
          $ref: '#/components/responses/AsyncResult'
          description: go go go
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/InvalidOperationError'
  /aml_studio/projects/submit_validate:
    post:
      operationId: AmlStudioProjects_SubmitValidate
      summary: Validate AML Project
      tags:
        - Development
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                branch_name:
                  type: string
                  description: Branch name to run validation
                commit_oid:
                  type: string
                  description: Commit oid to run validation
              required:
                - branch_name
                - commit_oid
      responses:
        '200':
          $ref: '#/components/responses/AsyncResult'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/InvalidOperationError'
  /shareable_links:
    get:
      operationId: ShareableLinks_List
      summary: List Shareable Links
      tags:
        - Shareable Links
      parameters:
        - $ref: '#/components/parameters/Before'
        - $ref: '#/components/parameters/After'
        - $ref: '#/components/parameters/Limit'
        - name: sort
          in: query
          description: |
            Sort dashboards according to the specified sort order.
          schema:
            type: string
            enum:
              - natural
              - id_asc
              - id_desc
            default: natural
        - name: resource_type
          in: query
          description: Filter by resource type.
          schema:
            type: string
            enum:
              - Dashboard
        - name: resource_id
          in: query
          description: Filter by resource ID.
          schema:
            type: integer
      responses:
        '200':
          description: List of Shareable Links.
          content:
            application/json:
              schema:
                type: object
                allOf:
                  - type: object
                    properties:
                      shareable_links:
                        type: array
                        items:
                          $ref: '#/components/schemas/ShareableLink'
                    required:
                      - shareable_links
                  - $ref: '#/components/schemas/PaginationCursor'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
    post:
      operationId: ShareableLinks_Create
      summary: Create a Shareable Link
      tags:
        - Shareable Links
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                shareable_link:
                  $ref: '#/components/schemas/ShareableLink'
              required:
                - shareable_link
      responses:
        '201':
          description: Shareable Link was created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  shareable_link:
                    $ref: '#/components/schemas/ShareableLink'
                required:
                  - shareable_link
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '422':
          $ref: '#/components/responses/InvalidParametersError'
  /shareable_links/{id}:
    parameters:
      - $ref: '#/components/parameters/IntResourceId'
    get:
      operationId: ShareableLinks_Get
      summary: Get a Shareable Link
      tags:
        - Shareable Links
      responses:
        '200':
          description: A Shareable Link.
          content:
            application/json:
              schema:
                type: object
                properties:
                  shareable_link:
                    $ref: '#/components/schemas/ShareableLink'
                required:
                  - shareable_link
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
    put:
      operationId: ShareableLinks_Update
      summary: Update a Shareable Link
      tags:
        - Shareable Links
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                shareable_link:
                  $ref: '#/components/schemas/ShareableLink'
              required:
                - shareable_link
      responses:
        '200':
          description: Shareable Link was updated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  shareable_link:
                    $ref: '#/components/schemas/ShareableLink'
                required:
                  - shareable_link
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '422':
          $ref: '#/components/responses/InvalidParametersError'
    delete:
      operationId: ShareableLinks_Delete
      summary: Delete a Shareable Link
      tags:
        - Shareable Links
      responses:
        '200':
          description: Shareable Link was deleted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
        '403':
          description: User doesn't have permission to delete Shareable Link.
          $ref: '#/components/responses/PermissionDeniedError'
  /groups:
    get:
      operationId: Groups_List
      summary: List Groups
      tags:
        - Groups
      parameters:
        - $ref: '#/components/parameters/Before'
        - $ref: '#/components/parameters/After'
        - $ref: '#/components/parameters/Limit'
        - name: sort
          in: query
          description: |
            Sort groups according to the specified sort order.
          schema:
            type: string
            enum:
              - natural
              - id_asc
              - id_desc
            default: natural
        - name: include_users
          in: query
          description: |
            Include users in the response.
          schema:
            type: boolean
      responses:
        '200':
          description: List of Groups.
          content:
            application/json:
              schema:
                type: object
                allOf:
                  - type: object
                    properties:
                      groups:
                        type: array
                        items:
                          $ref: '#/components/schemas/Group'
                        example:
                          - id: 1
                            name: sample_group
                            user_ids:
                              - 1
                              - 2
                      users:
                        type: object
                        description: >
                          An object containing user ids as keys with their
                          corresponding user data as values.


                          > NOTE: this only contains the users of the groups
                          above.
                        additionalProperties:
                          type: object
                          $ref: '#/components/schemas/User'
                        example:
                          '1':
                            id: 1
                            email: admin@domain.com
                            name: admin_user
                            initials: string
                            role: user
                            is_deleted: false
                            is_activated: true
                            has_authentication_token: true
                            allow_authentication_token: true
                            enable_export_data: true
                            current_sign_in_at: 2019-08-24T14:15:22Z
                            last_sign_in_at: 2019-08-24T14:15:22Z
                            created_at: 2019-08-24T14:15:22Z
                            title: admin_user
                            job_title: admin
                          '2':
                            id: 2
                            email: analyst@domain.com
                            name: analyst_user
                            initials: string
                            role: user
                            is_deleted: false
                            is_activated: true
                            has_authentication_token: true
                            allow_authentication_token: true
                            enable_export_data: true
                            current_sign_in_at: 2019-08-24T14:15:22Z
                            last_sign_in_at: 2019-08-24T14:15:22Z
                            created_at: 2019-08-24T14:15:22Z
                            title: analyst_user
                            job_title: analyst
                    required:
                      - groups
                      - users
                  - $ref: '#/components/schemas/PaginationCursor'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
    post:
      operationId: Groups_Create
      summary: Create a Group
      tags:
        - Groups
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                group:
                  type: object
                  properties:
                    name:
                      type: string
                  required:
                    - name
              required:
                - group
      responses:
        '201':
          description: Group was created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  group:
                    $ref: '#/components/schemas/Group'
                required:
                  - group
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '422':
          $ref: '#/components/responses/InvalidOperationError'
  /groups/{id}:
    parameters:
      - $ref: '#/components/parameters/IntResourceId'
    get:
      operationId: Groups_Get
      summary: Get a Group
      tags:
        - Groups
      parameters:
        - in: query
          name: include_users
          description: Whether to include Users information.
          schema:
            type: boolean
      responses:
        '200':
          description: A Group.
          content:
            application/json:
              schema:
                type: object
                properties:
                  group:
                    $ref: '#/components/schemas/Group'
                required:
                  - group
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
    put:
      operationId: Groups_Update
      summary: Update a Group
      tags:
        - Groups
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                group:
                  type: object
                  properties:
                    name:
                      type: string
              required:
                - group
      responses:
        '200':
          description: Group was updated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  group:
                    $ref: '#/components/schemas/Group'
                required:
                  - group
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/InvalidParametersError'
    delete:
      operationId: Groups_Delete
      summary: Delete a Group
      tags:
        - Groups
      responses:
        '200':
          description: Group was deleted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
  /groups/{id}/add_user/{user_id}:
    parameters:
      - $ref: '#/components/parameters/IntResourceId'
      - in: path
        name: user_id
        description: User id.
        required: true
        schema:
          type: integer
    post:
      operationId: Groups_AddUser
      summary: Add a User to a Group
      tags:
        - Groups
      responses:
        '200':
          description: User was added successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/InvalidParametersError'
  /groups/{id}/remove_user/{user_id}:
    parameters:
      - $ref: '#/components/parameters/IntResourceId'
      - in: path
        name: user_id
        description: User id.
        required: true
        schema:
          type: integer
    post:
      operationId: Groups_RemoveUser
      summary: Remove a User from a Group
      tags:
        - Groups
      responses:
        '200':
          description: Remove User successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
  /job_queues:
    get:
      operationId: JobQueues_List
      summary: List Job's queues
      tags:
        - Jobs
      responses:
        '200':
          description: >-
            List of Job's queues with their number of total workers and number
            of busy workers.
          content:
            application/json:
              schema:
                type: object
                properties:
                  job_queues:
                    type: array
                    items:
                      $ref: '#/components/schemas/JobQueue'
                required:
                  - job_queues
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
  /data_model_persistences/validate_ddl:
    post:
      operationId: DataModelPersistences_ValidateDDL
      summary: Validate data model persistence custom DDL
      tags:
        - Data Model Persistences
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                ddl:
                  type: string
              required:
                - ddl
      responses:
        '200':
          description: The custom DDL is valid
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '422':
          $ref: '#/components/responses/InvalidOperationError'
  /embed/{hashcode}/shorten_token:
    post:
      security: []
      operationId: Embed_ShortenToken
      summary: Create a Shortened embed token
      description: >
        Use this API to [shorten the embed
        token](/embedded/faqs#i-received-an-error-414-request-uri-too-large-error)
        if the URL exceeds the browser's size limit.
      tags:
        - Embed
      parameters:
        - in: path
          name: hashcode
          required: true
          schema:
            type: string
          description: The embed code of the dashboard for shortening the token.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
              required:
                - token
      responses:
        '201':
          description: Shortened token was created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  shortened_token:
                    type: string
        '400':
          $ref: '#/components/responses/InvalidParametersError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
  /ai/skills:
    get:
      operationId: Ai_Skills
      summary: List available AI skills
      tags:
        - AI
      responses:
        '200':
          description: Successful response with list of skills
          content:
            application/json:
              schema:
                type: object
                properties:
                  skills:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          example: my_skill
                        label:
                          type: string
                          nullable: true
                          example: My Skill
                        description:
                          type: string
                          example: Does something useful
                        activation:
                          type: string
                          enum:
                            - never
                            - always
                            - auto
                        allow_user_control:
                          type: boolean
  /tags:
    get:
      operationId: TaggingSystem_List
      tags:
        - Tagging System
      summary: List all production tags
      description: >
        Use this API to list all tags that are available in your [production
        tags.aml file](/docs/find-organize/tags#create-tags).
      responses:
        '200':
          description: List of production tags.
          content:
            application/json:
              schema:
                type: object
                properties:
                  tags:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        description:
                          type: string
                          nullable: true
                        color:
                          type: string
                          nullable: true
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
  /tags/submit_add_object_tags:
    post:
      operationId: TaggingSystem_SubmitAddObjectTags
      summary: Add tags to an object
      tags:
        - Tagging System
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                object_params:
                  type: object
                  properties:
                    uname:
                      type: string
                    type:
                      type: string
                      enum:
                        - dataset
                        - dashboard
                tags:
                  type: array
                  items:
                    type: string
                  description: List of tags to add to the object
                project_id:
                  type: number
                  description: >-
                    AML Project Id. If not provided, default to user's first
                    project.
                  nullable: true
              required:
                - object_params
                - tags
      responses:
        '200':
          $ref: '#/components/responses/AsyncResult'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
  /tags/submit_remove_object_tags:
    post:
      operationId: TaggingSystem_SubmitRemoveObjectTags
      summary: Remove tags from an object
      tags:
        - Tagging System
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                object_params:
                  type: object
                  properties:
                    uname:
                      type: string
                    type:
                      type: string
                      enum:
                        - dataset
                        - dashboard
                tags:
                  type: array
                  items:
                    type: string
                  description: >-
                    List of tags to remove from the object. Pass in an empty
                    array to remove all tags.
                project_id:
                  type: number
                  nullable: true
                  description: >-
                    AML Project Id. If not provided, default to user's first
                    project.
              required:
                - object_params
                - tags
      responses:
        '200':
          $ref: '#/components/responses/AsyncResult'
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
  /tags/recommend_archivable_objects:
    get:
      operationId: TaggingSystem_RecommendArchivableObjects
      summary: Get all AML objects that are recommended to be archived
      tags:
        - Tagging System
      description: >-
        Return a list of AML dashboards and datasets which have not been viewed
        for more than 30 days
      responses:
        '200':
          description: AML objects that are recommended to be archived.
          content:
            application/json:
              schema:
                type: object
                properties:
                  archivable_objects:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        title:
                          type: string
                        type:
                          type: string
                        description:
                          type: string
                          nullable: true
                        tags:
                          type: array
                          nullable: true
                          items:
                            type: string
                        uname:
                          type: string
                        owner_name:
                          type: string
                        project_id:
                          type: integer
                        permissions:
                          type: object
                          properties:
                            can_live_update:
                              type: boolean
                            can_edit:
                              type: boolean
                        last_viewed_at:
                          type: string
                          nullable: true
                        email_schedules_count:
                          type: integer
                          nullable: true
                        data_alerts_count:
                          type: integer
                          nullable: true
        '403':
          $ref: '#/components/responses/PermissionDeniedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
  /git_webhooks/github_event:
    post:
      operationId: GitWebhooks_GithubEvent
      summary: Process GitHub webhook events
      description: >-
        Endpoint for receiving GitHub webhook events related to pull requests
        and push events. Used for AmlStudio PR workflow integration.
      tags:
        - Webhook
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: GitHub webhook payload containing event data
      parameters:
        - in: header
          name: X-GitHub-Event
          required: true
          schema:
            type: string
            enum:
              - pull_request
              - push
              - ping
          description: The type of event that triggered the webhook
        - in: header
          name: X-GitHub-Hook-ID
          required: true
          schema:
            type: string
          description: The ID of the webhook that triggered the request
        - in: header
          name: X-Hub-Signature-256
          required: true
          schema:
            type: string
          description: The HMAC hex digest of the payload, used for verification
      responses:
        '200':
          description: Event processed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/WebhookTenantResult'
                required:
                  - data
        '422':
          $ref: '#/components/responses/InvalidOperationError'
  /git_webhooks/gitlab_event:
    post:
      operationId: GitWebhooks_GitlabEvent
      summary: Process GitLab webhook events
      description: >-
        Endpoint for receiving GitLab webhook events related to merge requests
        and push events. Used for AmlStudio PR workflow integration.
      tags:
        - Webhook
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: GitLab webhook payload containing event data
      parameters:
        - in: header
          name: X-Gitlab-Event
          required: true
          schema:
            type: string
            enum:
              - Merge Request Hook
              - Push Hook
              - System Hook
          description: The type of event that triggered the webhook
        - in: header
          name: X-Gitlab-Token
          required: true
          schema:
            type: string
          description: The secret token used for webhook verification
      responses:
        '200':
          description: Event processed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/WebhookTenantResult'
                required:
                  - data
        '422':
          $ref: '#/components/responses/InvalidOperationError'
  /git_webhooks/github_app_event:
    post:
      operationId: GitWebhooks_GithubAppEvent
      summary: Process GitHub App webhook events
      description: >
        Endpoint for receiving webhook events from the GitHub App integration.

        Handles installation lifecycle events (install, uninstall, suspend,
        unsuspend),

        repository access changes, and repository events (pull requests,
        pushes).

        The request signature is validated via HMAC before processing. No
        authentication is required.
      tags:
        - Webhook
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: GitHub App webhook payload containing event data
      parameters:
        - in: header
          name: X-GitHub-Event
          required: true
          schema:
            type: string
          description: >-
            The type of GitHub event that triggered the webhook (e.g.,
            installation, push, pull_request)
        - in: header
          name: X-Hub-Signature-256
          required: true
          schema:
            type: string
          description: HMAC hex digest of the payload for signature verification
      responses:
        '200':
          description: Event processed or skipped
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - skipped
                      - processed
                    description: >
                      General result status.

                      **skipped** — the event was not handled (unrecognized
                      event type, suspended app, etc.).

                      **processed** — the event was handled and per-tenant
                      results are included.
                  data:
                    type: array
                    description: >-
                      Per-tenant processing results (present when status is
                      processed)
                    items:
                      $ref: '#/components/schemas/WebhookTenantResult'
                required:
                  - status
        '404':
          $ref: '#/components/responses/NotFoundError'
tags:
  - name: Jobs
    description: >-
      Async (asynchronous) operations are operations that are executed within a
      background Job.  

      If an API endpoint triggers an async operation, it will return an
      AsyncResult response containing the background Job info.  

      You can use the bellow APIs to poll for the updated Job status.  
  - name: Development
    description: Development APIs
  - name: Dashboards
    description: Reporting Dashboards
  - name: Dashboard Widgets
    description: Reporting Dashboard Widgets
  - name: Data Schedules
    description: Data delivery using automated schedules
  - name: Data Alerts
    description: >-
      Send automatic notification to you and your team when the data meets
      certain conditions
  - name: Exports
  - name: Data Modeling
    description: >-
      ## DataModelingCondition

      Condition that can be applied on the Data Modeling layer to filter your
      data. See the examples in the Example panel.

      <SchemaDefinition schemaRef="#/components/schemas/_DataModelingCondition"
      />
  - name: Dependencies
    description: >-
      ## Downstream dependencies

      Get ids of objects which are dependent on the object you input. The
      response schema varies based on the input type and its current dependants.
  - name: Users
    description: Users management
  - name: Groups
    description: Groups management
  - name: Data Model Persistences
    x-holistics-internal: true
    description: Data Model Persistences
  - name: Embed
    description: Embedded Analytics
  - name: Tagging System
    x-holistics-internal: true
    description: Tagging system for content organization.
