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

# 替换 IP 访问列表

<Warning>
  这是一项可能造成破坏性后果的操作。此端点会**替换**整个 IP 访问列表——请求体中未包含的任何 IP 范围都会被移除，这可能导致用户和集成无法访问。请在每次请求中包含所有需要的 IP 范围。
</Warning>

<div id="permissions">
  ## 权限
</div>

需要一名在 Enterprise 级别拥有 `ManageIPWhitelist` 权限的服务用户。


## OpenAPI

````yaml zh/v3-openapi.yaml PUT /v3/enterprise/ip-access-list
openapi: 3.1.0
info:
  description: 采用 Service User 身份验证和 RBAC 的 Devin v3 API
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3/enterprise/ip-access-list:
    put:
      tags:
        - ip-access-list
      summary: 替换 IP 访问列表
      operationId: handle_replace_ip_access_list_v3_enterprise_ip_access_list_put
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IpAccessListReplaceRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IpAccessListResponse'
          description: 成功响应
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 验证错误
components:
  schemas:
    IpAccessListReplaceRequest:
      properties:
        ip_ranges:
          items:
            type: string
          title: Ip Ranges
          type: array
      required:
        - ip_ranges
      title: IpAccessListReplaceRequest
      type: object
    IpAccessListResponse:
      properties:
        ip_ranges:
          items:
            type: string
          title: Ip Ranges
          type: array
      required:
        - ip_ranges
      title: IpAccessListResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearerAuth:
      description: 服务用户凭据（前缀：cog_）
      scheme: bearer
      type: http

````