To send a Bastionhost API request, you must send an HTTP GET request to the Bastionhost endpoint. You must add the request parameters that correspond to the API operation being called. After you call the API operation, the system returns a response. The request and response are encoded in UTF-8.

Request structure

Bastionhost API operations use the RPC protocol. You can call Bastionhost API operations by sending HTTP GET requests.

The request syntax is as follows:
http://Endpoint/?Action=xx&Parameters
where:
  • Endpoint: The endpoint of the Bastionhost API is yundun-bastionhost.aliyuncs.com.
    Note The endpoint of the Bastionhost API in a region is the value of the RegionEndpoint parameter of the region returned by the DescribeRegions operation.
  • Action: the name of the operation being performed. For example, to query created Bastionhost instances, you must set the Action parameter to DescribeInstances.
  • Version: the version number of the API. Set the value to 2019-12-09.
  • Parameters: the request parameters for the operation. Separate multiple parameters with ampersands (&).

    Request parameters include both common parameters and operation-specific parameters. Common parameters include the API version and authentication information. For more information, see Common parameters.

The following example demonstrates how to call the DescribeInstances operation to query created Bastionhost instances:
Note The following code has been formatted to ease reading.
https://yundun-bastionhost.aliyuncs.com/?Action=DescribeInstances
&Format=JSON
&RegionId=cn-hangzhou
&SecureTransport=true
&SignatureMethod=HMAC-SHA1
&SignatureNonce=a5b43544e806d8aab613c2056ee6****
&SignatureVersion=1.0
&SourceIp=42.120.XX.XX
&Timestamp=2020-05-29T03%3A17%3A03Z
&Version=2019-12-09
&Signature=nYUmXEzEmxY52u6Sg8X8%2FkMVDT****
…