Forum Discussion
_anomDiebolt_
8 years agoQrew Elite
There are two different sets of URLs used in QuickBase - a "native" set and the API set. These two sets of URLs use different query parameters although on occasion there may be a common query parameter (such as qid). All the "native" URLs return HTML and are intended to be viewed by humans. Most of the API URLs return XML and are not intended to be viewed by humans - rather the API URLs are intended to be consumed by some type of script or program.
When you view a saved report such as the following grouped report of the Formula Functions:
https://login.quickbase.com/db/6ewwzuuj?a=q&qid=6
you can discover the native parameters used by this saved report by entering this URL and formatting the resulting JSON info:
https://login.quickbase.com/db/6ewwzuuj?a=JBI_GenExpandedURL&qid=6
From the above JSON you can see that the parameters that make up this native URL are as follows
The &opts parameter is period delimited into three parts:
so-AAA
gb-V
nos
The so part means "sort order" and is encoded as an A (ascending) or D (descending) and refers to the fields identified by the &slist parameter.
The gb part means "group by" and is encoded as a V (group by equal values), I (group by first word) or F (group by first letter). In this case there is only one grouping level so only one encoded V is used.
I have no idea what nos refers to and I have never needed it.
The API method API_DoQuery also has an &slist parameter along with an &options parameter where you can control the sort order using sortorder-A and sortorder-D (see the docs). There is no grouping parameter as API_DoQuery always returns a "rectangular" XML response. To group and XML response you convert it to JSON and using underscore's groupBy() method.
So basically it is a small mess.
When you view a saved report such as the following grouped report of the Formula Functions:
https://login.quickbase.com/db/6ewwzuuj?a=q&qid=6
you can discover the native parameters used by this saved report by entering this URL and formatting the resulting JSON info:
https://login.quickbase.com/db/6ewwzuuj?a=JBI_GenExpandedURL&qid=6
{
"errorCode": 0,
"errorMsg": "",
"expURL": "&qt=tab&dvqid=6&clist=7.11.8.9.10&slist=6.7.11&opts=so-AAA.gb-V.nos."
}
From the above JSON you can see that the parameters that make up this native URL are as follows
&qt=tab
&dvqid=6
&clist=7.11.8.9.10
&slist=6.7.11
&opts=so-AAA.gb-V.nos.
The &opts parameter is period delimited into three parts:
so-AAA
gb-V
nos
The so part means "sort order" and is encoded as an A (ascending) or D (descending) and refers to the fields identified by the &slist parameter.
The gb part means "group by" and is encoded as a V (group by equal values), I (group by first word) or F (group by first letter). In this case there is only one grouping level so only one encoded V is used.
I have no idea what nos refers to and I have never needed it.
The API method API_DoQuery also has an &slist parameter along with an &options parameter where you can control the sort order using sortorder-A and sortorder-D (see the docs). There is no grouping parameter as API_DoQuery always returns a "rectangular" XML response. To group and XML response you convert it to JSON and using underscore's groupBy() method.
So basically it is a small mess.
- JoshWeeman8 years agoQrew Assistant CaptainExcellent, thanks for going into such detail. Very helpful!