All Products
Search
Document Center

PolarDB:Connection and access

Last Updated:Jul 07, 2026

This topic describes how to configure access credentials (accounts, whitelist, and public network) for a PolarDB-X intelligent search engine instance, and how to connect to search nodes through the REST API, official clients, or OpenSearch Dashboards.

Access configuration entry

  1. Log on to the PolarDB-X console.

  2. In the left-side navigation pane, choose AI Workspace > Agent Cognition Center > Search Engine to open the Search engine instance list page.

  3. In the top-left corner of the page, select a region.

  4. In the instance list, click Instance ID/Name to go to the instance details page.

  5. Switch to the Access Configuration tab. The tab contains the following 4 sections:

    • Quick Access: quick connection examples.

    • Account Management: create and manage REST API access accounts.

    • Connection Information: view the Internal Address / Public Endpoint and their ports.

    • Whitelist: manage the IP address whitelist for your business environments.

Configure the whitelist

Before you access a search node, add the IP address of your business environment to the whitelist.

  1. On the Access Configuration tab, locate the Whitelist section.

  2. Click the Add Whitelist Group button and provide the following information in the dialog box:

    • Group Name: used to distinguish different sources (for example, office or app-prod).

    • Group Whitelist: the allowed IP addresses or CIDR blocks. Separate multiple entries with commas (,).

  3. After submission, a new row appears in the whitelist showing Name, IP, and Actions (Edit / Delete).

Note

Always configure the whitelist for public network access to prevent unauthorized access.

Configure access accounts

REST API access requires a basic authentication username and password. Manage accounts in the Account Management section.

Create an account

  1. Click the Create Account button.

  2. Fill in the form:

    • Account Name: the account name (a combination of letters and digits).

    • Password: the password must be 8 to 32 characters long and must contain at least 3 of the following character types: uppercase letters, lowercase letters, digits, and special characters. The password must not contain consecutive characters (for example, 123 or abc) or common weak patterns.

    • Confirm Password: enter the password again to confirm.

  3. After submission, the account can be used for REST API authentication.

Reset password

In the account list, click Reset Password in the row of the target account, enter a value for New Password that meets the password complexity requirements, and submit.

Delete an account

In the account list, click Delete in the row of the target account. After confirmation, the account is removed from the access credentials.

View connection information

The Connection Information section shows the following endpoint information:

Field

Description

Internal Address

The private domain name used to access the REST API from within a VPC.

Internal Port

The private REST API port (fixed to 9200).

Public Endpoint

The public domain name. You must enable public network access first.

Public Port

The public REST API port (fixed to 9200).

Dashboard Internal Address

The private address for OpenSearch Dashboards.

Dashboard Internal Port

The private port for OpenSearch Dashboards.

Dashboard Public Address

The public address for OpenSearch Dashboards.

Dashboard Public Port

The public port for OpenSearch Dashboards.

Use HTTPS Protocol

Determine whether to enable HTTPS based on your business requirements. HTTP is used by default.

Enable or disable public network access

Public network access is Not Enabled by default. When you need it, click Enable Now to obtain a public domain name. After it is enabled, you can click Disable Public Network to disable public network access.

Note

Public network access exposes the instance to the internet. Always maintain both the whitelist and strong-password accounts.

Connect from the command line (curl)

Basic connection check

# Cluster health status
curl -XGET "http://<API endpoint>:<port>/_cluster/health?pretty" -u "<username>:<password>"

# Node information
curl -XGET "http://<API endpoint>:<port>/_cat/nodes?v" -u "<username>:<password>"

# Index list
curl -XGET "http://<API endpoint>:<port>/_cat/indices?v" -u "<username>:<password>"

Common management commands

# Cluster settings
curl -XGET "http://<API endpoint>:<port>/_cluster/settings?include_defaults=true&pretty" -u "<username>:<password>"

# Index details
curl -XGET "http://<API endpoint>:<port>/<index name>?pretty" -u "<username>:<password>"

# Node resource usage
curl -XGET "http://<API endpoint>:<port>/_cat/nodes?v&h=name,heap.percent,ram.percent,cpu,disk.used_percent" \
  -u "<username>:<password>"

OpenSearch official clients

Intelligent search instances are fully compatible with OpenSearch official clients:

Language

Client

Reference

Java

opensearch-java

https://opensearch.org/docs/latest/clients/java/

Python

opensearch-py

https://opensearch.org/docs/latest/clients/python-low-level/

Go

opensearch-go

https://opensearch.org/docs/latest/clients/go/

Node.js

opensearch-js

https://opensearch.org/docs/latest/clients/javascript/index/

.NET / Ruby / Rust / PHP

opensearch-net / -ruby / -rs / -php

See the OpenSearch official website

Note

Connection configuration essentials:

  • Host: the private or public address from the connection information.

  • Port: the port shown in the console (9200 by default).

  • Protocol: determine whether to enable HTTPS based on your business requirements. HTTP is used by default.

  • Authentication: basic authentication (username and password, created through account management).

OpenSearch Dashboards

Dashboards is the visual management console built into OpenSearch. It provides:

  • Dev Tools: an interactive query console for debugging REST API requests.

  • Discover: browse and search data in indexes.

  • Visualize: create data visualization charts.

  • Dashboard: combine multiple visualizations into a dashboard.

Access method

  1. In the Connection Information section, obtain the private or public Dashboards address.

  2. Open the address in a browser and log on with the username and password that you created in account management.

Run queries with Dev Tools

GET _cluster/health

PUT /test-index
{ "settings": { "number_of_shards": 1 } }

POST /test-index/_search
{ "query": { "match_all": {} } }

Connection troubleshooting

Issue

Possible cause

Solution

Connection refused

Port not reachable or public network not enabled

  • Check whether public network access is Enable Now.

  • Check the whitelist.

Connection timeout

Network unreachable or VPC routing not connected

Make sure the client and the instance are in the same VPC, or connect over the public network.

401 Unauthorized

Authentication failed

Check whether the basic authentication username and password are correct, and whether any special characters in the password need to be escaped.