MENU
      GetGroupList

        GetGroupList


        記事の要約

        Classic/VPC環境で利用できます。

        リソースグループリストを照会します。

        リクエスト

        リクエスト形式を説明します。リクエスト形式は次の通りです。

        メソッドURI
        GET/api/v1/groups

        リクエストヘッダ

        Resource Manager APIで共通して使用されるヘッダの詳細は、Resource Managerの共通ヘッダをご参照ください。

        リクエストクエリパラメータ

        リクエストクエリパラメータの説明は次の通りです。

        フィールドタイプ必須の有無説明
        groupNameStringOptionalリソースグループ名
        pageIndexIntegerOptionalページ番号
        • 0~N (デフォルト: 0)
        pageSizeIntegerOptionalページ出力数
        • 1~100 (デフォルト: 20)

        リクエスト例

        リクエストのサンプルコードは次の通りです。

        curl --location --request GET 'https://resourcemanager.apigw.ntruss.com/api/v1/groups' \
        --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'
        Shell

        レスポンス

        レスポンス形式を説明します。

        レスポンスボディ

        レスポンスボディの説明は次の通りです。

        フィールドタイプ必須の有無説明
        pageIndexInteger-ページ番号
        pageSizeInteger-ページ出力数
        itemCountInteger-レスポンス結果数
        hasMoreBoolean-追加ページが存在するかどうか
        • true | false
          • true: 存在する
          • false: 存在しない
        itemsArray-レスポンス結果
        errorObject-エラーコードとメッセージ
        • レスポンス失敗時に表示
        error.errorCodeInteger-エラーコード
        error.messageString-エラーメッセージ
        error.detailsString-エラーメッセージの説明

        items

        itemsの説明は次の通りです。

        フィールドタイプ必須の有無説明
        groupIdString-リソースグループ ID
        groupNameString-リソースグループ名
        groupDescString-リソースグループの説明
        createTimeInteger-リソースグループの作成日時
        updateTimeInteger-リソースグループの最終更新日時

        レスポンスステータスコード

        Resource Manager APIで共通して使用されるレスポンスステータスコードの詳細は、Resource Managerのレスポンスステータスコードをご参照ください。

        レスポンス例

        レスポンスのサンプルコードは次の通りです。

        {
            "pageIndex": 0,
            "pageSize": 20,
            "itemCount": 2,
            "hasMore": false,
            "items": [
                {
                    "groupId": "821ad7869d494b298aa9a13b",
                    "groupName": "testgroup_01",
                    "groupDesc": "test",
                    "createTime": 1727441443000,
                    "updateTime": 1727441443000
                },
                {
                    "groupId": "64f077df093f6a0838604299",
                    "groupName": "testgroup_02",
                    "groupDesc": "",
                    "createTime": 1693480928000,
                    "updateTime": 1693480928000
                }
            ]
        }
        JSON

        この記事は役に立ちましたか?

        Changing your password will log you out immediately. Use the new password to log back in.
        First name must have atleast 2 characters. Numbers and special characters are not allowed.
        Last name must have atleast 1 characters. Numbers and special characters are not allowed.
        Enter a valid email
        Enter a valid password
        Your profile has been successfully updated.