External Event Monitor Event Ingestion¶
POST /api/v1/push-events/{secret}/{subUri}
Overview¶
Receives a single business event through a configured external event webhook.
Before Calling and Usage Steps¶
First create and enable a monitor with jsonScript.type=OuterEventChecker, obtain the secret and subUri from trusted details, and use this dedicated webhook for reporting. This endpoint has requireSignIn=false and does not validate DF-API-KEY; the secret in the URL is used for locating/access and should be kept like a credential. Do not disclose the actual address. subUri must be a single path segment and cannot contain /; writing the slash as %2F still does not match the current public route. For new configurations, simple values such as datakit-push are recommended.
A mismatch is not silently ignored: an unknown secret usually returns 404, while a suffix mismatch or disabled rule returns the corresponding business error. Workspace lock also causes rejection, and the lock state may be cached for up to about 10 minutes. Custom fields other than the fixed event fields can only be strings and cannot override dimensions, bound key:value label keys, or reserved fields; put auxiliary JSON in extraData separately.
After validation, the event processing service is called synchronously, and the monitor/group/labels and channel context are attached for downstream use; rules with isChangeEvent=true are processed according to the Change Events source. A successful response wraps the downstream function result as-is; the SDK does not uniformly determine failure by HTTP status. A non-object response plus a non-200 status, or an explicit ok=false, usually converts to ft.OuterFuncFailed, whereas when an object's ok is not false, the outer HTTP response may be 200 even if the upstream returns 5xx, so you must check the business result in content. This endpoint does not guarantee that the event can already appear on all query/notification pages, nor does it return a globally unique event ID or idempotency credential. This API provides no deduplication guarantee based on fields such as biz_ticket; after a timeout, first check whether an event has already been generated before deciding to retry. This OpenAPI route does not perform additional AIAPI call audit context processing.
Route Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| secret | string | Y | Required path segment, not a DF-API-KEY; must exactly match a saved, non-deleted rule.Example: SECRET-PLACEHOLDERHow to obtain or enter: obtain it from the secret in the target external event monitor details. |
| subUri | string | Y | Required single path segment, case-sensitive, without slashes; do not assemble a multi-level URL yourself. Example: datakit-pushHow to obtain or enter: obtain it from jsonScript.subUri in the same rule. |
Body Request Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| event.status | string | Required; use lowercase protocol values and do not substitute errorEvent/nodata.Example: warningHow to obtain or enter: select the corresponding business status from fatal/critical/error/warning/info/ok. |
|
| event.date | integer | Optional; not milliseconds/microseconds. If omitted, it is passed downstream as-is without a value, and the downstream determines the event time. Clients are not guaranteed to be able to use future/abnormal times. Example: 1785427200How to obtain or enter: convert the actual external event occurrence time into a Unix seconds integer. |
|
| event.title | string | Optional string. If omitted, Studio does not fill in a fixed title; final handling follows the receiving service protocol. Example: Production service exceptionHow to obtain or enter: obtain it from the business alert title. |
|
| event.message | string | Optional string, not a JSON array; do not include secrets. Example: Health check returned an error.How to obtain or enter: enter event content that can be used for locating the issue based on external detection results. |
|
| event.dimension_tags | json | Optional object. Dimension keys cannot start with _ or df_; this layer only checks the object and keys. Values should use simple data types suitable for event dimensions and cannot be duplicated by custom top-level fields of the same name.Example: {"host": "web-example", "service": "production"}How to obtain or enter: select the actual host/service and other dimension fields and values for this event. |
|
| event.dimension_tags.{dimension_name} | any | Dynamic dimension value, not an array of label names; the key must not have the same name as a custom top-level field. Example: web-exampleHow to obtain or enter: for example, host comes from the corresponding resource identifier in the external system. |
|
| event.check_value | float | Optional float/numeric value; do not pass a string. The unit is defined by external detection; Studio does not convert it. Example: 12.5How to obtain or enter: obtain it from the actual external detection value. |
|
| event.{business_field} | string | Optional custom top-level field; the value must be a string. biz_/ext_ prefixes are recommended. The key must not start with _/df_, must not duplicate a dimension_tags key or the key of an already bound key:value label, and cannot use reserved fields.Example: ticket-exampleHow to obtain or enter: for example, biz_ticket comes from an external ticket or request identifier. |
|
| extraData.{custom_key} | any | Dynamic JSON value; follow the target event data protocol. Example: healthcheckHow to obtain or enter: define according to the integrator's actual metadata. |
|
| event | json | Y | Required JSON object, not an event array; status is conditionally required. This endpoint only receives existing external detection results and does not execute threshold queries.Allow null: False Example: {"date": 1785427200, "status": "warning", "title": "Production service exception", "message": "Health check returned an error.", "dimension_tags": {"host": "web-example", "service": "production"}, "check_value": 12.5, "biz_ticket": "ticket-example"}How to obtain or enter: construct one event object from the actual detection result of the business system/alert platform. |
| extraData | json | Optional JSON object, defaults to {}; it becomes the downstream event's df_meta.extra_data and does not replace the top-level event fields. There are no unified required subkeys; do not put credentials in it.Allow null: False Example: {"source_system": "healthcheck", "request_id": "request-example"}How to obtain or enter: obtain auxiliary locating fields from the external integration, such as the source system and external request ID. |
Additional Parameter Notes¶
Parameter description:
Description of the body request parameter structure
| Parameter Name | Parameter Type | Required | Parameter Description |
|---|---|---|---|
| event | json | Yes | Event data |
| extraData | json | No | Additional data that will ultimately be added to the event's df_meta.extra_data field; key:value format is sufficient |
Description of the event request parameter structure
| Parameter Name | Parameter Type | Required | Parameter Description |
|---|---|---|---|
| date | int | No | Event time (unit: seconds) |
| status | string | Yes | Event status; options: fatal, critical, error, warning, info, ok |
| title | string | No | Event title |
| message | string | No | Event content |
| dimension_tags | json | No | Dimension tags, for example: |
| check_value | float | No | Check value |
| User-defined field | str | No | User-defined fields as of 2024-09-04, used as top-level event fields and must meet the restrictions |
Restrictions on event.{user-defined field}
To avoid subsequent issues caused by reporting fields with the same name as different types, user-defined fields must meet the following restrictions:
- The field value must be a string type (for example,
"abc","123"). - The field name must not start with an underscore
_ordf_. - The field name must not duplicate a field name extracted from
dimension_tagsorlabels. - The field name must not use the following reserved fields (it is recommended that all custom fields start with a self-defined prefix, such as
ext_xxx,biz_xxx, etc., for distinction):- date
- status
- source
- title
- message
- dimension_tags
- check_value
- time
- time_us
- timestamp
- workspace_uuid
- workspace_name
- extra_data
- create_time
Request Example¶
curl --request POST 'https://openapi.guance.com/api/v1/push-events/SECRET-PLACEHOLDER/datakit-push' \
-H 'Content-Type: application/json' \
--data-raw '{"event":{"date":1785427200,"status":"warning","title":"Production service exception","message":"Health check returned an error.","dimension_tags":{"host":"web-example","service":"production"},"check_value":12.5,"biz_ticket":"ticket-example"},"extraData":{"source_system":"healthcheck","request_id":"request-example"}}'
Response¶
HTTP 200, application/json. The example below shows the main fields that can be read directly.
| Field | Type | Description |
|---|---|---|
| content | object or other JSON | The downstream function result is wrapped as-is; the following are existing common response fields; fields may be omitted in different versions. |
| content.data | JSON | Downstream business result, commonly {}; it does not always contain an event ID. |
| content.error | integer or string | Downstream business result code, e.g. 200; this is not the Studio HTTP status. |
| content.message | string | Downstream business message. |
| content.ok | boolean | Downstream function result flag; explicit false is usually converted by the SDK to ft.OuterFuncFailed. |
| content.reqCost | number | Raw downstream elapsed time statistic; Studio does not normalize its unit and it may be omitted. |
| content.reqTime | string | Downstream request time, commonly an ISO8601 UTC string; may be omitted. |
| content.respTime | string | Downstream response time, commonly an ISO8601 UTC string; may be omitted. |
| content.traceId | string | Downstream execution trace identifier; may differ from the outer Studio traceId. |
| content.declaration | object | Common declarations are attached only for non-empty objects; other response shapes may omit this. |
{
"code": 200,
"content": {
"data": {},
"error": 200,
"message": "",
"ok": true,
"reqCost": 458,
"reqTime": "2026-07-30T16:00:00.000Z",
"respTime": "2026-07-30T16:00:00.458Z",
"traceId": "FUNC-TRACE-EXAMPLE",
"declaration": {}
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
Error Response¶
For authentication, rate limiting, and common request errors, see Common Error Definitions.
This webhook endpoint does not perform DF-API-KEY authentication; missing API Key/permission errors should not be treated as the main integration path for this page. Event validation, rule/workspace status, and downstream business errors are described on this page. A subUri containing a slash cannot match the route, may directly return 404, and is not guaranteed to have a unified JSON error envelope.
| HTTP Status | errorCode | Trigger Condition | Message or Response Description | Handling |
|---|---|---|---|---|
| 406 | ft.ParameterValidationFailed | Request field missing, or field value violates the declared validation conditions | Parameter parsing failed | Check the parameter location, field name, type, and value. |
| 400 | ft.RequestJsonFormatError | Invalid request JSON syntax | Request JSON format error | Correct the JSON according to content.reason, line, and column. |
| 400 | ft.JsonFormatError | The top level of the JSON body is not an object, such as an array/string | Partial JSON file format error | Submit a JSON object as shown in the example; do not directly submit checkers or an event array. |
| 400 | ft.ParamsValidateError | status missing/invalid in the event object, or type mismatch for fixed subfields such as date/check_value/title |
Parameter validation failed: {} | Submit according to the single event object and field types on this page. |
| 404 | ft.NotFoundRuleInspector | The secret has no non-deleted corresponding rule, or its workspace is unavailable | Specified rule/checker not found | Obtain the webhook address again from the details of the created external event monitor; do not treat the API Key as the secret. |
| 403 | ft.WorkspaceIsLocked | The target workspace is locked, or the short-term lock cache is still valid | The workspace has been locked and cannot be operated on | Have an administrator check the unlock status and retry after the cache expires, up to about 10 minutes. |
| 406 | ft.OuterEventCheckerWebhookSubUriNotValid | The path subUri differs from the value saved for the rule | The webhook address of the external event monitor is invalid. Check whether the address is correct. | Call with the complete webhook suffix from trusted details, paying attention to case and path segments. |
| 406 | ft.OuterEventCheckerNotAvailable | The rule is currently not status=0, for example it has been disabled |
The external event monitor has been disabled or deleted | After confirming that the business allows it, have an authorized person enable it and report again; deleted rules usually return not found first. |
| 404 | ft.MonitorNotFound | The group associated with the rule does not exist or has been deleted | Rule group not found | An administrator should check the historical rule group association and fix it. |
| 400 | ft.DimensionTagsStartswithError | A dimension key starts with _ or df_ |
dimension_tags keys cannot start with df_, _ | Change to a normal business dimension key. |
| 400 | ft.CustomEventFieldValueTypeError | A custom top-level field value is not a string | Custom field value must be a string | Convert it to the agreed string, and put numeric check values in check_value. |
| 400 | ft.CustomEventFieldStartswithError | A custom top-level key starts with _ or df_ |
Custom fields cannot start with df_, _ | Use the biz_/ext_ business prefix. |
| 400 | ft.CustomEventFieldWithDimensionTagsNotAllowed | A custom top-level key is the same as a dimension_tags key | Custom field names must not use keys in dimension_tags | Keep only one location or rename the business field. |
| 400 | ft.CustomEventFieldLabelKeyNotAllowed | A custom field has the same name as a key in a key:value label bound to the rule | Custom field names must not use keys in the monitor's labels (key:value) | Check the bound labels and rename the business field. |
| 400 | ft.CustomEventFieldNotAllowed | A custom key uses a reserved field: source/time/time_us/timestamp/workspace_uuid/workspace_name/extra_data/create_time | Custom field names must not use reserved fields | Use a business prefix, and submit fixed fields in the locations specified on this page. |
| 400 | ft.OuterFuncFailed | The event processing function returns ok=false or a non-JSON failure result | External function call failed | Use the error message and traceId to locate downstream processing, and confirm whether it has been received before retrying. |
| 500 | ft.InternalServerError | Uncaught exceptions such as downstream timeout/connection/invalid JSON, cache/storage, or response processing failures | Internal error | First query by external request identifier whether the event has been generated, to avoid blind replay and duplication; provide the traceId. |