{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"データモデルのAPIキーの置き換え","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"データモデルのapiキーの置き換え","__idx":0},"children":["データモデルのAPIキーの置き換え"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["現在のTreasure APIキーを新しいTreasure APIキーに置き換えるには、次の手順に従ってください。これにより、既存のデータモデルを再作成することなくデータモデルを構築できます。データモデルでTreasure APIキーをローテーションするには、次のREST APIリクエストを使用します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -i -X PUT 'https://API_ENDPOINT/reporting/datamodels/YOUR_DATAMODEL_OID' \\\n--header 'Content-Type: application/json' \\\n--header \"Authorization: TD1 YOUR_TD_APIKEY\" \\\n--data '{\n        \"datamodel\": {\n           \"apikey\": \"YOUR_TD_APIKEY\"\n        }\n}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["実行するには、次の3つのパラメーターを更新する必要があります。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["API_ENDPOINT"]},": Treasure Dataリージョンを指します。",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["US: api.treasuredata.com"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["EU01: api.eu01.treasuredata.com"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Korea: api.ap02.treasuredata.com"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Tokyo: api.treasuredata.co.jp"," ","Treasure Dataリージョンを確認するには、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/endpoints/endpoints"},"children":["サイトとエンドポイント"]},"を参照してください。"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["YOUR_DATAMODEL_OID"]},": データモデルの値。この値はTreasure コンソールのURLから取得できます。データモデルURLの",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/app/admin/datamodels/<VALUE>"]},"を参照してください。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["YOUR_TD_APIKEY"]},": Master Treasure APIキーが必要です。次のドキュメントは、Treasure APIキーの取得方法を説明しています:",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/my-settings/getting-your-api-keys"},"children":["Getting your API keys"]},"。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["リクエストが実行されると、データモデルのTreasure APIキーが指定したTreasure APIキーによってローテーションされ、次のような200成功レスポンスとともにデータモデル情報が取得されます:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"    {\"oid\":\"93d34997-xxxx-xxxx-xxxx-xxxxxxxxx\",\"name\":\"your_datamodel_name\",\"type\":\"elasticube\",\n    ...\n    ,\"relations\":[]}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["コマンドの後にデータモデルをビルドすると、APIキーのローテーションが機能していることを確認できます。この操作についてさらにサポートが必要な場合は、サポート(",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"mailto:support@treasure-data.com"},"children":["support@treasure-data.com"]},")にお問い合わせください。"]}]},"headings":[{"value":"データモデルのAPIキーの置き換え","id":"データモデルのapiキーの置き換え","depth":1}],"frontmatter":{"seo":{"title":"データモデルのAPIキーの置き換え"}},"lastModified":"2026-06-01T09:34:27.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/products/customer-data-platform/treasure-insights/replacing-the-api-key-for-data-models","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}