QueryDefinitionDto

QueryDefinitionDto
QueryDefinitionDto

Query definition

JSON Example
{
    "name": "test_query_definition",
    "id": "789kl5b3c6-2434-457e-8fcb-b75abcceefa7",
    "queryId": "com.vmware.test_id",
    "source": "USER_DEFINED",
    "sourceName": "testing_source",
    "contentPackId": "et4671072-94a6-4106-8d20-c153896e91c5",
    "description": "Note: details about this query definition",
    "url": "http://kb.vmware.com/kb/778652729092us8",
    "constraints": {
        "operator": "AND",
        "fieldName": null,
        "value": null,
        "constraints": [
            {
                "operator": "EXISTS",
                "fieldName": "text",
                "value": "error",
                "constraints": [],
                "tags": []
            },
            {
                "operator": "EXISTS",
                "fieldName": "text",
                "value": "exception",
                "constraints": [],
                "tags": []
            },
            {
                "operator": "LESS_THAN",
                "fieldName": "build_number",
                "value": "7408",
                "constraints": [],
                "tags": []
            }
        ],
        "tags": []
    },
    "aggregationFunctions": [
        {
            "fieldName": "text",
            "functionName": "AVG"
        },
        {
            "fieldName": "text",
            "functionName": "MIN"
        },
        {
            "fieldName": "build_number",
            "functionName": "MAX"
        }
    ],
    "groupByTerms": [
        {
            "fieldName": "timestamp",
            "groupByType": "FIXED_BUCKET"
        }
    ],
    "fieldListItems": [
        {
            "name": "test_query_definition_name",
            "link": "com.vmware.test_link"
        }
    ],
    "relationFunctions": [
        {
            "relationName": "9876ed31-fe70-4c61-8db7-917a1a2636f1",
            "relationType": "LOGS"
        }
    ],
    "isSearchable": false,
    "isAnnotation": false,
    "createdBy": "[email protected]",
    "createdAt": "2023-05-09T21:25:15.934Z",
    "lastUpdatedBy": "[email protected]",
    "lastUpdatedAt": "2023-05-09T21:25:15.934Z",
    "widget": {
        "name": "test_widget",
        "widgetType": "CHART",
        "analysisFunctions": null,
        "visualization": {
            "type": "AREA",
            "options": {
                "logaxis": "false",
                "piestyle": "normal",
                "pielabelstyle": "legend",
                "piepercentage": "false"
            }
        },
        "filter": null
    },
    "alertSolrQuery": "SELECT AVG(text) as \"avg test_field\", MIN(text) as \"min test_field\", MAX(build_number) as \"max test_build\" FROM logs WHERE (text=exist() AND text=exist() AND text<7408)",
    "isFavorite": false,
    "entityTagAssociation": [
        {
            "tagId": "4c454315-e469-432b-a302-3e8eb0e10690",
            "tagName": "test_tag_1"
        },
        {
            "tagId": "7795d0ee-4d0b-496b-b48b-fc5b7c6f4e89",
            "tagName": "test_tag_2"
        }
    ],
    "documentSelfLink": "/vrlic/api/v1/query-definitions/789kl5b3c6-2434-457e-8fcb-b75abcceefa7"
}
string
queryId
Optional

A unique query identifier

string
name
Required

A unique query name

string
contentPackId
Optional

ID of the content pack that this query belongs to if the query is part of a content pack

string
source
Optional

All allowed sources of query, which include: USER_DEFINED

string
description
Optional

Detailed description of the query definition

constraints
Required

constraints

aggregationFunctions
Optional

List of aggregate field and function names

groupByTerms
Optional

List of 'group by' field names and types

relationFunctions
Optional

List of relation names and types. The allowed relation type includes: LOGS