> ## 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.

# Devin Connect gatewayから宛先を削除

> gateway のリストから宛先を削除します。リストにない宛先は無視されます。

[Devin Connect](https://docs.devin.ai/ja/enterprise/deployment/devin-connect.md) の gateway から、リクエストボディで指定した宛先を**削除**します。IPv4 CIDR には `/` が含まれるため、宛先はパスではなくボディで指定します。

## 権限

エンタープライズレベルで `ManageEnterpriseSettings` 権限を持つ[サービスユーザー](https://docs.devin.ai/ja/api-reference/v3/service-users/members-service-users.md)または[個人用アクセストークン](https://docs.devin.ai/ja/api-reference/personal-access-tokens.md)が必要です。また、エンタープライズで Devin Connect が有効になっている必要があります。有効になっていない場合、このエンドポイントは `403` を返します。

## 動作

* 宛先は [gateway の宛先を追加](https://docs.devin.ai/ja/api-reference/v3/devin-connect/post-enterprise-devin-connect-gateway-destinations.md) と同じ形式で指定し、マッチングの前に同じ方法で正規化されます。
* gateway がルーティングしていない宛先は無視されるため、同じ削除を繰り返しても問題ありません。
* すべての宛先を削除するには、空のリストを指定して [gateway の宛先を置き換え](https://docs.devin.ai/ja/api-reference/v3/devin-connect/put-enterprise-devin-connect-gateway-destinations.md) を利用してください。
* gateway から宛先を削除しても、[セキュリティプロファイル](https://docs.devin.ai/ja/product-guides/security-profiles.md) は変更されません。そのホストへのアクセスを今後許可しない場合は、プロファイルの `net_policy.allow` からホストを別途削除してください。
* 変更内容は [監査ログ](https://docs.devin.ai/ja/api-reference/v3/audit-logs/enterprise-audit-logs.md) に `update_gateway_hostnames` として記録されます。


## OpenAPI

````yaml ja/v3-openapi.yaml DELETE /v3beta1/enterprise/devin-connect/gateways/{gateway_id}/destinations
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/devin-connect/gateways/{gateway_id}/destinations:
    delete:
      tags:
        - devin-connect
      summary: Devin Connect gatewayから宛先を削除
      description: gateway のリストから宛先を削除します。リストにない宛先は無視されます。
      operationId: >-
        handle_remove_devin_connect_gateway_destinations_v3beta1_enterprise_devin_connect_gateways__gateway_id__destinations_delete
      parameters:
        - in: path
          name: gateway_id
          required: true
          schema:
            title: Gateway Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DevinConnectDestinationsRemoveRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DevinConnectGateway'
          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:
    DevinConnectDestinationsRemoveRequest:
      description: 1つのgatewayから宛先を削除します。
      properties:
        destinations:
          description: 削除する宛先。gatewayに登録されていない宛先は無視されるため、削除を繰り返しても安全です。
          items:
            $ref: '#/components/schemas/DevinConnectDestination'
          title: Destinations
          type: array
      required:
        - destinations
      title: DevinConnectDestinationsRemoveRequest
      type: object
    DevinConnectGateway:
      description: Devin Connect gatewayと、それを経由してルーティングされる宛先。
      properties:
        connected:
          anyOf:
            - type: boolean
            - type: 'null'
          description: トンネルgatewayが現在接続されているかどうか。directの場合はnull
          title: Connected
        destinations:
          description: このgateway経由でルーティングされる宛先
          items:
            $ref: '#/components/schemas/DevinConnectDestination'
          title: Destinations
          type: array
        gateway_id:
          description: gatewayのID
          title: Gateway Id
          type: string
        kind:
          description: >-
            tunnel：顧客側のgatewayから接続します。direct：Devinからgatewayに接続します（例：AWS
            PrivateLink経由）
          enum:
            - tunnel
            - direct
          title: Kind
          type: string
        last_connected_at:
          anyOf:
            - type: integer
            - type: 'null'
          description: トンネルgatewayから最後に通信があった日時
          title: Last Connected At
        name:
          description: gateway名
          title: Name
          type: string
      required:
        - gateway_id
        - name
        - kind
        - destinations
      title: DevinConnectGateway
      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
    DevinConnectDestination:
      description: 1つの宛先：``hostname``または``ipv4``のいずれか一方のみ。
      properties:
        hostname:
          anyOf:
            - type: string
            - type: 'null'
          description: 完全一致のDNS名（ワイルドカード不可）。例：git.corp.example
          title: Hostname
        ipv4:
          anyOf:
            - type: string
            - type: 'null'
          description: IPv4アドレスまたはCIDR。例：10.20.0.0/16。アドレスのみの場合は/32として扱われます
          title: Ipv4
      title: DevinConnectDestination
      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.