Forum Discussion
JakeRattner2
7 years agoQrew Trainee
- I imported 'Requests' and used the Quickbase API.
- I defined a csv object based on my data model and called it 'Test'
- Then I retrieved my application data looking for my authorization ticket using:
request = requests.get('https://domainquickbase.com/db/main?a=api_authenticate&username=X&password=X�
) - I then used regex to extract the ticket from the returned xml and called the ticket 'found'
- I then posted the data from my csv object 'test' and passed in my auth ticket 'found':
headers = {'Content-Type':'application/xml','QUICKBASE-ACTION':'api_importfromcsv'} data = '<qdbapi><ticket>'+found+'</ticket><records_csv><![CDATA['+test+']]></records_csv> <clist>1.2.3</clist><apptoken>TOKEN</apptoken></qdbapi>'
r = requests.post(url = �END_PT_URL�, data = data, headers=headers)
I'm sure there are even better ways to do this. If anyone has a method I would love to know.
Jake Rattner | Solutions Architect
(847) 927-1427 | jrattner@quandarycg.com
Quandary Knowledge Base