URL
/vector-service/stats
The sample URL omits information such as the request headers and the encoding method.
The sample URL also omits the endpoint that is used to connect to an OpenSearch application.
For more information about the definitions, usage, and example values of all the request parameters that are concatenated in the preceding URL, see the "Request parameters" section of this topic.
Protocol
HTTP
Request method
POST
Supported format
JSON
Request signature
You can use the following method to calculate the request signature. The request signature is stored in the authorization header.
Parameter | Type | Description |
accessUserName | string | The username. You can view the username on the API Endpoint tab of the Instance Details page. |
accessPassWord | string | The password. You can modify the password on the API Endpoint tab of the Instance Details page. |
import com.aliyun.darabonba.encode.Encoder;
import com.aliyun.darabonbastring.Client;
public class GenerateAuthorization {
public static void main(String[] args) throws Exception {
String accessUserName = "username";
String accessPassWord = "password";
String realmStr = "" + accessUserName + ":" + accessPassWord + "";
String authorization = Encoder.base64EncodeToString(Client.toBytes(realmStr, "UTF-8"));
System.out.println(authorization);
}
}
Valid format for the value of the authorization header:
cm9vdDp******mdhbA==
You must add the Basic prefix when you specify the authorization header in an HTTP request.
Example:
authorization: Basic cm9vdDp******mdhbA==
Request parameters
Parameter | Description | Type | Required |
tableName | The table name. | string | Yes |
Example:
{
"tableName": "gist"
}
Response parameters
response
Parameter | Description | Type |
result | The returned results. | StatsInfo |
totalTime | The response time. Unit: milliseconds. | float |
StatsInfo
Parameter | Description | Type |
partitions | The information about partitions. | list[PartInfo] |
totalDocCount | The total number of documents. | int |
totalSegmentCount | The total number of segments. | int |
PartInfo
Parameter | Description | Type |
partId | The ID of the partition. | int |
docCount | The number of documents. | int |
segmentCount | The number of segments. | int |
Example:
{
"result": {
"partitions": [
{
"partId": 0,
"docCount": 3,
"segmentCount": 1
}
],
"totalDocCount": 3,
"totalSegmentCount": 1
},
"totalTime": 2.185
}