Query service list

Last updated: 2020-02-21 16:23:38

PDF

Interface description

This API (DescribeServicesStatus) is used to search and query the list of a service or multiple services, and return the domain name, time and other information related to the 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
ServiceIds.n No Array of Strings Query by one or more service unique ID
Offset No Int Offset. Default value: 0. When the number of services is very large, you can use offset to choose which service to return details from.
Limit No Int The returned quantity is 20 by default, and the maximum is 100.
Orderby No String Which field is sorted by
Order No String Sort mode. Default is desc
SearchName No String Fuzzy search by service name
SearchId No String Precise search by service 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. Return the specific cause of the business error when a Success, error is returned on success.
Message String Module error message description, related to interface
TotalCount Int Number of eligible service statu
ServiceStatusSet List of Array Service status list

Where serviceStatusSet is an array of serviceStatus, and serviceStatus is composed as follows:

Parameter name Type Description
ServiceId String Service unique ID
ServiceName String User-defined service name
ServiceDescription String User-defined service description
SubDomain String The system automatically gives the service the domain name of Assign.
Protocol String The front-end request type of the service. Such as HTTP and HTTPS
CreatedTime Timestamp Policy creation time. Expressed according to the ISO8601 standard, and using UTC time. Format: YYYY-MM-DDThh:mm:ssZ
ModifiedTime Timestamp Last Modification Time. Expressed according to the ISO8601 standard, and using UTC time. Format: YYYY-MM-DDThh:mm:ssZ
AvailableEnvironments List Of String A list of publish's environments, such as Test,Pre,release

Example

https://apigateway.api.qcloud.com/v2/index.php?
&<Common request parameters>
&Action=DescribeServicesStatus
&serviceIds.0=service-XX
&serviceIds.1=service-XXXX
&offset=0
&limit=2
&orderby=createdTime
&order=desc
&searchKey=aa

The returned results are as below:

{
    "code": "0",
    "message": "",
    "codeDesc": "Success",
    "totalCount": 2,
    "serviceStatusSet": [{
            "serviceId": "service-XX",
            "serviceName": "test1",
            "serviceDescription": "test1",
            "subDomain": "523e8dc7bbe04613b5b1d726c2a7889d-apigateway.ap-guangzhou.qcloud.com",
            "protocol": "http",
            "createdTime": "2017-08-07T00:00:00Z",
            "modifiedTime": "2017-08-07T00:00:00Z",
            "availableEnvironments": [
                "Pre",
                "release"
            ]
        },
        {
            "serviceId": "service-XXXX",
            "serviceName": "test2",
            "serviceDescription": "test2",
            "subDomain": "523e8dc7bbe04613b5b1d726c2a7889d-apigateway.ap-guangzhou.qcloud.com",
            "protocol": "https",
            "createdTime": "2017-08-07T00:10:00Z",
            "modifiedTime": "2017-08-07T00:10:00Z",
            "availableEnvironments": [
                "Test",
                "Pre"
            ]
        }
    ]
}