GetIndexMonitor

Updated at:

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 (AliyunBailianDataFullAccess is 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 IndexId is 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.

Debug

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.

ActionAccess levelResource typeCondition keyDependent action
sfm:GetIndexMonitorget
*All Resources
*
    None
None

Request syntax

GET /{WorkspaceId}/rag/index/monitor HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
WorkspaceIdstringYes

The ID of the workspace where the knowledge base is located.

llm-3shx2gu255oqxxxx
IndexIdstringYes

The unique ID of the target knowledge base.

kb-123456xxxx
StartTimestamplongYes

The start time of the query, as a UNIX timestamp in seconds.

1767604500
EndTimestamplongYes

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.

  • standard: Standard Edition
  • enterprise: Ultimate Edition

storageMonitorData (Object): The storage monitoring data of the knowledge base.

  • indexStorageLimit (Number): The index storage limit of the knowledge base, in GB.
  • indexStorageUsage (Number): The current index storage usage of the knowledge base, in GB.

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.

  • peakQps (Integer): The peak QPS over the entire time period.

  • totalRequests (Integer): The total number of requests over the entire time period.

  • avgQpsOfActiveSeconds (Number): The average QPS during active seconds over the entire time period. Active seconds are seconds in which calls were made.

  • monitorData (Array): An array of detailed monitoring data broken down by time window. Each object in the array represents the statistics for a time window.

    Details

    • successData (Object): The statistics for successful requests within this window.
    • limitData (Object): The statistics for rate-limited requests within this window.
    • failData (Object): The statistics for failed calls within this window.
    • peakQpsInWindowRange (Integer): The total peak QPS within this window (successful + rate-limited + failed).
    • totalRequests (Integer): The total number of requests within this window (successful + rate-limited + failed).
    • windowRange (Integer): The start time of the time window (UNIX timestamp in seconds).
    • windowRangeEnd (Integer): The end time of the time window (UNIX timestamp in seconds).
    • avgQpsOfActiveSeconds (Number): The average QPS during active seconds within this window.
    The successData, limitData, and failData objects have the same internal structure, as described below:
    • peakQpsInWindowRange (Integer): The peak QPS for the corresponding status.
    • totalRequests (Integer): The total number of requests for the corresponding status.
    • avgQpsOfActiveSeconds (Number): The average QPS during active seconds for the corresponding status.

{ "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 timeChange summaryOperation
2026-01-14New OpenAPIView change details