Usage Plan
- Print
- PDF
Usage Plan
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
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
Name | Position | Required | Type | Description |
---|---|---|---|---|
usagePlanId | path | Y | String | Usage 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
Name | Position | Required | Type | Description |
---|---|---|---|---|
offset | query string | N | Long | Offset Min: 0 Max: 9,223,372,036,854,775,807 |
limit | query string | N | Long | Limit Min: 1 Max: 9,223,372,036,854,775,807 |
stageId | query string | Y | String | Stage Id Length(Min/Max): 0/10 |
associated | query string | N | Boolean | Associated |
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
Name | Position | Required | Type | Description |
---|---|---|---|---|
usagePlanId | path | Y | String | Usage Plan Id Length(Min/Max): 0/10 |
offset | query string | N | Long | Offset Min: 0 Max: 9,223,372,036,854,775,807 |
limit | query string | N | Long | Limit Min: 1 Max: 9,223,372,036,854,775,807 |
name | query string | N | String | Name 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
Name | Position | Required | Type | Description |
---|---|---|---|---|
usagePlanId | path | Y | String | Usage 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
Name | Position | Required | Type | Description |
---|---|---|---|---|
usagePlanId | path | Y | String | Usage 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?