All Products
Search
Document Center

OpenSearch:Request structure

Last Updated:Sep 09, 2021

Endpoint

OpenSearch is available in different regions and provides different endpoints for the regions. You can obtain the endpoints that can be used to access an OpenSearch application on the details page of the application in the OpenSearch console. Make sure that you use a valid endpoint when you access an OpenSearch application.

Protocol

HTTP is supported in all regions. HTTPS is supported in the China (Qingdao), China (Beijing), China (Hangzhou), China (Shanghai), and China (Shenzhen) regions.

Request method

To push data, use the POST method. To query data, use the GET method.

When you specify the content type for a request, take note of the following items:

  • In an API request that uses the POST method to submit data, set the content type to application/json. Otherwise, the API request fails to be parsed.

  • In an API request that uses the GET method to query data, set the content type to application/json. Otherwise, the API request fails to be parsed.

  • In an API request that uses the GET method to query data and sets the data format of return results, the return results can be parsed based on the specified format. For example, if the data format of return results is set to XML in an API request, the local program parses data based on the XML format.

Signature parameters

Each API request must contain an Authorization header. This header contains a signature and other required header parameters. The signature indicates that the current request is authorized. For more information, see Signature method of OpenSearch API V3.

Encoding

Requests and responses are encoded in UTF-8.