--- title: "getInitScriptDetail" slug: "compute-vserver-initscript-getinitscriptdetail" tags: ["Server"] updated: 2026-09-17T09:57:39Z published: 2026-09-17T09:57:39Z canonical: "api.ncloud-docs.com/compute-vserver-initscript-getinitscriptdetail" --- > ## 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. # getInitScriptDetail VPC環境で利用できます。 初期化スクリプトの詳細情報を照会します。 ## リクエスト リクエスト形式を説明します。リクエスト形式は次の通りです。 | メソッド | URI | | --- | --- | | GET \| POST | /vserver/v2/getInitScriptDetail | 参考 ガイドは GETメソッドを基準に説明します。POSTメソッドの呼び出しテストは、NAVERクラウドプラットフォームコンソールの API Gatewayサービスの Swaggerで行えます。 ### リクエストヘッダ Server APIで共通して使用されるヘッダの詳細は、[Serverのリクエストヘッダ](/docs/ja/compute-vserver#%EC%9A%94%EC%B2%AD%ED%97%A4%EB%8D%94)をご参照ください。 ### リクエストクエリパラメータ リクエストクエリパラメータの説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `regionCode` | String | Optional | リージョンコード - [getRegionList](/docs/ja/compute-vserver-server-common-getregionlist)を参照 - 照会結果の最初のリージョン(デフォルト) | | `initScriptNo` | String | Required | 初期化スクリプト番号 - [getInitScriptList](/docs/ja/compute-vserver-initscript-getinitscriptlist)を参照 | | `responseFormatType` | String | Optional | レスポンスデータの形式 - `xml`(デフォルト) \| `json` | ### リクエスト例 リクエストのサンプルコードは次の通りです。 ``` curl --location --request GET 'https://ncloud.apigw.ntruss.com/vserver/v2/getInitScriptDetail ?regionCode=KR &initScriptNo=2***5 &responseFormatType=json' \ --header 'x-ncp-apigw-timestamp: {Timestamp}' \ --header 'x-ncp-iam-access-key: {Access Key}' \ --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' ``` ## レスポンス レスポンス形式を説明します。 ### レスポンスボディ レスポンスボディの説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `getInitScriptDetailResponse` | Object | - | レスポンス結果 - [InitScriptList](/docs/ja/common-vapidatatype-initscriptlist)を参照 | | `getInitScriptDetailResponse.requestId` | String | - | リクエスト ID - UUID形式 | | `getInitScriptDetailResponse.returnCode` | String | - | レスポンスコード | | `getInitScriptDetailResponse.returnMessage` | String | - | レスポンスメッセージ | ### レスポンスステータスコード Server APIで共通して使用されるレスポンスステータスコードの詳細は、[Serverのレスポンスステータスコード](/docs/ja/compute-vserver#%EC%9D%91%EB%8B%B5%EC%83%81%ED%83%9C%EC%BD%94%EB%93%9C)をご参照ください。 ### レスポンス例 レスポンスのサンプルコードは次の通りです。 ``` { "getInitScriptDetailResponse": { "totalRows": 1, "initScriptList": [ { "initScriptNo": "2***5", "initScriptName": "init", "createDate": "2025-06-20T09:30:38+0900", "initScriptDescription": "サーバ初期化スクリプト", "initScriptContent": "#!/bin/bash\n\necho \"[1/5] Updating package list...\"\nsudo apt-get update -y\n\necho \"[2/5] Installing basic packages...\"\nsudo apt-get install -y curl vim git\n\necho \"[3/5] Setting timezone to Asia/Seoul...\"\nsudo timedatectl set-timezone Asia/Seoul\n\necho \"[4/5] Installing and configuring UFW...\"\nsudo apt-get install -y ufw\nsudo ufw default deny incoming\nsudo ufw default allow outgoing\nsudo ufw allow ssh\nsudo ufw --force enable\n\necho \"[5/5] Updating MOTD...\"\necho \"Welcome to your initialized Linux server!\" | sudo tee /etc/motd\n\necho \"Initialization complete\"\n", "osType": { "code": "LNX", "codeName": "LINUX" } } ], "requestId": "75c8871a-****-****-****-1c7cc9330d76", "returnCode": "0", "returnMessage": "success" } } ```