--- title: "Canaryの有効化" slug: "apigateway-canarytest-enablecanary" updated: 2026-09-17T09:57:24Z published: 2026-09-17T09:57:24Z canonical: "api.ncloud-docs.com/apigateway-canarytest-enablecanary" --- > ## Documentation Index > Fetch the complete documentation index at: https://api.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # Canaryの有効化 Classic/VPC環境で利用できます。 API明細を Stageに公開する前に、運用環境でテストできる Canary機能を有効化します。 ## リクエスト リクエスト形式を説明します。リクエスト形式は次の通りです。 | メソッド | URI | | --- | --- | | POST | /api/v1/products/{product-id}/apis/{api-id}/stages/{stage-id}/canary | ### リクエストヘッダ API Gatewayで共通して使用されるヘッダの詳細は、[API Gatewayのリクエストヘッダ](/docs/ja/ai-application-service-apigateway#%EC%9A%94%EC%B2%AD%ED%97%A4%EB%8D%94)をご参照ください。 ### リクエストパスパラメータ パラメータの説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `product-id` | String | Required | APIと関連付けられた Product ID - 1~10文字 | | `api-id` | String | Required | Productに作成された API ID - 1~10文字 | | `stage-id` | String | Required | APIに作成された Stage ID - 1~10文字 | ### リクエスト例 リクエストのサンプルコードは次の通りです。 ``` curl -X POST 'https://apigateway.apigw.ntruss.com/api/v1/products/{product-id}/apis/{api-id}/stages/{stage-id}/canary' \ --header 'Content-Type: application/json' \ --header 'x-ncp-apigw-timestamp: {Timestamp}' \ --header 'x-ncp-iam-access-key: {Access Key}' \ --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' ``` ## レスポンス レスポンス形式を説明します。 ### レスポンス構文 レスポンス構文は次の通りです。 ``` { "stageId": "stageId", "canaryCertificateId": "canaryCertificateId", "canaryDeploymentNo": 0, "canaryDistributionRate": 0.0, "canaryEndpointDomain": "canaryEndpointDomain", "canaryDeployedTime": "2024-05-08T06:29:48Z", "canaryDeploymentDescription": "canaryDeploymentDescription", "deployedStageDeploymentNo": 0, "useDistributionRate": true } ``` ### レスポンスステータスコード API Gatewayで共通して使用されるレスポンスステータスコードの詳細は、[API Gatewayのレスポンスステータスコード](/docs/ja/ai-application-service-apigateway#%EC%9D%91%EB%8B%B5%EC%83%81%ED%83%9C%EC%BD%94%EB%93%9C)をご参照ください。 ### レスポンス例 レスポンスのサンプルコードは次の通りです。 ``` { "stageId": "*****7mhdv", "canaryCertificateId": "", "canaryDeploymentNo": 251371, "canaryDistributionRate": 0.0, "canaryEndpointDomain": "NONE", "canaryDeployedTime": "2024-05-08T06:29:48Z", "canaryDeploymentDescription": "default canary desc", "deployedStageDeploymentNo": 251072, "useDistributionRate": true } ```