Hello All,
I am struggling to get data from Quickbase using Alteryx.
It is a two step process:
1) you authenticate and get a ticket that is good for an hour's worth of access.
2) use the ticket to access the data within the application.
My flow currently has three objects:
Text input with a single column, "url" and a value of "https://mycompany.quickbase.com/db/main"
This outputs to a Download object.
Download object:
[Basic]
URL box = Field = "url"
"Encode URL Text" = checked
Output box
"Blob" is selected
[Headers]
Content-Type:application/xml
QUICKBASE-ACTION:API_Authentication
"Dynamic or Unknown Fields" is checked
[Payload]
--data : <qdbapi>
<username>me@null.com</username>
<password>UnbreakablePassword1</password>
<hours>1</hours>
<udata>optional data</udata>
</qdbapi>
"Dynamic or Unknown Fields" is checked
[Connection]
Has my user id and password and active connections = 2 and timeout = 600
BrowseObject
The curl statement that works {minus sensitive data} is:
curl -X POST \
https://mycompany.quickbase.com/db/main \
-H 'Content-Type: application/xml' \
-H 'Postman-Token: f1ac7aeb-7fc5-413d-ac04-876de39e0163' \
-H 'QUICKBASE-ACTION: API_Authenticate' \
-H 'cache-control: no-cache' \
-d '<qdbapi>
<username>me@null.com</username>
<password>UnbreakablePassword1</password>
<hours>1</hours>
<udata>optional data</udata>
</qdbapi>'
This SHOULD return:
<?xml version="1.0" ?>
<qdbapi>
<action>API_Authenticate</action>
<errcode>0</errcode>
<errtext>No error</errtext>
<udata>optional data</udata>
<ticket>areallylongstringthathasallkindsofnumbersandletterswhichmakesitsuppersecure</ticket>
<userid>qb_internal_user_id</userid>
</qdbapi>
I then need to extract the ticket value and use it like this:
curl --request POST \
--url https://mycompany.quickbase.com/db/bjn3iv3yk \
--header 'Content-Type: application/xml' \
--header 'Postman-Token: c2b5a353-fbd2-433a-a067-2b03ba608415' \
--header 'QUICKBASE-ACTION: API_DoQuery' \
--header 'cache-control: no-cache' \
--data '<qdbapi>\n <ticket>areallylongstringthathasallkindsofnumbersandletterswhichmakesitsuppersecure</ticket>\n <apptoken>mypredefinedtokenthatIcantpostinpublic</apptoken>\n <udata>mydata</udata>\n <includeRids>1</includeRids>\n</qdbapi>'
When I run that flow specified above I get:
HTTP/1.1 200 OK
Date: Wed, 24 Oct 2018 17:51:09 GMT
Content-Type: application/xml
Transfer-Encoding: chunked
Connection: keep-alive
Set-Cookie: __cfduid=somerandomvaluenottobepublished; expires=Fri, 23-Nov-18 17:51:09 GMT; path=/; domain=.quickbase.com; HttpOnly
Set-Cookie: sbIID=chocolatechip; path=/; secure
Set-Cookie: scache=Oct 14 2018 16:28:30_3; expires=Tue, 19-Jan-2038 00:00:00 GMT; path=/; secure
QUICKBASE-ERRCODE: 11
QUICKBASE-ERRTEXT: Could not parse XML input
X-Powered-By:
x-ua-compatible: IE=Edge,chrome=IE8
p3p: "/p3p/QBSpolicy.xml",CP="morestringsthatdon'tneedtobepublished"
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
CF-RAY: laser-DFW
Content-Encoding: gzip
I searched the forum for this and I found a post that showed how to pull down a stock quote. So I am basing my work on that.
I saw someone elses post that talked about using a "connection macro". I have no idea what that is as I am something of a Alteryx newbie.
I say this so that you can understand that I am not determined to use one method over another. I just need something that works!
Thanks.