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

# 列出精确匹配代码仓库的审查计费规则

> 列出调用者在此作用域内可以管理的计费规则。

组织范围内的分页结果可能条目较少或为空。请继续获取后续页面，直到
``has_next_page`` 为 false。

列出调用方在企业账户中有权管理的 [Devin Review](https://docs.devinenterprise.com/zh/work-with-devin/devin-review.md#review-effort-and-billing-organization) 代码仓库计费规则。每条规则会将某个指定代码仓库此后产生的 Review 用量计入一个组织或一个[预算](https://docs.devinenterprise.com/zh/admin/billing/budgets.md)。如需创建或修改规则，请使用[设置代码仓库计费规则](https://docs.devinenterprise.com/zh/api-reference/v3/review-billing-rules/put-enterprise-review-billing-rule.md)；如需移除规则，请使用[删除代码仓库计费规则](https://docs.devinenterprise.com/zh/api-reference/v3/review-billing-rules/delete-enterprise-review-billing-rule.md)。

## 权限

需要使用在企业级具有 `ManageReview` 权限的[服务用户](https://docs.devinenterprise.com/zh/api-reference/v3/service-users/members-service-users.md)或[个人访问令牌](https://docs.devinenterprise.com/zh/api-reference/personal-access-tokens.md)。

## 行为

* 结果采用分页返回。当 `has_next_page` 为 `true` 时，传入 `first` (每页大小) 和 `after` (上一页的 `end_cursor`) 以获取下一页。
* 对于 github.com，`repository` 的格式为 `owner/repo`；对于其他服务提供商，格式为 `host/path`。
* `bill_to.type` 为 `organization` 或 `budget`，`bill_to.id` 为付费方的组织 ID 或预算 ID。

计费规则决定由谁为审查付费。如需管理哪些拉取请求会被自动审查，请使用 Review triggers API：[列出触发器](https://docs.devinenterprise.com/zh/api-reference/v3/review-triggers/list-review-triggers.md)、[创建、替换或删除触发器](https://docs.devinenterprise.com/zh/api-reference/v3/review-triggers/update-review-triggers.md)，以及[列出触发器作用域](https://docs.devinenterprise.com/zh/api-reference/v3/review-triggers/list-review-trigger-scopes.md)。


## OpenAPI

````yaml zh/v3-openapi.yaml GET /v3beta1/enterprise/review-settings/repo-billing-rules
openapi: 3.1.0
info:
  description: 采用 Service User 身份验证和 RBAC 的 Devin v3 API
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3beta1/enterprise/review-settings/repo-billing-rules:
    get:
      tags:
        - review-billing
      summary: 列出精确匹配代码仓库的审查计费规则
      description: |-
        列出调用者在此作用域内可以管理的计费规则。

        组织范围内的分页结果可能条目较少或为空。请继续获取后续页面，直到
        ``has_next_page`` 为 false。
      operationId: >-
        handle_list_review_repo_billing_rules_v3beta1_enterprise_review_settings_repo_billing_rules_get
      parameters:
        - in: query
          name: after
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: After
        - in: query
          name: first
          required: false
          schema:
            default: 100
            maximum: 200
            minimum: 1
            title: First
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PaginatedResponse_ReviewRepoBillingRuleResponse_
          description: 成功响应
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 未授权
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 禁止访问
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 未找到
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 冲突
        '410':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 已移除
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 无法处理的内容
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 请求过多
components:
  schemas:
    PaginatedResponse_ReviewRepoBillingRuleResponse_:
      properties:
        end_cursor:
          anyOf:
            - type: string
            - type: 'null'
          description: 用于获取下一页的游标；如果当前页是最后一页，则为 None。
          title: End Cursor
        has_next_page:
          default: false
          description: 当前页之后是否还有更多条目。
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/ReviewRepoBillingRuleResponse'
          title: Items
          type: array
        total:
          anyOf:
            - type: integer
            - type: 'null'
          description: 可选的条目总数（可为提高性能而省略）。
          title: Total
      required:
        - items
      title: PaginatedResponse[ReviewRepoBillingRuleResponse]
      type: object
    ProblemDetail:
      description: >-
        v3 API 的 RFC 9457 application/problem+json 错误响应体。


        detail 沿用自旧版 {"detail": ...} 响应体，以保持向后兼容；其他成员字段为新增字段。errors
        包含字段级验证失败信息（仅 422）。
      properties:
        detail:
          anyOf:
            - type: string
            - type: 'null'
          description: 针对此次具体情况的、便于人理解的说明。
          title: Detail
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          description: 因操作被阻止而拒绝请求时返回的机器可读代码（例如 "user_frozen"、"migrated_session"）。
          title: Error Code
        errors:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          description: 字段级验证错误（仅适用于 422 响应）。
          title: Errors
        instance:
          anyOf:
            - type: string
            - type: 'null'
          description: 此次出现对应的 URI 引用（请求路径）。
          title: Instance
        status:
          description: HTTP 状态码。
          title: Status
          type: integer
        title:
          description: 对问题类型的简短、便于理解的概述。
          title: Title
          type: string
        type:
          default: about:blank
          description: 用于标识问题类型的 URI 引用。
          title: Type
          type: string
      required:
        - title
        - status
      title: ProblemDetail
      type: object
    ReviewRepoBillingRuleResponse:
      properties:
        bill_to:
          $ref: '#/components/schemas/ReviewRepoBillingRuleBillTo'
          description: 该代码仓库后续 Devin Review 用量的付费方
        created_at:
          title: Created At
          type: integer
        id:
          description: 计费规则 ID，用于删除该规则
          title: Id
          type: string
        repository:
          description: github.com 使用 'owner/repo' 格式，其他服务提供商使用 'host/path' 格式
          title: Repository
          type: string
        updated_at:
          title: Updated At
          type: integer
      required:
        - id
        - repository
        - bill_to
        - created_at
        - updated_at
      title: ReviewRepoBillingRuleResponse
      type: object
    ReviewRepoBillingRuleBillTo:
      properties:
        id:
          description: 组织 ID 或预算 ID
          maxLength: 256
          minLength: 1
          title: Id
          type: string
        type:
          description: 费用由组织还是预算承担
          enum:
            - organization
            - budget
          title: Type
          type: string
      required:
        - type
        - id
      title: ReviewRepoBillingRuleBillTo
      type: object
  securitySchemes:
    bearerAuth:
      description: 服务用户凭据（前缀：cog_）
      scheme: bearer
      type: http

````

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