--- title: "Stageの作成" slug: "apigateway-stage-createstage" updated: 2026-09-17T09:57:26Z published: 2026-09-17T09:57:26Z canonical: "api.ncloud-docs.com/apigateway-stage-createstage" --- > ## 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. # Stageの作成 Classic/VPC環境で利用できます。 ユーザーが指定した条件に基づいて Stageを作成します。 ## リクエスト リクエスト形式を説明します。リクエスト形式は次の通りです。 | メソッド | URI | | --- | --- | | POST | /api/v1/products/{product-id}/apis/{api-id}/stages | ### リクエストヘッダ 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 - 0~10文字 - [Productリストの照会](/docs/ja/apigateway-product-getproductlist)を参照 | | `api-id` | String | Required | Stageを作成する API ID - 0~10文字 - [APIの照会](/docs/ja/apigateway-api-apis)を参照 | ### リクエスト構文 リクエスト構文は次の通りです。 ``` { "cacheTtlSec" : 0, "ipAclList" : "ipAclList", "stageName" : "stageName", "throttleRps" : 6, "response" : "response", "deploymentDescription" : "deploymentDescription", "isMaintenance" : true, "enabledContentEncoding": true, "minimumCompressionSize": 0, "ipAclCode" : "ALLOWED", "endpointDomain" : "endpointDomain", "statusCode" : 1 } ``` ### リクエストボディ リクエストボディの説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `cacheTtlSec` | Integer | Optional | APIキャッシュの TTL - 1~3600秒 | | `ipAclList` | String | Conditional | IP ACLリスト - `ipAclCode`入力時、必須 | | `stageName` | String | Required | Stage名 - 英数字、記号の「_」、「-」のみ使用して1~20文字以内で入力 | | `throttleRps` | Integer | Optional | メソッド別1秒当たりのリクエスト数の上限 - 1~2,147,483,647 | | `response` | String | Optional | 状態コードに対するレスポンス - 0~1,500文字 | | `deploymentDescription` | String | Optional | Stageデプロイに関する説明 | | `isMaintenance` | Boolean | Optional | メンテナンス設定 - `true` \| `false` (デフォルト) - `true`: 設定 - `false`: 設定しない | | `enabledContentEncoding` | Boolean | Optional | エンコード設定 - `true` \| `false` (デフォルト) - `true`: 設定 - `false`: 設定しない | | `minimumCompressionSize` | Integer | Optional | データ送信設定のための必須条件 - エンコード設定で`enabledContentEncoding`を`true`に設定 データ送信時、圧縮するかどうか - 圧縮を有効にするには、負でない整数を入力 - 0~10,485,760 - このフィールドに入力しない場合、圧縮を無効化 | | `ipAclCode` | String | Conditional | IP ACLを許可するかどうか - `ALLOWED` \| `REJECTED` - `ALLOWED`: 許可 - `REJECTED`: 拒否 - `ipAclList`入力時、必須 | | `endpointDomain` | String | Required | エンドポイントドメイン | | `statusCode` | Integer | Optional | 状態コード - 100~599 | ### リクエスト例 リクエストのサンプルコードは次の通りです。 ``` curl --location --request POST 'https://apigateway.apigw.ntruss.com/api/v1/products/***ksk9***/apis/***51hs***/stages' \ --header 'x-ncp-apigw-timestamp: {Timestamp}' \ --header 'x-ncp-iam-access-key: {Access Key}' \ --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \ --header 'Content-Type: application/json' \ --data '{ "stageName": "stage000", "endpointDomain": "https://test***.test.com" }' ``` ## レスポンス レスポンス形式を説明します。 ### レスポンス構文 レスポンス構文は次の通りです。 ``` { "stage" : { "canaryDeployedTime" : "2000-01-23T04:56:07.000+00:00", "modifier" : "modifier", "canaryEndpointDomain" : "canaryEndpointDomain", "canaryThrottleRps" : 5, "cacheTtlSec" : 0, "stageName" : "stageName", "throttleRps" : 4, "monthQuotaRequest" : 9, "canaryCacheTtlSec" : 6, "canaryDistributionRate" : 5.962134, "apiId" : "apiId", "stageId" : "stageId", "deployedStageDeploymentNo" : 7, "useDistributionRate" : true, "canaryDeploymentDescription" : "canaryDeploymentDescription", "dayQuotaRequest" : 2, "isMaintenance" : true, "rateRps" : 3, "endpointDomain" : "endpointDomain", "ipAclList" : "ipAclList", "canaryDeploymentNo" : 1, "regTime" : "2000-01-23T04:56:07.000+00:00", "response" : "response", "canaryConditions" : [ { "parameterName" : "parameterName", "parameterCode" : "REQUEST_HEADER", "parameterValue" : "parameterValue" } ], "tenantId" : "tenantId", "ipAclCode" : "ALLOWED", "statusCode" : 2, "enabledContentEncoding": true, "minimumCompressionSize": 0 } } ``` ### レスポンスステータスコード 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)をご参照ください。 ### レスポンス例 レスポンスのサンプルコードは次の通りです。 ``` { "stage": { "tenantId": "***e230cebc1402ba89b148896951***", "modifier": "***d3020-5bb7-11ec-bfb8-246e96591***", "stageId": "***fh5o***", "apiId": "***51hs***", "stageName": "stage000", "endpointDomain": "https://test***.test.com", "regTime": "2024-05-07T23:48:47Z", "isMaintenance": false, "enabledContentEncoding": false } } ```