Athenian histograms API

The histograms API from Athenian — 3 operation(s) for histograms.

OpenAPI Specification

athenian-histograms-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  contact:
    email: admin@athenian.co
    name: the administrator by email
  description: 'Server version: {{ server_version }} built on {{ build_date }} @ [{{ commit }}](https://github.com/athenianco/athenian-api/commit/{{ commit }})


    Origin GitHub repository: [athenianco/api-spec](https://github.com/athenianco/api-spec).


    Authorization persists between sessions. Marks:

    * 🛡️ endpoint requires account admin privileges.

    * 👤 endpoint only works with JWT authentication.

    <details>

    <summary>List of common server errors.</summary>

    * __500__ endpoint crashed. We reported the incident to Sentry and will fix it soon! Please include the value of `instance` in the response if you contact the support. Repeating the request will not help, most probably.

    * __501__ some functions are missing, either because they are not implemented yet or a non-critical runtime dependency is not satisfied. Repeating the request will not help, guaranteed.

    * __502__ server crashed badly, either due to a memory access violation in native code or running out of memory. We reported this incident to Sentry and will fix it soon! Try repeating the request.

    * __503__ server has not fully launched yet, e.g. hasn''t connected to the database; server is shutting down; we are experiencing a partial outage. Try repeating the request.

    * __504__ endpoint took too much time and was interrupted. We reported the incident to Sentry and will see how to improve the performance. Repeating the request will not help, most probably.

    </details>'
  license:
    name: CC-BY-4.0
  title: '{{ title }} align histograms API'
  version: 2.1.86
servers:
- description: '{{ server_description }} - {{ server_url }}'
  url: '{{ server_url }}/v1'
tags:
- name: histograms
paths:
  /histograms/code_checks:
    post:
      operationId: calc_histogram_code_checks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CodeCheckHistogramsRequest'
        description: Select the check runs of interest and the metrics to calculate.
        required: true
        x-body-name: body
      responses:
        200:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CalculatedCodeCheckHistograms'
          description: Calculated histograms.
        400:
          $ref: '#/components/responses/InvalidRequestErrorResponse'
        403:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericError'
          description: The user is forbidden to access the specified repositories on behalf of the specified account.
        404:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericError'
          description: The specified account does not exist or the user is not a member.
        422:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoSourceDataError'
          description: The account's installation has not finished yet.
      security:
      - bearerAuth: []
      - apiKeyAuth: []
      summary: Calculate histograms on continuous integration runs, such as GitHub Actions, Jenkins, Circle, etc.
      tags:
      - histograms
      x-codegen-request-body-name: body
      x-openapi-router-controller: athenian.api.controllers.histograms_controller
  /histograms/jira:
    post:
      operationId: calc_histogram_jira
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JIRAHistogramsRequest'
        description: Query for selecting JIRA issues and binned activities.
        required: true
        x-body-name: body
      responses:
        200:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CalculatedJIRAHistograms'
          description: Calculated histograms.
        400:
          $ref: '#/components/responses/InvalidRequestErrorResponse'
        403:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericError'
          description: The user is forbidden to access the specified repositories on behalf of the specified account.
        404:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericError'
          description: The specified account does not exist or the user is not a member.
        422:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoSourceDataError'
          description: The account's installation has not finished yet.
      security:
      - bearerAuth: []
      - apiKeyAuth: []
      summary: Calculate histograms over JIRA issue activities.
      tags:
      - histograms
      x-codegen-request-body-name: body
      x-openapi-router-controller: athenian.api.controllers.jira_controller
  /histograms/pull_requests:
    post:
      operationId: calc_histogram_prs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PullRequestHistogramsRequest'
        description: Desired histogram definitions.
        required: true
        x-body-name: body
      responses:
        200:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CalculatedPullRequestHistograms'
          description: Calculated histograms.
        400:
          $ref: '#/components/responses/InvalidRequestErrorResponse'
        403:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericError'
          description: The user is forbidden to calculate metrics on behalf of the specified account.
        404:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericError'
          description: The specified account does not exist or the user is not a member.
        422:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoSourceDataError'
          description: No data is available to calculate histograms for the given repositories.
        424:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MissingSettingsError'
          description: One or more logical repositories miss the release settings.
      security:
      - bearerAuth: []
      - apiKeyAuth: []
      summary: Calculate histograms over PR distributions.
      tags:
      - histograms
      x-codegen-request-body-name: body
      x-openapi-router-controller: athenian.api.controllers.histograms_controller
components:
  schemas:
    JIRAHistogramDefinition:
      additionalProperties: false
      description: 'Histogram parameters: topic, bins.'
      example:
        metric: jira-raised
        ticks:
        - 1
        - 10
        - 50
        - 100
        - 500
      properties:
        metric:
          $ref: '#/components/schemas/JIRAMetricID'
        scale:
          allOf:
          - $ref: '#/components/schemas/HistogramScale'
          - description: Histogram's X axis scale.
        bins:
          description: Number of bars in the histogram. 0 or null means automatic.
          minimum: 0
          type: integer
        ticks:
          description: 'Alternatively to `bins` and `scale`, set the X axis bar borders manually.

            Only one of two may be specified. The ticks are automatically prepended

            the distribution minimum and appended the distribution maximum.'
          items:
            oneOf:
            - type: number
            - $ref: '#/components/schemas/TimeDuration'
          minItems: 1
          type: array
      required:
      - metric
      type: object
    Interquartile:
      additionalProperties: false
      description: Middle 50% range.
      example:
        left: 3
        right: 76
      properties:
        left:
          oneOf:
          - type: number
          - $ref: '#/components/schemas/TimeDuration'
        right:
          oneOf:
          - type: number
          - $ref: '#/components/schemas/TimeDuration'
      required:
      - left
      - right
      type: object
    DeveloperID:
      description: 'User name which uniquely identifies any developer on any service provider.

        The format matches the profile URL without the protocol part.

        '
      example: github.com/vmarkovtsev
      type: string
    WithBothJiraAndJiragroups:
      description: An object having both jira and jiragroups fields.
      properties:
        jira: {}
        jiragroups: {}
      required:
      - jira
      - jiragroups
      type: object
    TimeDuration:
      description: Time duration value.
      pattern: ^\d+s$
      type: string
    NoSourceDataError:
      $ref: '#/components/schemas/GenericError'
    RepositoryID:
      description: 'Repository name which uniquely identifies any repository in any service provider.

        The format matches the repository URL without the protocol part. No ".git" should be appended.

        We support a special syntax for repository sets: "{reposet id}" adds all the repositories

        from the given set.

        '
      example: github.com/athenianco/athenian-webapp
      type: string
    PullRequestWith:
      additionalProperties: false
      description: 'Triage PRs by various developer participation. The aggregation is `OR` between

        the participation groups and `OR` within each group. For example, if our request is

        ```

        {"author": ["github.com/vmarkovtsev"], "reviewer": ["github.com/gkwillie", "github.com/mcuadros"]}

        ```

        then the matched PRs will have **@vmarkovtsev** as the author or either

        **@gkwillie** or **@mcuadros** as the reviewers.

        It is possible to mention whole teams using the syntax `{id}` where `id` is a team identifier (see `/teams`).'
      example:
        author:
        - github.com/vmarkovtsev
      properties:
        author:
          $ref: '#/components/schemas/DeveloperSet'
        reviewer:
          $ref: '#/components/schemas/DeveloperSet'
        commit_author:
          $ref: '#/components/schemas/DeveloperSet'
        commit_committer:
          $ref: '#/components/schemas/DeveloperSet'
        commenter:
          $ref: '#/components/schemas/DeveloperSet'
        merger:
          $ref: '#/components/schemas/DeveloperSet'
        releaser:
          $ref: '#/components/schemas/DeveloperSet'
      type: object
    CalculatedJIRAHistogram:
      additionalProperties: false
      description: Calculated histogram over JIRA issue activities.
      example:
        metric: jira-raised
        scale: linear
        ticks:
        - 0
        - 1
        - 10
        - 50
        - 100
        - 500
        - 10000
        frequencies:
        - 0
        - 38
        - 28
        - 13
        - 12
        - 8
        interquartile:
          left: 3
          right: 76
      properties:
        with:
          $ref: '#/components/schemas/JIRAFilterWith'
        metric:
          $ref: '#/components/schemas/JIRAMetricID'
        scale:
          $ref: '#/components/schemas/HistogramScale'
        ticks:
          description: Series of horizontal bar borders aka X axis. Their count is `len(y) + 1` because there are `N` intervals between `(N + 1)` ticks.
          items:
            oneOf:
            - type: number
            - $ref: '#/components/schemas/TimeDuration'
          type: array
        frequencies:
          description: Series of histogram bar heights aka Y axis.
          items:
            minimum: 0
            type: integer
          type: array
        interquartile:
          $ref: '#/components/schemas/Interquartile'
      required:
      - frequencies
      - interquartile
      - metric
      - scale
      - ticks
      type: object
    MissingSettingsError:
      $ref: '#/components/schemas/GenericError'
    GenericError:
      example:
        detail: 'Unsupported metric: pr-xxx-time'
        status: 400
        title: Bad request syntax or unsupported method.
        type: /errors/InvalidRequestError
      properties:
        detail:
          description: Human-readable explanation specific to this occurrence of the problem.
          example: 'Unsupported metric: pr-xxx-time'
          type: string
        instance:
          description: URI reference that identifies the specific occurrence of the problem. It is `null` for 4xx, Sentry event ID for 5xx.
          example: 2763c4eabd7240f59829ee1a02546293
          type: string
        status:
          description: Duplicated HTTP status code.
          example: 400
          type: integer
        title:
          description: Short, human-readable summary of the problem type.
          example: Bad request syntax or unsupported method.
          type: string
        type:
          description: URI reference that identifies the problem type (RFC 7807).
          example: /errors/InvalidRequestError
          type: string
      required:
      - status
      - title
      - type
      type: object
    ForSetPullRequests:
      additionalProperties: false
      description: 'Filter for `/metrics/pull_requests` and `/histograms/pull_requests`.

        Achieve the best performance by packing all your filters in a single `ForSetPullRequests`

        instead of sending multiple `ForSetPullRequests`-s. For example, use `repogroups` and `withgroups`

        to request separate metrics for several repository sets and teams.

        '
      example:
        repositories:
        - github.com/athenianco/athenian-webapp
        - github.com/athenianco/athenian-api
        with:
          author:
          - github.com/vmarkovtsev
          - github.com/dpordomingo
        labels_include:
        - bug
      not:
        $ref: '#/components/schemas/WithBothJiraAndJiragroups'
      properties:
        repositories:
          allOf:
          - $ref: '#/components/schemas/RepositorySet'
          - description: 'Repositories for which to calculate the metrics.

              When property is missing metrics will be calculated across all repositories.

              '
        repogroups:
          $ref: '#/components/schemas/IndexedGroups'
        with:
          $ref: '#/components/schemas/PullRequestWith'
        withgroups:
          description: 'Aggregate by groups of PR contributors.

            Currently, only the groupings by `author`, `merger`, and `releaser` are supported.

            People do not have to be mentioned in `with` in contrast to `repogroups`.

            We treat `with` as another group, if specified.'
          items:
            $ref: '#/components/schemas/PullRequestWith'
          type: array
        labels_include:
          description: At least one of these labels must be present in each analyzed PR.
          items:
            type: string
          type: array
        labels_exclude:
          description: None of these labels must be present in each analyzed PR.
          items:
            type: string
          type: array
        lines:
          description: Split by changed number of lines (inserted + removed).
          items:
            minimum: 0
            type: integer
          minItems: 2
          type: array
        jira:
          $ref: '#/components/schemas/JIRAFilter'
        jiragroups:
          $ref: '#/components/schemas/JIRAGroups'
        environments:
          description: Calculate deployment metrics separately for each environment in the list. Required if any deployment metrics were requested. Histograms are only implemented for single environments.
          items:
            type: string
          maxItems: 64
          minItems: 1
          type: array
      type: object
    CommitPushers:
      description: 'Check runs must be triggered by commits pushed by these people.

        When it is impossible to determine who pushed, e.g. in legacy API based checks,

        they are committers.

        It is possible to mention whole teams using the syntax `{id}` where `id` is a team identifier (see `/teams`).

        '
      example:
      - github.com/vmarkovtsev
      - github.com/se7entyse7en
      items:
        $ref: '#/components/schemas/DeveloperID'
      type: array
    HistogramScale:
      description: 'X axis scale: linear or logarithmic.'
      enum:
      - linear
      - log
      example: log
      type: string
    CalculatedCodeCheckHistogram:
      additionalProperties: false
      description: Calculated histogram over code checks (CI).
      example:
        for:
          repositories:
          - github.com/athenianco/athenian-webapp
          - github.com/athenianco/athenian-api
        metric: chk-suites-per-pr
        scale: linear
        ticks:
        - 0
        - 1
        - 2
        - 3
        - 5
        - 8
        - 12
        frequencies:
        - 0
        - 38
        - 28
        - 13
        - 120
        - 100
        interquartile:
          left: 2
          right: 8
      properties:
        for:
          $ref: '#/components/schemas/ForSetCodeChecks'
        metric:
          $ref: '#/components/schemas/CodeCheckMetricID'
        scale:
          $ref: '#/components/schemas/HistogramScale'
        ticks:
          description: Series of horizontal bar borders aka X axis. Their count is `len(y) + 1` because there are `N` intervals between `(N + 1)` ticks.
          items:
            oneOf:
            - type: number
            - $ref: '#/components/schemas/TimeDuration'
          type: array
        frequencies:
          description: Series of histogram bar heights aka Y axis.
          items:
            minimum: 0
            type: integer
          type: array
        interquartile:
          $ref: '#/components/schemas/Interquartile'
      required:
      - for
      - frequencies
      - interquartile
      - metric
      - scale
      - ticks
      type: object
    Quantiles:
      description: 'Cut the distributions at certain quantiles.

        The default values are [0, 1] which means no cutting.'
      example:
      - 0
      - 0.95
      items:
        maximum: 1
        minimum: 0
        type: number
      maxItems: 2
      minItems: 2
      type: array
    JIRAStatusCategory:
      description: The category of a JIRA issue status.
      enum:
      - To Do
      - In Progress
      - Done
      - No Category
      type: string
    PullRequestMetricID:
      description: 'Currently supported PR metric types.

        * `pr-wip-time`: average time spent in Work In Progress stage.

        * `pr-wip-time-below-threshold-ratio`: ratio of PRs with a `pr-wip-time` below the threshold, disregarding the quantiles. The default threshold is 1 day.

        * `pr-wip-count`: number of PRs used to calculate `pr-wip-time` disregarding the quantiles.

        * `pr-wip-count-q`: number of PRs used to calculate `pr-wip-time` after applying the quantiles.

        * `pr-review-time`: average time spent in Review stage.

        * `pr-review-count`: number of PRs used to calculate `pr-review-time` disregarding the quantiles.

        * `pr-review-count-q`: number of PRs used to calculate `pr-review-time` after applying the quantiles.

        * `pr-review-time-below-threshold-ratio`: ratio of PRs with a `pr-review-time` below the threshold, disregarding the quantiles. The default threshold is 2 days.

        * `pr-merging-time`: average time spent in Merge stage.

        * `pr-merging-time-below-threshold-ratio`: ratio of PRs with a `pr-merging-time` below the threshold, disregarding the quantiles. The default threshold is 4 hours.

        * `pr-merging-count`: number of PRs used to calculate `pr-merging-time` disregarding the quantiles.

        * `pr-merging-count-q`: number of PRs used to calculate `pr-merging-time` after applying the quantiles.

        * `pr-release-time`: average time spent in Release stage.

        * `pr-release-count`: number of PRs used to calculate `pr-release-time` disregarding the quantiles.

        * `pr-release-count-q`: number of PRs used to calculate `pr-release-time` after applying the quantiles.

        * `pr-open-time`: average time the PR stayed open.

        * `pr-open-count`: number of PRs used to calculate `pr-open-time` disregarding the quantiles.

        * `pr-open-count-q`: number of PRs used to calculate `pr-open-time` after applying the quantiles.

        * `pr-open-time-below-threshold-ratio`: ratio of PRs with a `pr-open-time` below the threshold, disregarding the quantiles. The default threshold is 3 days.

        * `pr-cycle-time`: average PR Cycle - time between the work started and the release.

        * `pr-cycle-time-below-threshold-ratio`: ratio of PRs with a `pr-cycle-time` below the threshold, disregarding the quantiles. The default threshold is 5 days.

        * `pr-cycle-count`: number of PRs used to calculate `pr-cycle-time` disregarding the quantiles. It should be the same as `pr-release-count`.

        * `pr-cycle-count-q`: number of PRs used to calculate `pr-cycle-time` after applying the quantiles.

        * `pr-lead-time`: deprecated alias for `pr-cycle-time`

        * `pr-lead-time-below-threshold-ratio`: deprecated alias for `pr-cycle-time-below-threshold-ratio`

        * `pr-lead-count`: deprecated alias for `pr-cycle-count`

        * `pr-lead-count-q`: deprecated alias for `pr-cycle-count-q`

        * `pr-live-cycle-time`: Live Cycle Time - sum of corresponding `pr-wip-time`, `pr-review-time`, `pr-merging-time`, and `pr-release-time`.

        * `pr-live-cycle-count`: number of PRs used to calculate `pr-cycle-time` disregarding the quantiles. It equals to the overall number of PRs observed in the given time window.

        * `pr-live-cycle-count-q`: number of PRs used to calculate `pr-cycle-time` after applying the quantiles.

        * `pr-all-count`: equals to the sum of `pr-live-cycle-count` with the number of PRs which are still not done on the specified time interval but don''t have any stage-changing events. This metric should be exactly the same as the number of PRs returned by `/filter/pull_requests`. The quantiles are ignored.

        * `pr-wait-first-review-time`: average time of waiting for the first review.

        * `pr-wait-first-review-count`: number of PRs used to calculate `pr-wait-first-review`. Note: this is *not* the same as the number of PRs waiting for the first review.

        * `pr-wait-first-review-count-q`: number of PRs used to calculate `pr-wait-first-review` after applying the quantiles.

        * `pr-wait-first-review-time-below-threshold-ratio`: ratio of PRs with a `pr-wait-first-review` below the threshold, disregarding the quantiles. The default threshold is 6 hours.

        * `pr-deployment-time`: average time between when the PR was released and was deployed. We track deployments through `/events/deployments`. Requires setting `ForSetPullRequests.environments`.

        * `pr-deployment-count`: number of PRs used to calculate `pr-deployment-time` disregarding the quantiles. It equals to the overall number of deployed PRs in the given time window. Requires setting `ForSetPullRequests.environments`.

        * `pr-deployment-count-q`: number of PRs used to calculate `pr-deployment-time` after applying the quantiles. Requires setting `ForSetPullRequests.environments`.

        * `pr-lead-deployment-time`: extended Lead Time that includes the time passed since the PR was released until it was deployed. We discard PRs in repositories without deployments. Requires setting `ForSetPullRequests.environments`.

        * `pr-lead-deployment-count`: number of PRs used to calculate `pr-lead-deployment-time` disregarding the quantiles. It equals to the overall number of deployed PRs in the given window and duplicates `pr-deployment-count`. Requires setting `ForSetPullRequests.environments`.

        * `pr-lead-deployment-count-q`: number of PRs used to calculate `pr-lead-deployment-time` after applying the quantiles. Requires setting `ForSetPullRequests.environments`.

        * `pr-cycle-deployment-time`: extended Cycle Time that includes `pr-deployment-time`. We discard PRs in repositories without deployments. Requires setting `ForSetPullRequests.environments`.

        * `pr-cycle-deployment-count`: number of PRs used to calculate `pr-cycle-deployment-time` disregarding the quantiles. It equals to the overall number of deployed PRs in the given window and duplicates `pr-deployment-count` and `pr-lead-deployment-count`. Requires setting `ForSetPullRequests.environments`.

        * `pr-cycle-deployment-count-q`: number of PRs used to calculate `pr-cycle-deployment-time` after applying the quantiles. Requires setting `ForSetPullRequests.environments`.

        * `pr-cycle-deployment-time-below-threshold-ratio`: ratio of PRs with a `pr-cycle-deployment-count` below the threshold, disregarding the quantiles. The default threshold is 5 days.

        * `pr-flow-ratio`: ratio of opened to closed PRs.

        * `pr-opened`: number of opened PRs.

        * `pr-reviewed`: number of PRs which received a review.

        * `pr-reviewed-closed`: number of closed (merged or rejected) PRs which received a review.

        * `pr-not-reviewed`: number of closed (merged or rejected) PRs without any review.

        * `pr-reviewed-ratio`: ratio of `pr-reviewed` to `pr-reviewed` + `pr-not-reviewed`.

        * `pr-merged`: number of merged PRs.

        * `pr-rejected`: number of rejected (closed unmerged) PRs.

        * `pr-closed`: number of closed PRs = `pr-merged` + `pr-rejected`.

        * `pr-done`: number of released, rejected, and force push dropped PRs.

        * `pr-size`: average size of PRs (added + deleted lines) which are active on the time interval after applying the quantiles.

        * `pr-size-below-threshold-ratio`: ratio of PRs with a `pr-size` below or equal to the threshold, disregarding the quantiles. The default threshold is 100 lines.

        * `pr-median-size`: median size of PRs (added + deleted lines) which are active on the time interval ignoring the quantiles.

        * `pr-wip-pending-count`: number of PRs currently in Work In Progress stage.

        * `pr-review-pending-count`: number of PRs currently in Review stage.

        * `pr-merging-pending-count`: number of PRs currently in Merge stage.

        * `pr-release-pending-count`: number of PRs currently in Release stage.

        * `pr-opened-mapped-to-jira`: ratio of created PRs that are mapped to JIRA issues.

        * `pr-done-mapped-to-jira`: ratio of rejected or released PRs that are mapped to JIRA issues.

        * `pr-all-mapped-to-jira`: ratio of all observed PRs that are mapped to JIRA issues.

        * `pr-participants-per`: average number of PR particpants excluding the releasers and the bots.

        * `pr-review-comments-per`: average number of PR review comments for reviewed PRs, bots excluded.

        * `pr-review-comments-per-above-threshold-ratio`: ratio of PRs with a `pr-review-comments-per` above or equal to the threshold, disregarding the quantiles. The threshold is 3 comments.

        * `pr-reviews-per`: average number of PR reviews for reviewed PRs, bots excluded.

        * `pr-comments-per`: average number of PR comments, both regular and review, for reviewed PRs, bots excluded.'
      enum:
      - pr-wip-time
      - pr-wip-time-below-threshold-ratio
      - pr-wip-count
      - pr-wip-count-q
      - pr-review-time
      - pr-review-count
      - pr-review-count-q
      - pr-review-time-below-threshold-ratio
      - pr-merging-time
      - pr-merging-time-below-threshold-ratio
      - pr-merging-count
      - pr-merging-count-q
      - pr-release-time
      - pr-release-count
      - pr-release-count-q
      - pr-open-time
      - pr-open-count
      - pr-open-count-q
      - pr-open-time-below-threshold-ratio
      - pr-lead-time
      - pr-lead-time-below-threshold-ratio
      - pr-lead-count
      - pr-lead-count-q
      - pr-cycle-time
      - pr-cycle-time-below-threshold-ratio
      - pr-cycle-count
      - pr-cycle-count-q
      - pr-live-cycle-time
      - pr-live-cycle-count
      - pr-live-cycle-count-q
      - pr-all-count
      - pr-wait-first-review-time
      - pr-wait-first-review-count
      - pr-wait-first-review-count-q
      - pr-wait-first-review-time-below-threshold-ratio
      - pr-deployment-time
      - pr-deployment-count
      - pr-deployment-count-q
      - pr-lead-deployment-time
      - pr-lead-deployment-count
      - pr-lead-deployment-count-q
      - pr-cycle-deployment-time
      - pr-cycle-deployment-count
      - pr-cycle-deployment-count-q
      - pr-cycle-deployment-time-below-threshold-ratio
      - pr-flow-ratio
      - pr-opened
      - pr-reviewed
      - pr-reviewed-closed
      - pr-not-reviewed
      - pr-reviewed-ratio
      - pr-merged
      - pr-rejected
      - pr-closed
      - pr-done
      - pr-size
      - pr-size-below-threshold-ratio
      - pr-median-size
      - pr-wip-pending-count
      - pr-review-pending-count
      - pr-merging-pending-count
      - pr-release-pending-count
      - pr-opened-mapped-to-jira
      - pr-done-mapped-to-jira
      - pr-all-mapped-to-jira
      - pr-participants-per
      - pr-review-comments-per
      - pr-review-comments-per-above-threshold-ratio
      - pr-reviews-per
      - pr-comments-per
      example: pr-lead-time
      type: string
    TimeZone:
      description: Local time zone offset in minutes, used to adjust `date_from` and `date_to`.
      maximum: 780
      minimum: -720
      type: integer
    ForSetCodeChecks:
      additionalProperties: false
      description: 'Filters for `/metrics/code_checks` and `/histograms/code_checks`.

        Achieve the best performance by packing all your filters in a single `ForSetCodeChecks`

        instead of sending multiple `ForSetCodeChecks`-s. For example, use `repogroups` and `pushers`

        to request separate metrics for several repository sets and teams.

        '
      example:
        repositories:
        - github.com/athenianco/athenian-webapp
        - github.com/athenianco/athenian-api
        pushers:
        - github.com/vmarkovtsev
        - github.com/dpordomingo
        jira:
          labels_include:
          - bug
      properties:
        repositories:
          $ref: '#/components/schemas/RepositorySet'
        repogroups:
          $ref: '#/components/schemas/IndexedGroups'
        pushers:
          $ref: '#/components/schemas/CommitPushers'
        pusher_groups:
          description: 'Check runs must be triggered by commits authored by these people.

            We aggregate by each group so that you can request metrics of several teams at once.

            We treat `pushers` as another group, if specified.'
          items:
            $ref: '#/components/schemas/CommitPushers'
          type: array
        labels_include:
          description: At least one of these labels must be present in the checked PRs.
          items:
            type: string
          type: array
        labels_exclude:
          description: None of these labels must be present in each checked PR.
          items:
            type: string
          type: array
        jira:
          allOf:
          - description: Analyze only those check runs that belong to PRs mapped to JIRA issues that satisfy this filter.
          - $ref: '#/components/schemas/JIRAFilter'
        lines:
          description: Split by changed number of lines (inserted + removed) in pull requests.
          items:
            minimum: 0
            type: integer
          minItems: 2
          type: array
      required:
      - repositories
      type: object
    CodeCheckHistogramDefinition:
      additionalProperties: false
      description: 'Histogram parameters: topic, bins.'
      example:
        metric: chk-suite-time
        ticks:
        - 60s
        - 120s
        - 180s
        - 360s
        - 720s
        - 1440s
      properties:
        metric:
          $ref: '#/components/schemas/CodeCheckMetricID'
        scale:
          allOf:
          - $ref: '#/components/schemas/HistogramScale'
          - description: Histogram's X axis scale.
        bins:
          description: Number of bars in the hi

# --- truncated at 32 KB (61 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/athenian/refs/heads/main/openapi/athenian-histograms-api-openapi.yml