Get Query Definitions

Get Query Definitions

Gets the list of query definitions for an organisation

Request
URI
GET
https://{api_host}//vrlic/api/v1/query-definitions
COPY
Query Parameters
string
queryName
Optional

queryName

string
source
Optional

source

Possible values are : CONTENT_PACK, USER_DEFINED,
string
sourceName
Optional

sourceName

string
contentPackId
Optional

contentPackId

integer
page
Optional

Number of required pages (defaultValue = 0)

integer
size
Optional

Required page size (defaultValue = 100)

string
sort
Optional

Sort the response based on a field (defaultValue = id,asc)


Authentication
This operation uses the following authentication methods.
Responses
200

OK

{
    "_links": {
        "first": {
            "href": "https://{api_host}/vrlic/api/v1/query-definitions?page=0&size=1"
        },
        "last": {
            "href": "https://{api_host}/vrlic/api/v1/query-definitions?page=19&size=1"
        },
        "next": {
            "href": "https://{api_host}/vrlic/api/v1/query-definitions?page=2&size=1"
        },
        "prev": {
            "href": "https://{api_host}/vrlic/api/v1/query-definitions?page=0&size=1"
        },
        "self": {
            "href": "https://{api_host}/vrlic/api/v1/query-definitions?page=1&size=1"
        }
    },
    "content": [
        {
            "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"
        }
    ],
    "page": {
        "number": 1,
        "size": 1,
        "totalElements": 20,
        "totalPages": 20
    }
}
content
Optional

List of Paginated Content

page
Optional

page

_links
Optional

_links