OpenSearch offers official SDKs for traffic services and control services in multiple programming languages.
Official support
1. Traffic services
OpenSearch provides official traffic service SDKs in six languages: Java, PHP, Go, Python, C#, and TypeScript. These SDKs support data push, queries, and search guidance.
|
Language |
Reference |
|
Java |
|
|
PHP |
|
|
Go |
|
|
Python |
|
|
C# |
|
|
TypeScript |
2. Control services
Note: Control services do not include traffic APIs such as search, drop-down suggestion queries, document push, or data ingestion.
1) Java:
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-opensearch</artifactId>
<version>0.11.0</version>
</dependency>
core:
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-core</artifactId>
<version>4.5.20</version>
</dependency>
2) Go:
go get github.com/aliyun/alibaba-cloud-sdk-go/tree/master/services/opensearch
3) Python:
pip install aliyun-python-sdk-opensearch
4) PHP:
composer require alibabacloud/opensearch
Custom development
Common OpenSearch APIs are defined in the OpenSearch API repository using the Swagger 2.0 protocol. You can use Swagger Codegen to generate client code in up to 50 languages.