OpenSearch provides official SDKs for multiple programming languages and supports custom development by using Swagger Codegen.
Official support
1. Traffic services
OpenSearch provides official traffic service SDKs for Java, PHP, Go, Python, C#, and TypeScript. These SDKs support data push, search queries, and search guidance.
|
Language |
Reference |
|
Java |
|
|
PHP |
|
|
Go |
|
|
Python |
|
|
C# |
|
|
TypeScript |
2. Control plane services
Note: Control plane services do not include traffic APIs for search, drop-down suggestions, 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 by using the Swagger 2.0 protocol. You can use Swagger Codegen to generate client code in up to 50 languages.