GetIndexMonitor
You can call the GetIndexMonitor operation to query monitoring data for a specified knowledge base within a specific time range. This data is crucial for App Performance Analytics, capacity planning, and cost management. The monitoring data includes two main dimensions: storage and retrieval. Storage monitoring retrieves the index storage limit and current usage of the knowledge base. Retrieval monitoring retrieves performance metrics for the query period, such as peak queries per second (QPS), total requests, and average QPS. The metrics are provided as totals and are also broken down by time window. The requests are categorized as successful, failed, and rate-limited.
Operation description
- RAM users (sub-accounts) must first obtain the API permissions for Alibaba Cloud Model Studio (
AliyunBailianDataFullAccessis required) and join a workspace before they can call this operation. Alibaba Cloud accounts (primary accounts) can call this operation directly without authorization. We recommend that you call this operation by using the latest version of the Alibaba Cloud Model Studio SDK. - Before you call this operation, make sure that your knowledge base has been created and has not been deleted (that is, the knowledge base ID
IndexIdis valid). - This operation is idempotent.
- The query time range (
EndTimestamp-StartTimestamp) can be up to 30 days. - The granularity of time windows in the returned data is adjusted dynamically based on the queried time range.
Try it now
You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After the operation succeeds, OpenAPI Explorer can automatically generate SDK code examples.
RAM authorization
The following table describes the authorization information for this API. You can use the Action element in RAM permission policy statements to grant RAM users or RAM roles the permission to call this API. Details:
-
Operation: the specific permission.
-
Access level: the access level of each operation. Valid values: Write, Read, and List.
-
Resource type: the resource types that support authorization for the operation. Details:
- Required resource types are marked with a preceding asterisk (*).
- For operations that do not support resource-level authorization, All Resources is used.
-
Condition key: the condition keys defined by the cloud service.
-
Dependent action: other permissions required to successfully perform the operation. The caller must have the permissions of the dependent actions at the same time for the operation to succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| sfm:GetIndexMonitor | get | *All Resources * |
| None |
Request syntax
GET /{WorkspaceId}/rag/index/monitor HTTP/1.1
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| WorkspaceId | string | Yes | The ID of the workspace where the knowledge base is located. | llm-3shx2gu255oqxxxx |
| IndexId | string | Yes | The unique ID of the target knowledge base. | kb-123456xxxx |
| StartTimestamp | long | Yes | The start time of the query, as a UNIX timestamp in seconds. | 1767604500 |
| EndTimestamp | long | Yes | The end time of the query. The maximum supported value is the start time plus 30 days. This is a UNIX timestamp in seconds. | 1767604500 |
Response elements
Element | Type | Description | Example |
|---|---|---|---|
object | Schema of Response | ||
RequestId | string | The request ID. | 778C0B3B-xxxx-5FC1-A947-36EDD13606AB |
Code | string | The status code. | 200 |
Data | any | The core data object of the response. pipelineCommercialType (String): The edition of the knowledge base.
storageMonitorData (Object): The storage monitoring data of the knowledge base.
pipelineCommercialCu (Integer): The number of RCU for the Ultimate Edition knowledge base. For example: 2. qpsMonitorData (Object): The aggregated retrieval monitoring data for the knowledge base over the entire query period.
| { "code": "Success", "status_code": 200, "data": { "pipelineCommercialType": "standard", "storageMonitorData": Object{...}, "qpsMonitorData": Object{...} }, "success": true, "message": "success", "request_id": "65d34b79-b97e-478e-a0a3-xxx", "status": "SUCCESS" } |
Message | string | The status message. | success |
Success | boolean | Indicates whether the request was successful. | true |
Status | integer | The status code returned by the operation. | SUCCESS |
Examples
Success response
JSON format
{
"RequestId": "778C0B3B-xxxx-5FC1-A947-36EDD13606AB",
"Code": 200,
"Data": "{\n \"code\": \"Success\",\n \"status_code\": 200,\n \"data\": {\n\"pipelineCommercialType\": \"standard\", \"storageMonitorData\": Object{...},\n \"qpsMonitorData\": Object{...}\n },\n \"success\": true,\n \"message\": \"success\",\n \"request_id\": \"65d34b79-b97e-478e-a0a3-xxx\",\n \"status\": \"SUCCESS\"\n}",
"Message": "success",
"Success": true,
"Status": 0
}
Error codes
Visit the Error Center to view more error codes.
Change history
| Change time | Change summary | Operation |
|---|---|---|
| 2026-01-14 | New OpenAPI | View change details |