--- title: "APIの公開" slug: "apigateway-api-publish" updated: 2026-09-17T09:57:24Z published: 2026-09-17T09:57:24Z canonical: "api.ncloud-docs.com/apigateway-api-publish" --- > ## 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. # APIの公開 Classic/VPC環境で利用できます。 APIを公開、または公開解除します。 ## リクエスト リクエスト形式を説明します。リクエスト形式は次の通りです。 | メソッド | URI | | --- | --- | | POST | /api/v1/products/{product-id}/apis/{api-id}/publish | ### リクエストヘッダ 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 | | `api-id` | String | Required | Productに作成された API ID | ### リクエスト構文 リクエスト構文は次の通りです。 ``` { "stages" : [ { "isPublished" : true, "stageId" : "stageId" } ] } ``` ### リクエストボディ リクエストボディの説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `stages` | Array | Required | 公開するかどうかの設定情報: [stages](/docs/ja/apigateway-api-publish#stages) | #### `stages` `stages`の説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `isPublished` | Boolean | Required | 公開するかどうかを選択 - `true` \| `false` - `true`: 公開 - `false`: 公開解除 | | `stageId` | String | Required | APIを公開または解除する Stage ID | ### リクエスト例 リクエストのサンプルコードは次の通りです。 ``` curl -X POST 'https://apigateway.apigw.ntruss.com/api/v1/products/{product-id}/apis/{api-id}/publish' \ --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}' \ --data '{ "stages" : [ { "isPublished" : true, "stageId" : "*****7mhdv" } ] }' ``` ## レスポンス レスポンス形式を説明します。 ### レスポンスステータスコード 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)をご参照ください。