Common Request Parameters
Last updated: 2019-11-29 16:42:25PDF
A complete Tencent Cloud API request requires two types of request parameters: common request parameters and API request parameters. This document describes 6 common request parameters used in Tencent Cloud API requests.
Common request parameters are required in every API. When developers use Tencent Cloud APIs to send requests, they should make sure that the requests carry these common request parameters. Otherwise, the requests will fail. The initial letter of each common request parameter is in uppercase so that it can be differentiated from API request parameters.
Common request parameters are as follows:
This document illustrates APIs specific to Tencent Cloud CVMs. For APIs specific to other Tencent Cloud products, please see the relevant documents.
|Action||The name of the API for the desired operation.||String||Yes|
|Region||Region parameter, which is used to identify the region to which the instance you want to work with belongs. For more information, please see Regions and Availability Zones, or use the API Query Region List.
Note: 1. Unless otherwise specified in the API document, this parameter is required generally.
2. Some of the regions are under internal trial and only available to certain users.
|Timestamp||The current UNIX timestamp that records the time at which the API request was initiated.||UInt||Yes|
|Nonce||A random positive integer that is used in conjunction with Timestamp to prevent replay attacks.||UInt||Yes|
|SecretId||The SecretId that is applied for under Cloud API Key to identify identity. A SecretId corresponds to a unique SecretKey, which is used to generate the request Signature.||String||Yes|
|Signature||Request signature, which is used to verify the validity of the request. The signature must be computed based on input parameters.||String||Yes|
|SignatureMethod||Signature method. Supported methods include HmacSHA256 and HmacSHA1. The HmacSHA256 method is used to verify signatures only when the parameter is specified as HmacSHA256. Otherwise, HmacSHA1 is used.||String||No|
|Token||The token used for the temporary certificate, which must be used together with a temporary key. No token is required for a long-term key.||String||No|
The following example shows how common request parameters look like in an API request link for a Tencent Cloud product. If, for example, you want to query the list of Tencent Cloud CVM instances in the Guangzhou region, the request link should look like this:
https://cvm.api.qcloud.com/v2/index.php? Action=DescribeInstances &SecretId=xxxxxxx &Region=ap-guangzhou &Timestamp=1465055529 &Nonce=59485 &Signature=mysignature &SignatureMethod=HmacSHA256 &API request parameters