API Request Parameters

Last updated: 2017-12-07 12:59:34

API request parameters are specific to each API. This means that different APIs support different API request parameters. The first letter of each API request parameter is in lowercase so that the parameters can be differentiated from common request parameters.
Take API Get the List of Monitoring Metrics (DescribeMetrics) as an example. It supports the following API request parameters:

Parameter Required Type Description
namespace Yes String Namespace: A namespace refers to a category of resources. After specifying a namespace, you can obtain all types of monitoring metrics under the specified category of resource. Currently, this parameter can only be specified with "qce/cvm" and is used to get all types of monitoring metrics under the CVM.
metricName No String Monitoring metric name, such as "cpu_usage" and "mem_usage", which should contain 1-64 characters. If it is not specified, the list of all the metrics under the namespace will be returned

Here are the descriptions of each field:

Parameter Name Name of request parameter supported by the API. The user can use this name as an API request parameter when using this API.
Required Indicates whether this parameter is required. "Yes" means the parameter is required for the API, while "No" means the parameter is not required.
Type Data type of the API parameter.
Description A brief description of the API request parameter.

If a user wants to get the list of monitoring metrics, the request link may be as follows:

 https://monitor.api.qcloud.com/v2/index.php?
 &<Common request parameters>
&namespace=qce/cvm

A complete request needs two types of request parameters: common request parameters and API request parameters. Only API request parameters are listed here. For more information on common request parameters, please see Common Request Parameters section.