Query the list of service environments

Last updated: 2020-06-09 14:58:18

    Note:

    This is a legacy API which has been hidden and will no longer be updated. We recommend using the new API Gateway API 3.0 which is standardized and faster.

    Interface description

    This API (DescribeServiceEnvironmentList) is used to query the list of environments of a service. You can query all environments and their status under this service.

    Input Parameter

    The following request parameter list only lists the API request parameters. For other parameters, please see Common Request Parameters .

    Parameter name Required Type Description
    ServiceId Yes String The only service to be queried is ID.
    Limit No Int The returned quantity.
    Offset No Int Offset.

    Output Parameter

    Parameter name Type Description
    Code Int Common error code, 0 indicates success, other values indicate failure. For more information, please see the error code page Common error code .
    CodeDesc String Error code on the business side. If a Success, error is returned on success, the cause of the business error is returned.
    Message String Module error message description, related to the interface.
    TotalCount String Total number of environments.
    EnvironmentList List of Array List of environments.

    EnvironmentList is a list of environments, which is an array of environmentAttribute. The environmentAttribute is composed as follows:

    Parameter name Type Description
    EnvironmentName String Environment name.
    Url String Access path.
    Status Int Publish status: 1 means publish, 0 means not publish
    VerisonName String Running version.

    Example

    https://apigateway.api.qcloud.com/v2/index.php?
    &<Common request parameters>
    &Action=DescribeServiceEnvironmentList
    &serviceId=service-XX

    The returned results are as below:

    {
        "code":"0",
        "message":"",
        "codeDesc":"Success",      
        "totalCount":2,
        "environmentList":[
            {
                "environmentName":"test",
                "url":"hahah.ap-guangzhou.1251000011.tencentyunapi.com/test",
                "status":0,
                "verisonName":""
            },
            {
                "environmentName":"pre",
                "url":"hahah.ap-guangzhou.1251000011.tencentyunapi.com/pre",
                "status":1,
                "verisonName":"version-20170904xx"
            }
        ]
    }

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help