--- title: "Canary Swagger Jsonの照会" slug: "apigateway-canarytest-swaggerjson" updated: 2026-09-17T09:57:24Z published: 2026-09-17T09:57:24Z canonical: "api.ncloud-docs.com/apigateway-canarytest-swaggerjson" --- > ## 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 Swagger Jsonの照会 Classic/VPC環境で利用できます。 Canaryに公開された API文書内容を Swagger JSON形式で照会します。 ## リクエスト リクエスト形式を説明します。リクエスト形式は次の通りです。 | メソッド | URI | | --- | --- | | GET | /api/v1/products/{product-id}/apis/{api-id}/stages/{stage-id}/canary/swagger-json | ### リクエストヘッダ 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 GET 'https://apigateway.apigw.ntruss.com/api/v1/products/{product-id}/apis/{api-id}/stages/{stage-id}/canary/swagger-json' \ --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}' ``` ## レスポンス レスポンス形式を説明します。 ### レスポンス構文 レスポンス構文は次の通りです。 ``` { "documentJson": "documentJson" } ``` ### レスポンスステータスコード 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)をご参照ください。 ### レスポンス例 レスポンスのサンプルコードは次の通りです。 ``` { "documentJson": "{"swagger" : "2.0", "info" : { "description" : "api Description
https://**********.apigw.ntruss.com/api/v1", "version" : "2024-05-08T08:17:35Z", "title" : "api-***" }, "host" : "**********.apigw.ntruss.com", "basePath" : "/***/***", "schemes" : [ "https" ], "paths" : { "/" : { }, "/***" : { "post" : { "tags" : [ "v1" ], "parameters" : [ { "name" : "****", "in" : "query", "description" : "", "required" : false, "type" : "string", "x-ncp-parameter-is-logged" : false } ], "security" : [ { "x-ncp-iam" : [ ] } ], "responses" : { "200" : { "description" : "default" } }, "x-ncp-apigw-use-body-when-formdata" : false, "x-ncp-apigateway-filters" : { "valid" : { "type" : "NONE" }, "apiKey" : { "required" : true }, "auth" : { "platform" : "IAM" } } } } }, "securityDefinitions" : { "x-ncp-iam" : { "type" : "apiKey", "name" : "x-ncp-iam", "in" : "header", "x-ncp-apigw-auth-ver" : "v2" }, "x-ncp-apigw-api-key" : { "type" : "apiKey", "name" : "x-ncp-apigw-api-key", "in" : "header" } } }" } ```