> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runaether.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Count the organization's pull requests per section

> Counts the pull requests listPullRequests lists under the same view and filters, per section, in the order in_review, approved, other with empty sections left out: the whole list, before any section or cursor narrows it. Any member of the organization may call it, a viewer included, and a billing member may not. unreviewed with a view, an empty opened or updated window and a q that cannot be searched are refused with 422.



## OpenAPI

````yaml api-reference/openapi.json GET /orgs/{orgID}/pull-requests/sections
openapi: 3.1.0
info:
  title: Aether API
  version: 0.1.0
servers:
  - url: https://api.runaether.dev
security:
  - bearerAuth: []
paths:
  /orgs/{orgID}/pull-requests/sections:
    get:
      tags:
        - pull-requests
      summary: Count the organization's pull requests per section
      description: >-
        Counts the pull requests listPullRequests lists under the same view and
        filters, per section, in the order in_review, approved, other with empty
        sections left out: the whole list, before any section or cursor narrows
        it. Any member of the organization may call it, a viewer included, and a
        billing member may not. unreviewed with a view, an empty opened or
        updated window and a q that cannot be searched are refused with 422.
      operationId: listPullRequestSections
      parameters:
        - in: path
          name: orgID
          required: true
          schema:
            format: uuid
            type: string
        - description: >-
            reviews keeps the pull requests the organization's review runs
            reviewed, newest activity first (the later of the newest run and the
            merge); queue keeps the open ones among them, the ones whose newest
            run or posted verdict needs the caller first. Omitted is every pull
            request of a repository the organization has a non-archived project
            for, reviewed or not, newest opened first as GitHub orders them.
          explode: false
          in: query
          name: view
          schema:
            description: >-
              reviews keeps the pull requests the organization's review runs
              reviewed, newest activity first (the later of the newest run and
              the merge); queue keeps the open ones among them, the ones whose
              newest run or posted verdict needs the caller first. Omitted is
              every pull request of a repository the organization has a
              non-archived project for, reviewed or not, newest opened first as
              GitHub orders them.
            enum:
              - reviews
              - queue
            type: string
        - description: >-
            Keeps the pull requests of this project's repository, and the review
            runs of this project.
          explode: false
          in: query
          name: project_id
          schema:
            description: >-
              Keeps the pull requests of this project's repository, and the
              review runs of this project.
            format: uuid
            type: string
        - description: >-
            Comma-joined review-run statuses, matched against the latest run,
            the status the row displays; unreviewed matches a pull request with
            no runs, and only without a view.
          explode: false
          in: query
          name: status
          schema:
            description: >-
              Comma-joined review-run statuses, matched against the latest run,
              the status the row displays; unreviewed matches a pull request
              with no runs, and only without a view.
            pattern: >-
              ^(reviewing|completed|failed|cancelled|superseded|archived|unreviewed)(,(reviewing|completed|failed|cancelled|superseded|archived|unreviewed))*$
            type: string
        - description: >-
            Comma-joined pull request states to keep; a pull request whose state
            the mirror has not recorded is in none. Omitted without a view is
            open alone.
          explode: false
          in: query
          name: pr_state
          schema:
            description: >-
              Comma-joined pull request states to keep; a pull request whose
              state the mirror has not recorded is in none. Omitted without a
              view is open alone.
            pattern: ^(open|closed|merged)(,(open|closed|merged))*$
            type: string
        - description: >-
            author keeps the pull requests the caller opened, by the GitHub
            login their connection stores or by one of their tasks publishing
            it; involved adds the ones they review, by that login.
          explode: false
          in: query
          name: viewer
          schema:
            description: >-
              author keeps the pull requests the caller opened, by the GitHub
              login their connection stores or by one of their tasks publishing
              it; involved adds the ones they review, by that login.
            enum:
              - author
              - involved
            type: string
        - description: The GitHub login that opened the pull request, case-insensitively.
          explode: false
          in: query
          name: author
          schema:
            description: The GitHub login that opened the pull request, case-insensitively.
            pattern: ^[A-Za-z0-9][A-Za-z0-9_-]*(\[[bB][oO][tT]\])?$
            type: string
        - description: >-
            A GitHub login with a user review request or a submitted review on
            the pull request, never its author, case-insensitively.
          explode: false
          in: query
          name: reviewer
          schema:
            description: >-
              A GitHub login with a user review request or a submitted review on
              the pull request, never its author, case-insensitively.
            pattern: ^[A-Za-z0-9][A-Za-z0-9_-]*(\[[bB][oO][tT]\])?$
            type: string
        - description: The repository owner's login, case-insensitively.
          explode: false
          in: query
          name: repo_owner
          schema:
            description: The repository owner's login, case-insensitively.
            pattern: ^[A-Za-z0-9][A-Za-z0-9_-]*(\[[bB][oO][tT]\])?$
            type: string
        - description: The repository name, case-insensitively.
          explode: false
          in: query
          name: repo_name
          schema:
            description: The repository name, case-insensitively.
            pattern: ^[A-Za-z0-9._-]+$
            type: string
        - description: >-
            Keeps pull requests opened at or after this UTC instant; one
            mirrored before Aether kept GitHub's open time is dated by when
            Aether first saw it.
          explode: false
          in: query
          name: opened_after
          schema:
            description: >-
              Keeps pull requests opened at or after this UTC instant; one
              mirrored before Aether kept GitHub's open time is dated by when
              Aether first saw it.
            format: date-time
            pattern: >-
              ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,6})?Z$
            type: string
        - description: >-
            Keeps pull requests opened before this UTC instant; later than
            opened_after.
          explode: false
          in: query
          name: opened_before
          schema:
            description: >-
              Keeps pull requests opened before this UTC instant; later than
              opened_after.
            format: date-time
            pattern: >-
              ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,6})?Z$
            type: string
        - description: >-
            Keeps pull requests GitHub last updated at or after this UTC
            instant.
          explode: false
          in: query
          name: updated_after
          schema:
            description: >-
              Keeps pull requests GitHub last updated at or after this UTC
              instant.
            format: date-time
            pattern: >-
              ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,6})?Z$
            type: string
        - description: >-
            Keeps pull requests GitHub last updated before this UTC instant;
            later than updated_after.
          explode: false
          in: query
          name: updated_before
          schema:
            description: >-
              Keeps pull requests GitHub last updated before this UTC instant;
              later than updated_after.
            format: date-time
            pattern: >-
              ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,6})?Z$
            type: string
        - description: exclude leaves draft pull requests out.
          explode: false
          in: query
          name: drafts
          schema:
            description: exclude leaves draft pull requests out.
            enum:
              - exclude
            type: string
        - description: >-
            Trimmed; empty is no search. All digits, or # and digits, keeps the
            pull request with that number; anything else keeps the pull requests
            whose title holds its words in order, case-insensitively. Over 200
            characters, or a number beyond a pull request number's range, is
            refused.
          explode: false
          in: query
          name: q
          schema:
            description: >-
              Trimmed; empty is no search. All digits, or # and digits, keeps
              the pull request with that number; anything else keeps the pull
              requests whose title holds its words in order, case-insensitively.
              Over 200 characters, or a number beyond a pull request number's
              range, is refused.
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  items:
                    items:
                      $ref: '#/components/schemas/PRReviewSectionCount'
                    type: array
                required:
                  - items
                type: object
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PullRequestsErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PullRequestsErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgAuthorizationErrorResponse'
          description: Forbidden
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PullRequestsErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PullRequestsErrorResponse'
          description: Internal Server Error
components:
  schemas:
    PRReviewSectionCount:
      additionalProperties: false
      properties:
        count:
          format: int64
          minimum: 1
          type: integer
        section:
          $ref: '#/components/schemas/PRReviewSection'
      required:
        - section
        - count
      type: object
    PullRequestsErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - account_deleting
            - aether_inference_unserved
            - agent_pr_blocked
            - agent_pr_pending
            - agent_profile_changed
            - app_identity_missing
            - attribution_unavailable
            - bad_gateway
            - bad_request
            - caller_inactive
            - conflict
            - connection_harness_mismatch
            - connection_not_held
            - contents_write_required
            - continuation_failed
            - continuation_unavailable
            - control_forbidden
            - embeddings_unavailable
            - fix_not_requested
            - fix_requests_unrecorded
            - forbidden
            - fork_branch_delete_unsupported
            - fork_forbidden
            - gateway_timeout
            - github_failed
            - github_identity_required
            - github_push_access_required
            - gone
            - handed_branch_protected
            - head_moved
            - idempotency_key_conflict
            - idempotency_key_reused
            - inference_proxy_unavailable
            - insufficient_credits
            - insufficient_inference_balance
            - internal_error
            - invalid_request
            - mcp_server_not_connected
            - message_not_queued
            - method_not_allowed
            - mode_forbidden
            - no_dispatch_target
            - not_acceptable
            - not_found
            - not_implemented
            - onboarding_already_completed
            - onboarding_requirements_missing
            - org_id_required
            - org_role_insufficient
            - org_suspended
            - payment_required
            - pr_review_actor_required
            - pr_review_publish_forbidden
            - precondition_failed
            - project_has_no_repository
            - project_required
            - pull_request_closed
            - pull_request_mirror_failed
            - pull_request_not_mirrored
            - queued_stop_requires_discard
            - rate_limited
            - request_canceled
            - request_timeout
            - request_too_large
            - service_unavailable
            - stack_cycle
            - stack_too_large
            - stack_two_parents
            - stale_execution
            - stale_or_indeterminate
            - stale_pending_input
            - stream_delivery_gap
            - stream_event_conflict
            - task_awaiting_message
            - task_awaiting_tool_response
            - task_connection_disconnected
            - task_creator_deleted
            - task_has_no_repository
            - task_ineligible
            - task_not_accepting_messages
            - task_not_pinnable
            - task_settings_changed
            - teleport_unavailable
            - unauthenticated
            - unsigned_aether_head
            - unsigned_commit
            - unsupported_changes
            - unsupported_media_type
            - untyped_error
            - validation_failed
            - workspace_git_unavailable
            - workspace_rejected
          minLength: 1
          type: string
        error:
          minLength: 1
          type: string
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
      required:
        - error
        - code
      type: object
    OrgAuthorizationErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - org_membership_required
            - org_role_insufficient
            - org_suspended
            - account_deleting
            - agent_host_route_not_allowed
            - credential_kind_not_admitted
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
        - code
      type: object
    PRReviewSection:
      enum:
        - in_review
        - approved
        - other
      type: string
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.