Skip to main content
GET
/
activeviam
/
query-history
/
rest
/
v1
/
queries
Retrieve multiple queries with optional filtering
curl --request GET \
  --url http://localhost:9090/activeviam/query-history/rest/v1/queries
import requests

url = "http://localhost:9090/activeviam/query-history/rest/v1/queries"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('http://localhost:9090/activeviam/query-history/rest/v1/queries', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_PORT => "9090",
CURLOPT_URL => "http://localhost:9090/activeviam/query-history/rest/v1/queries",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "http://localhost:9090/activeviam/query-history/rest/v1/queries"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("http://localhost:9090/activeviam/query-history/rest/v1/queries")
.asString();
require 'uri'
require 'net/http'

url = URI("http://localhost:9090/activeviam/query-history/rest/v1/queries")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "data": [
    {
      "endDate": "2023-11-07T05:31:56Z",
      "id": "<string>",
      "nodeName": "<string>",
      "query": "<string>",
      "queryMetadata": {},
      "startDate": "2023-11-07T05:31:56Z",
      "traceId": "<string>",
      "username": "<string>"
    }
  ],
  "pagination": {
    "pageNumber": 123,
    "pageSize": 123,
    "totalItems": 123,
    "totalPages": 123
  }
}
{
"data": [
{
"endDate": "2023-11-07T05:31:56Z",
"id": "<string>",
"nodeName": "<string>",
"query": "<string>",
"queryMetadata": {},
"startDate": "2023-11-07T05:31:56Z",
"traceId": "<string>",
"username": "<string>"
}
],
"pagination": {
"pageNumber": 123,
"pageSize": 123,
"totalItems": 123,
"totalPages": 123
}
}

Query Parameters

page
integer
default:0

Page number (0-indexed). Default: 0

page_size
integer
default:10

Number of items per page. Default: 10

user
string

Filter by username(s). Can be a single value or JSON array like ["user1", "user2"]

status
string

Filter by query status(es). Can be a single value or JSON array. Valid values: RUNNING, SUCCESSFUL, FAILED, CANCELLED

type
string

Filter by query type(s). Can be a single value or JSON array. Valid values: MDX, UNKNOWN

started_after
string<date-time>

Only include queries started after this ISO-8601 date/time

started_before
string<date-time>

Only include queries started before this ISO-8601 date/time

ended_after
string<date-time>

Only include queries ended after this ISO-8601 date/time

ended_before
string<date-time>

Only include queries ended before this ISO-8601 date/time

max_duration
string

Maximum duration in milliseconds or ISO-8601 duration format (e.g., PT1H30M for 1 hour 30 minutes)

min_duration
string

Minimum duration in milliseconds or ISO-8601 duration format

metadata.*
string

Filter by metadata attributes using the pattern 'metadata.{attributeName}'. Can be a single value or JSON array. For example: metadata.foo=["value1", "value2"]

arg0
object
required

Response

Paginated list of query history entries retrieved successfully. Response includes data array and pagination metadata (pageNumber, pageSize, totalItems, totalPages).

data
object[]
pagination
object