Skip to content

Send Query Task



POST /api/v1/logmine/send_task

Overview

Send a log clustering query task.

Body Request Parameters

Parameter Name Type Required Description
query string DQL query statement. If this value exists, the namespace and conditions parameters will be invalid. 【Format Requirement】:L::*:(__docid, analysis_field){}
namespace string The full namespace in the DQL query statement, default value is logging.
Optional values: ['object', 'object_history', 'custom_object', 'logging', 'keyevent', 'unrecovered_event', 'tracing', 'rum', 'network', 'security', 'backup_log', 'profiling', 'billing']
highlight boolean Whether to highlight the query string.
conditions string DQL query filter conditions.
Example: source IN ['kube-controller']
Allow null: False
Allow empty string: True
timeRange array Data time range, two elements.
Example: [1573646935000, 1573646960000]
Allow null: False
analysisField string Y Approximate text analysis - field.
Example: message
Allow null: True

Parameter Supplementary Description

Request Example

curl 'https://openapi.truewatch.com/api/v1/logmine/send_task' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"namespace":"logging","conditions":"index in [`default`]","highlight":true,"timeRange":[1683534635416,1683535535416],"analysisField":"message"}' \
--compressed 

Response

{
    "code": 200,
    "content": {
        "taskId": "logminetaskchcbedk24lokg5cqfdb0"
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "10594577704924482412"
}