--- title: "APIのコピー" slug: "apigateway-api-clone" updated: 2026-09-17T09:57:24Z published: 2026-09-17T09:57:24Z canonical: "api.ncloud-docs.com/apigateway-api-clone" --- > ## 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をコピーして新規 APIを作成します。 ## リクエスト リクエスト形式を説明します。リクエスト形式は次の通りです。 | メソッド | URI | | --- | --- | | POST | /api/v1/products/{product-id}/apis/clone | ### リクエストヘッダ 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 | ### リクエスト構文 リクエスト構文は次の通りです。 ``` { "apiName" : "apiName", "apiDescription" : "apiDescription", "originApiId" : "originApiId" } ``` ### リクエストボディ リクエストボディの説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `apiName` | String | Required | 作成する APIの名前 - 英数字、記号の「-」、「_」を使用して0~20文字以内で入力 | | `apiDescription` | String | Optional | 作成する APIの説明 - 0~300文字 | | `originApiId` | String | Required | コピーするソース API ID - 0~10文字 | ### リクエスト例 リクエストのサンプルコードは次の通りです。 ``` curl -X POST 'https://apigateway.apigw.ntruss.com/api/v1/products/{product-id}/apis/clone' \ --header 'Content-Type: application/json' \ --header 'x-ncp-apigw-timestamp: {Timestamp}' \ --header 'x-ncp-iam-access-key: {Sub Account Access Key}' \ --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \ --data '{ "apiName" : "api-***", "apiDescription" : "api-*** Description", "originApiId" : "**********" } ``` ## レスポンス レスポンス形式を説明します。 ### レスポンス構文 構文は次の通りです。 ``` { "api": { "productId": "productId", "apiId": "apiId", "apiName": "apiName", "apiDescription": "apiDescription", "tenantId": "tenantId", "modifier": "modifier", "modTime": "2024-05-03T07:46:37Z", "isDeleted": false, "domainCode": "domainCode" } } ``` ### レスポンスステータスコード 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)をご参照ください。 ### レスポンス例 レスポンスのサンプルコードは次の通りです。 ``` { "api": { "productId": "*****0bk", "apiId": "*****1r9cm", "apiName": "api_clone", "apiDescription": "api_clone Description", "tenantId": "*****02f55ae4436913a6e2c65bab47c", "modifier": "d12c9fd0-****-****-****-246e96591a38", "modTime": "2024-05-03T07:46:37Z", "isDeleted": false, "domainCode": "PUB" } } ```