Usage Plan
    • PDF

    Usage Plan

    • PDF

    Article Summary

    Create a usage plan

    URL

    POST https://apigateway.apigw.ntruss.com/api/v1/usage-plans
    

    Request Parameter

    • None

    Request Body

    {
      "monthQuotaRequest" : 1,
      "dayQuotaRequest" : 6,
      "usagePlanDescription" : "usagePlanDescription",
      "rateRps" : 0,
      "quotaCondition" : "quotaCondition",
      "usagePlanName" : "usagePlanName"
    }
    

    Response Code

    • 201

    Response Body

    {
      "usagePlan" : {
        "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"
      }
    }
    

    Delete a usage plan

    URL

    DELETE https://apigateway.apigw.ntruss.com/api/v1/usage-plans/{usage-plan-id}
    

    Request Parameter

    NamePositionRequiredTypeDescription
    usagePlanIdpathYStringUsage Plan Id
    Length(Min/Max): 0/10

    Request Body

    • None

    Response Code

    • 204

    Response Body

    • None

    Search all usage plan(id, usage_plan_name)

    URL

    GET https://apigateway.apigw.ntruss.com/api/v1/usage-plans
    

    Request Parameter

    NamePositionRequiredTypeDescription
    offsetquery stringNLongOffset
    Min: 0
    Max: 9,223,372,036,854,775,807
    limitquery stringNLongLimit
    Min: 1
    Max: 9,223,372,036,854,775,807
    stageIdquery stringYStringStage Id
    Length(Min/Max): 0/10
    associatedquery stringNBooleanAssociated

    Request Body

    • None

    Response Code

    • 200

    Response Body

    {
      "total" : 0,
      "usagePlans" : [ {
        "domainCode" : "domainCode",
        "usagePlanId" : "usagePlanId",
        "associatedStagesCount" : 6,
        "disabled" : true,
        "permission" : "permission",
        "usagePlanName" : "usagePlanName",
        "actionName" : "actionName"
      } ]
    }
    

    Search associated stage list

    URL

    GET https://apigateway.apigw.ntruss.com/api/v1/usage-plans/{usage-plan-id}/stages
    

    Request Parameter

    NamePositionRequiredTypeDescription
    usagePlanIdpathYStringUsage Plan Id
    Length(Min/Max): 0/10
    offsetquery stringNLongOffset
    Min: 0
    Max: 9,223,372,036,854,775,807
    limitquery stringNLongLimit
    Min: 1
    Max: 9,223,372,036,854,775,807
    namequery stringNStringName
    Length(Min/Max): 0/20

    Request Body

    • None

    Response Code

    • 200

    Response Body

    {
      "total" : 0,
      "stages" : [ {
        "apiName" : "apiName",
        "stageName" : "stageName",
        "productId" : "productId",
        "apiId" : "apiId",
        "productName" : "productName",
        "stageId" : "stageId"
      } ],
      "usagePlan" : {
        "domainCode" : "domainCode",
        "monthQuotaRequest" : 1,
        "dayQuotaRequest" : 6,
        "rateRps" : 5,
        "quotaCondition" : "quotaCondition"
      }
    }
    

    List a usage plan

    URL

    GET https://apigateway.apigw.ntruss.com/api/v1/usage-plans/{usage-plan-id}
    

    Request Parameter

    NamePositionRequiredTypeDescription
    usagePlanIdpathYStringUsage Plan Id
    Length(Min/Max): 0/10

    Request Body

    • None

    Response Code

    • 200

    Response Body

    {
      "usagePlan" : {
        "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"
      }
    }
    

    List usage plans detail

    URL

    POST https://apigateway.apigw.ntruss.com/api/v1/usage-plans/search
    

    Request Parameter

    • None

    Request Body

    {
      "offset" : 6,
      "limit" : 0,
      "usagePlanName" : "usagePlanName"
    }
    

    Response Code

    • 200

    Response Body

    {
      "initialCount" : 0,
      "total" : 6,
      "usagePlans" : [ {
        "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"
      } ]
    }
    

    Update a usage plan

    URL

    PUT https://apigateway.apigw.ntruss.com/api/v1/usage-plans/{usage-plan-id}
    

    Request Parameter

    NamePositionRequiredTypeDescription
    usagePlanIdpathYStringUsage Plan Id
    Length(Min/Max): 0/10

    Request Body

    {
      "monthQuotaRequest" : 6,
      "dayQuotaRequest" : 0,
      "usagePlanDescription" : "usagePlanDescription",
      "rateRps" : 1,
      "quotaCondition" : "quotaCondition",
      "usagePlanName" : "usagePlanName"
    }
    

    Response Code

    • 200

    Response Body

    {
      "usagePlan" : {
        "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"
      }
    }
    

    Was this article helpful?

    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.