Call methods

更新时间:
复制 MD 格式

OpenSearch provides different endpoints, protocols, and request methods for API calls across regions.

Endpoint

OpenSearch provides region-specific endpoints. To obtain the endpoint for your application, go to the application details page in the OpenSearch console. Make sure that you use the correct endpoint.

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:

  • For POST requests, set the content type to application/json. Otherwise, the request fails to be parsed.

  • For GET requests, set the content type to application/json. Otherwise, the request fails to be parsed.

  • If a GET request specifies a return data format, the results are parsed accordingly. For example, if the return format is set to XML, the local program parses the results as XML.

Signature parameters

Each API request must include an Authorization header that contains a signature and other required parameters. For more information, see Signature method of OpenSearch API V3.

Encoding

Requests and responses are encoded in UTF-8.