Overview

Retrieves the count of filtered/unfiltered dashboards.

Summary

This endpoint returns the number of dashboards based on the provided filter criteria. The filter can be applied to multiple fields and have multiple and/or conditions in it. Alternatively, you may use an existing filter by specifying its id. If both a filter definition and a filter id are passed, the two filters will be joined with an AND. Care will need to be taken to make sure that any filters used have appropriate indexes on the server side otherwise the runtime of the endpoint will be very long.

Request Arguments

Name Type Description Required
filter String The filter expression to apply while counting the dashboards. False
filter_id String Identifier for a preexisting filter. If filter is also set, the two filters are joined with an AND. False

Filter Expressions

There are four types of filters:

Basic

This will filter the results by checking the field "name" for value "Nelson Inc". This will only find exact matches.
Example
{
   "filter":[
      {
         "name":"Nelson Inc"
      }
   ]
}

Full

This expression allows you to specify what operation you want to use for filtering on the field. In the example you would match any record where the field "name" starts with the value "Nelson".
Example
{
   "filter":[
      {
         "name":{
            "$starts":"Nelson"
         }
      }
   ]
}
Below is a list of operation types:
Operation Description
$equals Performs an exact match on that field.
$not_equals Performs an exact match on that field.
$not_equals Matches on non-matching values.
$starts Matches on anything that starts with the value.
$ends Matches anything that ends with the value.
$contains Matches anything that contains the value
$in Finds anything where field matches one of the values as specified as an array.
$not_in Finds anything where field does not matches any of the values as specified as an array.
$is_null Checks if the field is null. This operation does not need a value specified.
$not_null Checks if the field is not null. This operation does not need a value specified.
$lt Matches when the field is less than the value.
$lte Matches when the field is less than or equal to the value.
$gt Matches when the field is greater than the value.
$gte Matches when the field is greater than or equal to the value.

Sub-expressions

This allows you to group filter expressions into or/and groupings. By default all expressions are and'ed together. The example expression would match if the field "name" was either "Nelson Inc" or "Nelson LLC". The only currently accepted sub-expression types are "$and" and "$or".
Example
{
   "filter":[
      {
         "$or":[
            {
               "name":"Nelson Inc"
            },
            {
               "name":"Nelson LLC"
            }
         ]
      }
   ]
}

Modules

There are two module expressions, they operate on modules instead of fields. The current module can be specified by either using the module name "_this" or by leaving the module name as a blank string. The example expression would filter the records in the current module to only your favorites. The only currently accepted module expressions are "$favorite" and "$owner".
Example
{
   "filter":[
      {
         "$favorite":"_this"
      }
   ]
}

Response Arguments

Name Type Description
record_count Integer The total count of dashboards that match the provided filter criteria.

Response

{
   "record_count":87
}

Change Log

Version Change
v11.24 Added /<Dashboards>/count GET endpoint for counting filtered dashboards.