Hello Dojo,
I am trying to create a Dashboard link to preselect some data in a GQI Filter component upon opening and unable to figure out the syntax. I see the URL changing when adding a filter, so trying to reverse engineer the syntax, but unable to figure out what compression method it uses to see the JSON structure. Is there a way to see the uncompressed JSON structure in the URL? Or an entry in the Help with the full structure of the query in the format of a JSON string?
Many thanks in advance.
Hi
The data used in the url is compressed through LZ compression. The raw data is a json string that uses the format that is described in the DataMiner Docs. There's a trick to see the uncompressed data: Go to the sharing menu of your dashboard and pick the Url option. There you have a way to toggle compression. Pasting that url in a url decoder will give you the json object of the current state of your dashboard.
The way query filters in particular are serialised is as follows:
v:[version]|[query id]%1e[column ID]%1e[filter type]%1e[filter values]
Where
- Version is a version number, currently at 1.
- Query id is the id of the query, can be inspected in the json of the dashboard or network requests (OpenQuerySession).
- Column ID is the ID of the column, can be inspected through the network requests (GetQueryColumns).
- Filter type indicates the way the filter is used: supported values are list, range, boolean, number and string.
- Filter values is the value that belongs to a specific filter type:
- list: [value 2]%1f[value 2]%1f[...]
- range: [min: number]%1f[max: number]%1f[include min: boolean]%1f[include max: boolean]
- boolean, number, string: the actual value
Some examples:
- v:1|d467f43a-b810-4214-b3f7-22d69b7790a0\u001e1_State\u001elist\u001eHidden\u001fStopped\u001fDeleted
- v:1|d467f43a-b810-4214-b3f7-22d69b7790a0\u001e3_Aggregation\u001erange\u001e0\u001f100\u001ffalse\u001ftrue
- v:1|d467f43a-b810-4214-b3f7-22d69b7790a0\u001e1_Is_Active\u001eboolean\u001etrue
We know this isn't a very user friendly format to contruct manually, but we reached a point where the url needs to be able to do that much that keeping it user friendly would reduce the efficiency/maintainability.
I hope this will help you further.
You are an absolute legend, this is exactly what I was looking for, thank you so much!