Get dashboard filters and controls
curl --request GET \
--url https://{instance}.omniapp.co/api/v1/dashboards/{dashboardId}/filters \
--header 'Authorization: Bearer <token>'import requests
url = "https://{instance}.omniapp.co/api/v1/dashboards/{dashboardId}/filters"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{instance}.omniapp.co/api/v1/dashboards/{dashboardId}/filters', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{instance}.omniapp.co/api/v1/dashboards/{dashboardId}/filters",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "https://{instance}.omniapp.co/api/v1/dashboards/{dashboardId}/filters"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{instance}.omniapp.co/api/v1/dashboards/{dashboardId}/filters")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.omniapp.co/api/v1/dashboards/{dashboardId}/filters")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"identifier": "abc123",
"filters": {
"order_status": {
"type": "string",
"kind": "EQUALS",
"values": [
"completed",
"pending"
],
"label": "Order Status",
"description": "Filter by order status",
"required": false,
"hidden": false
},
"order_date": {
"type": "date",
"kind": "WITHIN_RANGE",
"left_side": "2024-01-01",
"right_side": "2024-12-31",
"label": "Order Date"
}
},
"controls": [
{
"id": "field_selector",
"type": "FIELD_SELECTION",
"kind": "FIELD",
"label": "Metric Selector",
"field": "orders.revenue",
"options": [
{
"label": "Revenue",
"value": "orders.revenue"
},
{
"label": "Quantity",
"value": "orders.quantity"
}
]
}
],
"filterOrder": [
"order_status",
"order_date",
"field_selector"
]
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}Dashboard filters
Get dashboard filters and controls
Returns the filter and control configuration for a dashboard, including IDs, types, current default values, and metadata.
GET
/
v1
/
dashboards
/
{dashboardId}
/
filters
Get dashboard filters and controls
curl --request GET \
--url https://{instance}.omniapp.co/api/v1/dashboards/{dashboardId}/filters \
--header 'Authorization: Bearer <token>'import requests
url = "https://{instance}.omniapp.co/api/v1/dashboards/{dashboardId}/filters"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{instance}.omniapp.co/api/v1/dashboards/{dashboardId}/filters', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{instance}.omniapp.co/api/v1/dashboards/{dashboardId}/filters",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "https://{instance}.omniapp.co/api/v1/dashboards/{dashboardId}/filters"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{instance}.omniapp.co/api/v1/dashboards/{dashboardId}/filters")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.omniapp.co/api/v1/dashboards/{dashboardId}/filters")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"identifier": "abc123",
"filters": {
"order_status": {
"type": "string",
"kind": "EQUALS",
"values": [
"completed",
"pending"
],
"label": "Order Status",
"description": "Filter by order status",
"required": false,
"hidden": false
},
"order_date": {
"type": "date",
"kind": "WITHIN_RANGE",
"left_side": "2024-01-01",
"right_side": "2024-12-31",
"label": "Order Date"
}
},
"controls": [
{
"id": "field_selector",
"type": "FIELD_SELECTION",
"kind": "FIELD",
"label": "Metric Selector",
"field": "orders.revenue",
"options": [
{
"label": "Revenue",
"value": "orders.revenue"
},
{
"label": "Quantity",
"value": "orders.quantity"
}
]
}
],
"filterOrder": [
"order_status",
"order_date",
"field_selector"
]
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}Authorizations
Can be either an Organization API Key or Personal Access Token (PAT).
Include in the Authorization header as: Bearer YOUR_TOKEN
Path Parameters
The dashboard identifier
Query Parameters
Requires an Organization API key. Optional user ID that attributes the action to the specified user.
Personal Access Tokens (PATs) cannot use this parameter.
Response
Dashboard filter and control configuration
Was this page helpful?
⌘I

