Skip to content

Manually Recover Event



GET /api/v1/keyevent/restore

Overview

Request manual recovery of monitor events in the current workspace based on an event correlation identifier.

Before Calling and Usage Steps

First, obtain the target event with df_source=monitor and its df_monitor_checker_event_ref from the Unrecovered Events, and use it as monitorCheckerEventRef. Although this API uses GET, it initiates a recovery operation and records an audit log. It must be explicitly triggered by an operator and must not be placed in page prefetching, link probing, or automatic retries. If a monitor event found under the same correlation identifier has not been recovered, a recovery event will be requested. content=true only indicates that the processing flow returned; it does not mean that the target was found or that the final recovery was successfully written to storage. It may also return true when no matching record exists or the event has already been recovered. Then query the Unrecovered Events or event records again to confirm the final status. If recovery is in progress, wait before querying again. For business events with df_source=custom, use Create Event to write an event with the same correlation identifier and status=ok. This API uses the workspace that the current API Key belongs to and does not declare cross-workspace or cross-site parameters. For other workspaces or sites, call separately using the Endpoint of the corresponding site and the API Key of the corresponding workspace.

Request Headers

Parameter Name Type Required Description
DF-API-KEY string Y OpenAPI authentication credential for the workspace.
Example: <DF-API-KEY>
How to obtain or enter: Obtain an OpenAPI Key with the permissions for this operation from API Key Management in the target workspace.

Query Request Parameters

Parameter Name Type Required Description
monitorCheckerEventRef string Y Event correlation identifier of the trigger object; it is not __docid, df_event_id, or the Monitor UUID.
Null allowed: False
Example: checkout-prod-latency
How to obtain or enter: From the Unrecovered Events, select a record with df_source=monitor and copy df_monitor_checker_event_ref as is.

Additional Parameter Notes

The public API only declares monitorCheckerEventRef and does not support additional timeRange, needRecoverIssue, or cross-workspace parameters. Recovery queries use the default time range of the query service. Do not use true to conclude that a historical event has been recovered. For historical targets, first check the original event against the current query results.

Request Example

curl --get 'https://openapi.guance.com/api/v1/keyevent/restore' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  --data-urlencode monitorCheckerEventRef=checkout-prod-latency

Response

HTTP 200, application/json. The example below shows the main fields that can be read directly.

Field Type Description
content boolean true indicates that this recovery processing returned; it can also be true when no matching event is found, so you must continue to verify the final event status.
{
  "code": 200,
  "content": true,
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Responses

Authentication, rate limiting, and common request errors are described in Common Error Definitions.

For unknown correlation identifiers, a 404 response is not guaranteed, and no recovery task ID is returned. If downstream processing has not completed, true may be returned first; use the event status change as the basis for confirmation.

HTTP Status errorCode Trigger Condition Message or Response Description Handling
406 ft.ParameterValidationFailed The request field is missing, or the field value violates the declared validation conditions Parameter parsing failed Check the parameter location, field name, type, and value.
406 ft.EventRepeatRecover A recovery request already exists for the same incident, or the incident is being processed in a batch recovery The event is being recovered. Do not perform the operation again Do not resubmit immediately. Wait first and query whether it has already been recovered.
503 ft.QueryServiceUnavailable The query service is temporarily unavailable; the actual upstream returns 503 The query service is temporarily unavailable. Try again later Read content.retryable=true and retry with backoff; if the failure persists, provide the traceId.
406 ft.KodoRequestDeadlineExceeded The event query exceeds the execution time allowed by the backend Data query timed out, which may be caused by the following: excessive data volume, network latency, or high server load. You can resolve this issue in the following ways:
1. Add filter conditions or narrow the time range and query again.
2. Wait a while and try the query again.
Check the current workspace and monitorCheckerEventRef, then retry later; if the failure persists, provide the traceId.
406 ft.KodoTooManyRows The amount of queried data exceeds the backend limit The amount of queried data exceeds the maximum limit. Add filter conditions or reduce the time range and query again. Check the current workspace and monitorCheckerEventRef, then retry later; if the failure persists, provide the traceId.
429 ft.KodoServerOverloaded The query service is busy or overloaded The current request rate is too high. Try again later. Retry after backoff and reduce the number of concurrent requests.
500 ft.InternalServerError Query connection failure, upstream service exception, or other internal error Internal error Retry later; if the failure persists, provide the traceId and a redacted request.

Feedback

Is this page helpful?