Hello Jeof
What in custom reports is shown as a drill down, is translated into the API call as a filter condition. A filter condition is very similar to a WHERE clause in SQL and if you are familiar with it, you will find the Analytics filter easy to use. Please keep in mind that the syntax is similar, but that it will not support all the flexibility that you have in a real transactional DB dialect.
Filters are sent as a query parameter named “filter”.
Every condition has the following form:
{dimension} {operator} {value or values to compare}
Where operator can be “eq” (=), “ne” (!=), “gt” (>), “lt” (<), “ge” (>=), “le” (<=), “in” and “notin” (not in)
A note here, operators are case sensitive, “IN” will not work, you need to use “in”.
For example, you can say:
…/{org}/environments/prod/stats/{custom dimension}?select=sum(message_count)&timeRange=06/01/2015%2000:00~06/03/2015%2000:00&timeUnit=day&filter=(client_id in 'ABC123')
You can use in a filter any dimension listed in your environment schema, the same thing with the group by dimension (the fragment after ../stats/ ).
To retrieve the schema for your environments, use:
…/{org}/environments/{env}/analytics/admin/schema?type=fact
You can also use several conditions using “and” or “or” operands.
Note. Keep your parenthesis in your filter condition at minimum, handling nested parenthesis is not well supported.
I hope this helps.