Query API list

Last updated: 2020-06-09 14:54: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 (DescribeApisStatus) is used to view a list of API or all API under a service and its related information.

    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 service on which API is located is the only ID.
    ApiIds.n No String API unique ID array.
    Offset No Int Offset, default is 0.
    Limit No Int The number returned. The default is 20, and the maximum value is 100.
    Orderby No String Sort by which field.
    Order No String Sort mode.
    SearchName No String Fuzzy search by API path name.
    SearchId No String Exact search by API unique ID.

    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.
    ServiceId String The service on which API is located is the only ID.
    TotalCount Int The number of API who meet the requirements.
    ApiIdStatusSet List of Array API list.

    Where apiIdStatusSet is an array of apiIdStatus, and apiIdStatus is composed as follows:

    Parameter name Type Description
    ApiId String API is the only ID.
    ApiDesc String User-defined API description.
    ApiName String The name of API.
    ApiType String API's type, currently only NORMAL, will add other types of API.
    Path String API requests path.
    Method String API request method.
    CreatedTime Timestamp Policy creation time. Expressed according to the ISO8601 standard, and using UTC time. The format is: YYYY-MM-DDThh:mm:ssZ.
    ModifiedTime Timestamp Last Modification Time. Expressed according to the ISO8601 standard, and using UTC time. The format is: YYYY-MM-DDThh:mm:ssZ.
    AuthRequired String Whether you need to sign Verification, TRUE means yes, FALSE means no.

    Example

    Query the details of API whose back end is HTTP service:

    An example of a request is as follows:

    https://apigateway.api.qcloud.com/v2/index.php?
    &<Common request parameters>
    &Action=DescribeApisStatus
    &serviceId=service-XX
    &apiIds.0=api-XX
    &apiIds.1=api-XXX
    &offet=0
    &limit=2
    &orderby=createdTime
    &order=desc
    &searchKey=aa

    The returned results are as below:

    {
        "code":"0",
        "message":"",
        "codeDesc":"Success", 
        "serviceId":"service-XX",
        "totalCount":2,
        "apiIdStatusSet":[
            {
                "apiId":"api-XX",
                "apiName":"apiXXXX",
                "apiType":"NORMAL",
                "apiDesc":"apiDescription1",
                "path":"path1",
                "method":"http",
                "serviceId":"serviceId-XXX",
                "createdTime":"2017-08-07T00:00:00Z",
                "modifiedTime":"2017-08-07T00:00:00Z",
                "authRequired":"TRUE"
            },
            {
                "apiId":"api-XXX",
                "apiName":"apiXXXX",
                "apiType":"NORMAL",
                "apiDesc":"apiDescription2",
                "path":"path2",
                "method":"https",
                "serviceId":"serviceId-XXXX",
                "createdTime":"2017-08-07T00:10:00Z",
                "modifiedTime":"2017-08-07T00:10:00Z",
                "authRequired":"TRUE"
            }
        ]
    }

    Was this page helpful?

    Was this page helpful?

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