Skip to content

Get Event Content



GET /api/v1/events/{doc_id}/get

Overview

Retrieve the raw content of a single event in the current workspace by event document ID.

Prerequisites and Usage Steps

Obtain doc_id from content.data[].__docid in the Unrecovered Events List. Do not use df_event_id or df_monitor_checker_event_ref as a substitute. For historical events, use timeRange to specify a window that covers the event time. A successful response returns a content object; when no record is found, it is {}, and a 404 is not automatically returned based on the event ID. If timeRange is omitted or an empty string is passed, the query service's default window is used; do not rely on a fixed historical span. This API uses the workspace to which the current API Key belongs and does not declare cross-workspace or cross-site parameters. For other workspaces or sites, call the corresponding site Endpoint with the API Key for the corresponding workspace separately.

Route Parameters

Parameter Type Required Description
doc_id string Y Single event document ID; path parameter.
Example: DOC-EXAMPLE
How to obtain or enter: Copy __docid from the response items in the Unrecovered Events List.

Request Headers

Parameter 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 required permission from API Key Management in the target workspace.

Query Request Parameters

Parameter Type Required Description
timeRange string Optional time range; format is a JSON array string of [start milliseconds,end milliseconds].
Allowed null: False
Example: [1785427200000, 1785430800000]
How to obtain or enter: Based on the millisecond value of time or date for the target event, select start and end times that cover it, serialize the two-item array as a string, and URL-encode it.

Additional Parameter Notes

For the meaning of raw fields, see Event Field Reference. timeRange is declared as a string, and the server parses the JSON within it. You must pass a two-item millisecond array; invalid JSON or an incorrect structure may return a generic internal error. The isRecover, alert_time_ranges, Issue, and incident association fields added to the list are not fixed outputs of the details API.

Request Example

curl --get 'https://openapi.guance.com/api/v1/events/DOC-EXAMPLE/get' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  --data-urlencode 'timeRange=[1785427200000,1785430800000]'

Response

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

Field Type Description
content object Event raw field object returned by the query; {} if no record exists.
content.__docid string Event document ID. Use it as the doc_id path parameter for event details; it is different from df_event_id and the event association identifier.
content.time integer Time returned by the event query, in Unix milliseconds.
content.date integer Compatibility time field; same as time in the list, in Unix milliseconds.
content.df_title string Event title.
content.df_message string Detailed event description.
content.df_status string Event status. In the Unrecovered Events list, the values are fatal, critical, error, warning, and nodata; in details, it may also be ok, info, or a recovery status defined by another source.
content.df_source string Event source, for example, monitor indicates a monitoring event and custom indicates a custom event created by this module.
content.df_event_id string Unique event ID; not used as the doc_id path parameter for details.
content.df_monitor_checker_event_ref string Event association identifier for the same trigger object. Used for grouping and recovery, and cannot be treated as a single event ID.
content.df_dimension_tags string or null Detection dimension tags, usually a serialized JSON object string; when present, parse it to read actual dimensions such as service and host.
content.df_check_range_start integer Start time of the detection range, in Unix seconds. Filled with 0 when missing in the list.
content.df_check_range_end integer End time of the detection range, in Unix seconds. Filled with 0 when missing in the list.
content.df_fault_start_time integer or null Start time of the current incident, in Unix seconds; returned only when provided by the source.
content.df_fault_id string or null ID of the current incident, usually the df_event_id of the first incident event.
content.df_monitor_checker string or null Detection function name, for example, custom_metric.
content.df_monitor_checker_name string or null Monitor name.
content.df_monitor_checker_value number, string, or null Detection value when the event was triggered; the unit is determined by the monitor's metric configuration and cannot be uniformly treated as milliseconds.
content.df_monitor_type string or null Monitoring type, such as custom, slo, and bot_obs. Integration collection integration_collection is not included in this Unrecovered Events list.
content.df_workspace_uuid string or null Workspace identifier in the event record.
content.df_meta string, object, or null Extended metadata provided by the source; a string may be a serialized JSON value. The structure varies by event source.
content.df_bot_obs_detail string, object, or null Additional details for Intelligent Inspection events; may be missing for other sources.
content.df_event_detail string, object, or null Extended details provided by the event source; fields are provided according to the corresponding monitoring type.
content.df_is_silent boolean, number, or null Mute flag recorded by the source; the list does not uniformly convert this raw value to boolean.
content.df_sent_target_types array, string, or null Notification target types recorded by the source; may vary with the source and historical record format.
content.df_alert_info string, object, or null Alert information recorded by the source; the structure varies by event type.
content.df_monitor_checker_id string Monitor UUID provided by the source; can be used to find the monitor configuration.
content.df_monitor_id string Alert Policy UUID provided by the source.
content.df_monitor_name string Alert Policy name provided by the source.
content.Custom fields string, number, boolean, array, object, or null Other raw fields stored with the event, including custom fields. Field names, structures, and units depend on the collection source and are not guaranteed to be the same for all events.
content.declaration object or null Workspace common declaration attached to non-empty results; not attached to empty object results.
{
  "code": 200,
  "content": {
    "__docid": "DOC-EXAMPLE",
    "time": 1785430800000,
    "date": 1785430800000,
    "df_title": "checkout-api response time exceeds threshold",
    "df_message": "The average response time over the last 5 minutes exceeded 500 ms.",
    "df_status": "critical",
    "df_source": "monitor",
    "df_event_id": "event-example",
    "df_monitor_checker_event_ref": "checkout-prod-latency",
    "df_dimension_tags": "{\"service\":\"checkout-api\",\"env\":\"production\"}",
    "df_check_range_start": 1785430500,
    "df_check_range_end": 1785430800,
    "df_fault_start_time": 1785430500,
    "df_fault_id": "event-fault-example",
    "df_monitor_checker": "custom_metric",
    "df_monitor_checker_name": "checkout-api average response time",
    "df_monitor_checker_value": 800,
    "df_monitor_type": "custom",
    "df_workspace_uuid": "wksp_example",
    "df_is_silent": false,
    "df_sent_target_types": [
      "dingtalk"
    ],
    "df_meta": "{}",
    "df_bot_obs_detail": null,
    "df_event_detail": null,
    "df_alert_info": null,
    "df_monitor_checker_id": "rul_example",
    "df_monitor_id": "monitor_example",
    "df_monitor_name": "Production service alert",
    "declaration": {}
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

When no event is found

{
  "code": 200,
  "content": {},
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Responses

For authentication, rate limiting, and common request errors, see Common Error Definitions.

When no event is found, the response is a successful empty object. Check the workspace, site, __docid, and the timeRange that covers the event time.

HTTP Status errorCode Trigger Condition Message or Response Description Resolution
406 ft.ParameterValidationFailed 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.
503 ft.QueryServiceUnavailable The query service is temporarily unavailable; the actual upstream returned 503 The query service is temporarily unavailable. Please try again later. Read content.retryable=true and retry with backoff; if the failure persists, provide 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 reasons: excessive data volume, network latency, or high server load. You can resolve this issue in the following ways:
1. Add filter conditions or reduce the time range, and then query again.
2. Wait for a period of time and try the query again.
Reduce timeRange and check doc_id; if the failure persists, provide 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 then query again. Reduce timeRange and check doc_id; if the failure persists, provide traceId.
429 ft.KodoServerOverloaded The query service is busy or overloaded The current request rate is too high. Please try again later. Retry with backoff and reduce the number of concurrent requests.
500 ft.InternalServerError Query connection failed, the upstream service is abnormal, or another internal error occurred Internal error Try again later; if the failure persists, provide traceId and a redacted request.

Feedback

Is this page helpful?