Stageと関連付けられた Usage Planの照会

Prev Next

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

指定した Stageと関連付けられた Usage Planの詳細情報を照会します。

リクエスト

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

メソッド URI
GET /products/{product-id}/apis/{api-id}/stages/{stage-id}/usage-plans

リクエストヘッダ

API Gatewayで共通して使用されるヘッダの詳細は、API Gatewayのリクエストヘッダをご参照ください。

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

パラメータの説明は次の通りです。

フィールド タイプ 必須の有無 説明
product-id String Required Stageが属する Product ID
api-id String Required Stageが属する API ID
stage-id String Required Usage Planを照会する対象の Stage ID

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

パラメータの説明は次の通りです。

フィールド タイプ 必須の有無 説明
offset Long Optional レスポンスデータの開始点
  • 0~9,223,372,036,854,775,807
  • limitと共にページネーションの実装に使用
limit Long Optional レスポンスデータの最大数
  • 1~9,223,372,036,854,775,807
  • offsetと共にページネーションの実装に使用
usagePlanName String Optional Usage Plan名
  • 0~45文字

リクエスト例

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

curl --location --request GET 'https://apigateway.apigw.ntruss.com/api/v1/products/***ksk9***/apis/***51hs***/stages/***fh5o***/usage-plans' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'

レスポンス

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

レスポンス構文

レスポンス構文は次の通りです。

{
    "total" : 5,
    "monthQuotaRequest" : 6,
    "dayQuotaRequest" : 0,
    "rateRps" : 1,
    "quotaCondition" : "quotaCondition",
    "content" : [ {
        "domainCode" : "domainCode",
        "usagePlanId" : "usagePlanId",
        "modifier" : "modifier",
        "associatedStagesCount" : 0,
        "dayQuotaRequest" : 6,
        "permission" : "permission",
        "rateRps" : 5,
        "usagePlanName" : "usagePlanName",
        "monthQuotaRequest" : 1,
        "tenantId" : "tenantId",
        "disabled" : true,
        "usagePlanDescription" : "usagePlanDescription",
        "quotaCondition" : "quotaCondition",
        "actionName" : "actionName"
    } ]
}

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

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

レスポンス例

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

{
    "content": [
        {
            "tenantId": "***e230cebc1402ba89b148896951***",
            "usagePlanId": "***xogj***",
            "usagePlanName": "usageplan001",
            "domainCode": "PUB",
            "associatedStagesCount": 1
        }
    ],
    "total": 1
}