Dear colleagues from Coda,
Just started to explore the CODA environment today and I created a short Python script to run a lookup at my CODA document directory. I was able to create an API key at my account stetting page and also to place the basic Python “requests” lookup (get), as shown in the API instructions at the first sample. I also created a document using a basic “To Do” template and updated some entries.
The API lookup gives me the following answer: No error, no data, see the log below from the response text section:
200
{“items”:,“href”:“https://coda.io/apis/v1beta1/docs?isOwner=true&query=New&limit=100”}
utf-8
Any idea how to fix it. Is any further permission required to do programmatic lookups?
Thanks in advance for your support.
Regards, Claude
Example code:
simple REST AOI
import requests
headers = {‘Authorization’: ‘Bearer x–hidden–x’}
uri = ‘https://coda.io/apis/v1beta1/docs’
params = {
‘isOwner’: True,
‘query’: ‘New’,
}
res = requests.get(uri, headers=headers, params=params).json()
r = requests.get(uri, headers=headers, params=params)
print(r.status_code)
print(r.text)
print(r.encoding)