Forum Discussion
ArchiveUser
9 years agoQrew Captain
Yes, it sounds like you're close. I just ran an API_GetSchema for a test application that I own, and here's one of the queries I saw returned:
<query id="10"> <qyname>Calendar Of Open Tasks By Project</qyname> <qytype>calendar</qytype> <qydesc> Calender view of open tasks due this month by project </qydesc> <qycrit>{'56'.CT.'_ask1_'}AND{'12'.XEX.'Completed'}</qycrit> <qyclst>184</qyclst> <qyslst>77.184</qyslst> <qyopts>so-AA.gb-D.hwe.cab.cmx-30.</qyopts> <qycalst>-1.0</qycalst> <qycalend>10</qycalend> </query> According to the API_DoQuery documentation here: http://www.quickbase.com/api-guide/index.html#do_query.html you need to use parameter names like <options> instead of <opts> so it's not as simple as removing the "qy" portion of what's returned. If you can parse through the XML returned by your GetSchema command, the qycrit is the query portion, the qyclist would go to the clist parameter, the qyslist would go to the slist parameter, and the qyopts would go to the options parameter. For example, your structure would look like this:
POST https://target_domain/db/target_dbid HTTP/1.0
Content-Type: application/xml
Content-Length:
QUICKBASE-ACTION: API_DoQuery
<qdbapi>
<ticket>auth_ticket</ticket>
<apptoken>app_token</apptoken>
<udata>mydata</udata>
<query>({'481'.EX.'text1'}OR{'481'.EX.'text2'})AND{'391'.XCT.'cancel'}</query>
<clist>65.92.94.91.93.-1</clist>
<slist>481</slist>
<options>so-A.gb-V.not.</options>
</qdbapi>
<query id="10"> <qyname>Calendar Of Open Tasks By Project</qyname> <qytype>calendar</qytype> <qydesc> Calender view of open tasks due this month by project </qydesc> <qycrit>{'56'.CT.'_ask1_'}AND{'12'.XEX.'Completed'}</qycrit> <qyclst>184</qyclst> <qyslst>77.184</qyslst> <qyopts>so-AA.gb-D.hwe.cab.cmx-30.</qyopts> <qycalst>-1.0</qycalst> <qycalend>10</qycalend> </query> According to the API_DoQuery documentation here: http://www.quickbase.com/api-guide/index.html#do_query.html you need to use parameter names like <options> instead of <opts> so it's not as simple as removing the "qy" portion of what's returned. If you can parse through the XML returned by your GetSchema command, the qycrit is the query portion, the qyclist would go to the clist parameter, the qyslist would go to the slist parameter, and the qyopts would go to the options parameter. For example, your structure would look like this:
POST https://target_domain/db/target_dbid HTTP/1.0
Content-Type: application/xml
Content-Length:
QUICKBASE-ACTION: API_DoQuery
<qdbapi>
<ticket>auth_ticket</ticket>
<apptoken>app_token</apptoken>
<udata>mydata</udata>
<query>({'481'.EX.'text1'}OR{'481'.EX.'text2'})AND{'391'.XCT.'cancel'}</query>
<clist>65.92.94.91.93.-1</clist>
<slist>481</slist>
<options>so-A.gb-V.not.</options>
</qdbapi>