Help & DocumentationAPIsAPI GatewayUsage Plan APIsUnbind Usage Plan from Service Environment

Unbind Usage Plan from Service Environment

Last updated: 2019-07-24 17:04:04

API Description

This API (UnBindEnvironment) is used to unbind usage plans from a specified environment.

Input Parameters

The following request parameter list only provides API request parameters. Other parameters can be found in Common Request Parameters.

Parameter Name Required Type Description
usagePlanIds.n Yes List Of String List of the unique IDs of the usage plans to be unbound.
serviceId Yes String The unique ID of the service to be unbound.
environment Yes String The service environment to be unbound.
bindType No String Binding type. Value range: API and SERVICE. Default is SERVICE.
apiIds.n No List of String An array of unique API Ids. This parameter is required if bindType=API.

Output Parameters

Parameter Name Type Description
code Int Common error code. 0: Successful; other values: Failed. For more information, see Common Error Codes on the Error Codes page.
codeDesc String Error code at business side. For a successful operation, "Success" is returned. In case of an error, a message describing the reason for the error is returned.
message String Module error message description depending on API.

Example

https://apigateway.api.qcloud.com/v2/index.php?
&<Common request parameters>
&Action=UnBindEnvironment
&usagePlanId.0=usagePlan-XX
&usagePlanId.1=usagePlan-XXX
&serviceId=sevice-XX
&environment=test

The returned results are as below:

{
    "code":"0",
    "message":"",
    "codeDesc":"Success",      
}
https://apigateway.api.qcloud.com/v2/index.php?
&<Common request parameters>
&Action=UnBindEnvironment
&usagePlanId.0=usagePlan-XX
&usagePlanId.1=usagePlan-XXX
&serviceId=sevice-XX
&apiIds.0=api-2yuua008
&bindType=API
&environment=test

The returned results are as below:

{
    "code":"0",
    "message":"",
    "codeDesc":"Success",      
}