{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition","icon"]},"type":"markdown"},"seo":{"title":"APIキー IP Allowlist","description":"Treasure APIを使用することで、お客様はAPIキーに対する追加のIP Allowlistアクセス制御を利用できます。これにより、APIキーのアクセスを信頼できるIP範囲に制限し、アカウントとキーをより強力に保護できます。","siteUrl":"https://docs.treasure.ai","lang":"en-US","jsonLd":{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.treasure.ai/","name":"Treasure AI","url":"https://www.treasure.ai/","logo":"https://www.treasure.ai/hubfs/assets/images/logos/primary-logo.svg"},{"@type":"WebSite","@id":"https://docs.treasure.ai/#website","name":"Treasure AI Documentation","url":"https://docs.treasure.ai/","inLanguage":["en","ja"],"publisher":{"@id":"https://www.treasure.ai/"}}]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"apiキー-ip-allowlist","__idx":0},"children":["APIキー IP Allowlist"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure APIを使用することで、お客様はAPIキーに対する追加のIP Allowlistアクセス制御を利用できます。これにより、APIキーのアクセスを信頼できるIP範囲に制限し、アカウントとキーをより強力に保護できます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"制限スコープ","__idx":1},"children":["制限スコープ"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["restriction_scopeパラメータは、IP Allowlistエントリがトラフィックにどのように適用されるかを定義します。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["all: ブラウザアクセスとAPIキーアクセスの両方を、リストされたIPに制限します。これは、Webコンソールを通じてIP Allowlistを設定した場合のIP Allowlist設定です。API呼び出しを通じても設定できます。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["api_key_only: APIキーアクセスのみを制限し、ユーザーのブラウザアクセスには影響しません。この設定はAPI呼び出しを通じてのみ設定できます。"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["このパラメータは、すべてのユーザーに影響するアカウント/ネットワークレベル、および/または個々のユーザーレベルで設定できます。両方の設定が存在する場合、特定のユーザーに対してはユーザーレベルの設定が常にアカウントレベルのIP Allowlistを置き換えます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"優先順位ルール","__idx":2},"children":["優先順位ルール"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["IP AllowlistエントリでallとAPI_key_onlyの両方が設定されている場合のIPアクセス"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"restriction_scope = all & restriction_scope = api_key_only"},"children":["restriction_scope = all & restriction_scope = api_key_only"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"IPがallとapi_key_onlyの両方に一致"},"children":["IPがallとapi_key_onlyの両方に一致"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"IPがallのみに一致"},"children":["IPがallのみに一致"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"IPがapi_key_onlyのみに一致"},"children":["IPがapi_key_onlyのみに一致"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"一致するIPなし"},"children":["一致するIPなし"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ユーザーのブラウザアクセス"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅¹"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["❌"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ユーザーのAPIキーアクセス"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["❌²"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["❌"]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["注意 ",{"$$mdtype":"Tag","name":"Icon","attributes":{"name":"book","size":"1em","color":"currentColor"},"children":[]},":"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["restriction_scope = allには、デフォルトの拒否アクセスルールは存在しません。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["restriction_scope = api_key_onlyが設定されている場合、デフォルトの拒否アクセスがトリガーされます。"]}]}]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":2},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["IP Allowlistエントリでallのみが設定されている場合のIPアクセス"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"restriction_scope = all"},"children":["restriction_scope = all"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"IPが一致"},"children":["IPが一致"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"IPが一致しない"},"children":["IPが一致しない"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ユーザーのブラウザアクセス"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["❌"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ユーザーのAPIキーアクセス"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["❌"]}]}]}]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":3},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["IP Allowlistエントリでapi_key_onlyのみが設定されている場合のIPアクセス"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"restriction_scope = api_key_only"},"children":["restriction_scope = api_key_only"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"IPが一致"},"children":["IPが一致"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"IPが一致しない"},"children":["IPが一致しない"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ユーザーのブラウザアクセス"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ユーザーのAPIキーアクセス"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["❌"]}]}]}]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":4},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["IP Allowlist機能が設定されていない場合のユーザーアクセス"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"restriction_scopeが未設定"},"children":["restriction_scopeが未設定"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"すべてのアカウントユーザー"},"children":["すべてのアカウントユーザー"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ユーザーのブラウザアクセス"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ユーザーのAPIキーアクセス"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"アカウントレベルまたはユーザーレベルのapiキー-ip-allowlistの作成","__idx":3},"children":["アカウントレベルまたはユーザーレベルのAPIキー IP Allowlistの作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["コンソールでのIP Allowlist設定と同様に、API呼び出しを使用して、すべてのユーザーを対象とするアカウントレベル、または個々のユーザーレベルでAPIキー用のIP Allowlistを設定できます。ユーザー固有のエントリはアカウントレベルのエントリよりも優先されます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["IP AllowlistのAPIエンドポイントは",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v4/ip_whitelist_entries"]},"です。"," ","以下は、単一ユーザーに対するAPIキー IP Allowlistエントリを作成する例です。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"POST /v4/ip_whitelist_entries\n{\n  \"ip\": \"192.168.100.0/24\",\n  \"user_id\": \"test_user_id\",\n  \"restriction_scope\": \"api_key_only\"\n}\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["顧客アカウントのすべてのユーザーにAPIキー IP Allowlistを適用するには、POSTリクエストにaccount_idを含めます："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"POST /v4/ip_whitelist_entries\n\n{\n  \"ip\": \"192.168.200.0/24\",\n  \"account_id\": \"test_account_id\",\n  \"restriction_scope\": \"api_key_only\"\n}\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ip-allowlistエントリの取得","__idx":4},"children":["IP Allowlistエントリの取得"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["すべてのIP Allowlistエントリを取得するには、/v4/ip_whitelist_entriesにGETリクエストを送信します。レスポンスには各エントリのrestriction_scopeが含まれます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"GET /v4/ip_whitelist_entries\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ip-allowlistエントリの更新","__idx":5},"children":["IP Allowlistエントリの更新"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["既存のIP Allowlistエントリを更新するには、エントリのIDと新しいrestriction_scope値を指定して/v4/ip_whitelist_entries/{id}にPATCHリクエストを送信します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"PATCH /v4/ip_whitelist_entries/{id}\n\n{\n  \"restriction_scope\": \"all\"\n}\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ip-allowlistエントリの削除","__idx":6},"children":["IP Allowlistエントリの削除"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["IP Allowlistエントリを削除するには、エントリのIDを指定して",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v4/ip_whitelist_entries/{id}"]},"にDELETEリクエストを送信します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"DELETE /v4/ip_whitelist_entries/{id}\n","lang":"http"},"children":[]}]},"headings":[{"value":"APIキー IP Allowlist","id":"apiキー-ip-allowlist","depth":1},{"value":"制限スコープ","id":"制限スコープ","depth":2},{"value":"優先順位ルール","id":"優先順位ルール","depth":2},{"value":"アカウントレベルまたはユーザーレベルのAPIキー IP Allowlistの作成","id":"アカウントレベルまたはユーザーレベルのapiキー-ip-allowlistの作成","depth":2},{"value":"IP Allowlistエントリの取得","id":"ip-allowlistエントリの取得","depth":2},{"value":"IP Allowlistエントリの更新","id":"ip-allowlistエントリの更新","depth":2},{"value":"IP Allowlistエントリの削除","id":"ip-allowlistエントリの削除","depth":2}],"frontmatter":{"seo":{"title":"APIキー IP Allowlist","description":"Treasure APIを使用することで、お客様はAPIキーに対する追加のIP Allowlistアクセス制御を利用できます。これにより、APIキーのアクセスを信頼できるIP範囲に制限し、アカウントとキーをより強力に保護できます。"}},"lastModified":"2026-06-01T09:34:27.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/products/control-panel/security/ip-allowlist/api-key-ip-allowlist","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}