--- title: "GetContainerList" slug: "getcontainerlist-subaccount" tags: ["Archive Storage"] updated: 2026-09-17T09:58:32Z published: 2026-09-17T09:58:32Z canonical: "api.ncloud-docs.com/getcontainerlist-subaccount" --- > ## 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. # GetContainerList Classic/VPC環境で利用できます。 アカウントに登録されたコンテナリストを照会します。 ## リクエスト リクエスト形式を説明します。リクエスト形式は次の通りです。 | メソッド | URI | | --- | --- | | GET | - | ### リクエストヘッダ ヘッダの説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `x-ncp-apigw-timestamp` | String | Required | タイムスタンプの値 - 1970年1月1日 00:00:00協定世界時(UTC)からの経過時間をミリ秒で表したもの - API Gatewayサーバとの時間差が5分以上の場合は有効ではないリクエストとみなす | | `x-ncp-iam-access-key` | String | Required | NAVERクラウドプラットフォームで発行された API Keyまたは Sub Accountで発行された Access Key | | `x-ncp-apigw-signature-v2` | String | Required | Bodyを Access Key IDとマッピングする Secret Keyで暗号化した署名 - HMACの暗号化アルゴリズムは HmacSHA256を使用 | | `x-ncp-region_code` | String | Required | コンテナのリージョンコード - <例> 韓国: `KR` \| シンガポール: `SGN` | ### リクエストクエリパラメータ パラメータの説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `limit` | Integer | Optional | 呼び出し結果の最大数制限 | | `marker` | String | Optional | 特定のコンテナ(バケット)以降のリストを返す | | `end_marker` | String | Optional | 特定のコンテナ(バケット)以前のリストを返す | | `prefix` | String | Optional | この文字列で始まるコンテナ(バケット)リストを返す | | `reverse` | String | Optional | コンテナ名でソートしてリストを表示 - `true` \| `false` (デフォルト) - `false`: 降順 | ### リクエスト例 リクエストのサンプルコードは次の通りです。 ``` curl -X GET "https://archive-storage-external-api.apigw.ntruss.com/?limit=1&marker=test" -H "accept: application/json" -H "x-ncp-region-code: {regionCode}" -H "x-ncp-iam-access-key: {AccessKey} " -H "x-ncp-apigw-timestamp: {current timestamp}" -H "x-ncp-apigw-signature-v2: {generated signature}" ``` ## レスポンス レスポンス形式を説明します。 ### レスポンスヘッダ ヘッダの説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `Connection` | String | - | クライアントとサーバ間の TCP接続状態 | | `Content-Type` | String | - | レスポンス結果の MIMEタイプ | | `Date` | String | - | リクエストのレスポンスタイム(UTC) | | `Referrer-Policy` | String | - | HTTP Referrerヘッダの処理方式 | | `Server` | String | - | レスポンスサーバ | | `Transfer-Encoding` | String | - | レスポンスデータの転送方式 | | `X-Account-Bytes-Used` | Integer | - | コンテナが使用中の容量 | | `X-Account-Container-Count` | Integer | - | アカウントにあるのコンテナ(バケット)の総数 | | `X-Account-Object-Count` | Integer | - | アカウントのオブジェクトの総数 | | `x-account-project-domain-id` | String | - | API利用時に必要な Domain ID | | `X-Account-Storage-Policy-name-Bytes-Used` | Integer | - | ヘッダ名の`name`に該当する storage policyの全容量(Byte) | | `X-Account-Storage-Policy-name-Container-Count` | Integer | - | ヘッダ名の`name`に該当する Storage Policyのコンテナ(バケット)の総数 | | `X-Account-Storage-Policy-name-Object-Count` | Integer | - | ヘッダ名の`name`に該当する storage policyのオブジェクトの総数 | | `x-ncp-apigw-response-origin` | String | - | レスポンスの原本の出典 | | `x-ncp-trace-id` | String | - | トランザクショントレース用 ID | | `X-Trans-Id` | String | - | リクエストのトランザクション ID | | `X-Openstack-Request-Id` | String | - | リクエストのトランザクション ID - `X-Trans-Id`と同じ | | `X-Timestamp` | Integer | - | コンテナが作成された時刻(Unix Time) | ### レスポンス構文 レスポンス構文は次の通りです。 ``` [ { “name”: “test”, “count”: 0, “bytes”: 0, “last_modified”: “2022-04-20T01:10:10.123456” } ] ``` ### レスポンスボディ レスポンスボディの説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `name` | String | - | コンテナの名前 | | `count` | Integer | - | コンテナにあるオブジェクト数 | | `bytes` | Integer | - | コンテナにあるオブジェクトの全容量(Byte) | | `last_modified` | String | - | 最終更新日時 | ### レスポンスステータスコード NAVERクラウドプラットフォームでで共通して使用されるレスポンスステータスコードの詳細は、[Ncloud APIのレスポンスステータスコード](/docs/ja/common-ncpapi#3-%EC%9D%91%EB%8B%B5-%EC%83%81%ED%83%9C-%EC%BD%94%EB%93%9C)をご参照ください。 ### レスポンス例 レスポンスのサンプルコードは次の通りです。 ``` HTTP/1.1 200 OK connection: keep-alive content-type: application/json date: Tue,16 Apr 2024 02:18:45 GMT referrer-policy: unsafe-url server: nginx transfer-encoding: chunked x-account-bytes-used: 30129 x-account-container-count: 3 x-account-object-count: 3 x-account-project-domain-id: default x-account-storage-policy-standard00-bytes-used: 30129 x-account-storage-policy-standard00-container-count: 3 x-account-storage-policy-standard00-object-count: 3 x-ncp-apigw-response-origin: ENDPOINT x-ncp-trace-id: 38cb565j34pho32or46pij0opg x-openstack-request-id: tx5c30c46d8a0a450ea6291-00661de005 x-timestamp: 1711960998.26335 x-trans-id: tx5c30c46d8a0a450ea6291-00661de005 ``` ``` [ { "name": "c11", "count": 1, "bytes": 13160, "last_modified": "2024-04-01T05:43:18.300410" }, { "name": "c12", "count": 2, "bytes": 16969, "last_modified": "2024-04-08T02:40:30.317280" }, { "name": "c33", "count": 0, "bytes": 0, "last_modified": "2024-04-16T08:42:57.160680" } ] ```