All Products
Search
Document Center

OpenSearch:API data source

Last Updated:Oct 29, 2026

This topic describes how to add a table when you use an API as a data source.

Add a table

  1. On the Instance Details > Table Management page, click Add Table:

  2. Enter the basic information for the table and click Next:

Configuration description:

  • Table Name: Enter a custom name.

  • Number of Shards: Enter a positive integer no greater than 256 to improve full-build speed and individual query performance. For some existing instances, all index tables must have the same shard count, or at least one index table must have one shard and all remaining index tables must have the same shard count.

  • Data update resources: The resources used for data updates. Each index includes two 4-core, 8 GB update resources free of charge by default. Resources beyond this free quota incur charges. For details, see Billing overview of OpenSearch Vector Search Edition

  • Scenario Template: Vector Search Edition provides three built-in templates: General, Vector - Image Search, and Vector - Text Semantics.

  1. Configure the data source for data synchronization and click Next:

Parameter description:

  • Data Source Type: Select API. This indicates that data is pushed to the instance using an API.

  1. Configure the fields and click Next.

Note
  • The primary key field and the vector field are required. The primary key field must be of the int or string type, and you must select the Primary Key option for it. The vector field must be of the float type, and you must select the Vector Field option for it.

  • By default, the vector field is a multi-value float field. Values are separated by the ha3 separator ^] (UTF encoding: \x1D). You can also specify a custom multi-value separator.

  • If a field is missing or empty, the system supplies a default value: 0 for numeric fields and an empty string for STRING fields. You can also customize default values

  1. Configure the index schema and click Next.

This section is for configuring the vector index:

  • The primary key field and vector field are required. The namespace field is optional and can be left empty.

  • You can select only from these three fixed fields. You cannot add new fields.

  • Vector Dimensions: Select the number of dimensions based on the vectors that are generated by your model.

  • Distance Metric: Select the distance metric based on the vectors that are generated by your model. The system supports two distance metric types: SquareEuclidean and InnerProduct.

  • Vector index algorithm: Select an algorithm based on the vectors generated by your model. Supported algorithms include Quantized Clustering, linear, HNSW (Hierarchical Navigable Small World)

  • Real-time Index: Specifies whether to build a real-time vector index for incremental data from the API. The default value is true.

For other advanced configurations, expand the section. For parameter descriptions, see General vector index configuration:

  1. Confirm the configuration. After you click Confirm, the system automatically creates the table based on your specifications.

You can view the creation progress in the change history.

  1. When the table status changes to In Use, you can test queries on the Query Test page.

Notes

  • When you perform a full build for an API data source, all previously pushed data is cleared. The system then starts synchronizing real-time data from the specified timestamp. Therefore, exercise caution when you perform a full build for an API data source.