I studied REST API for the first time to use some data from Kintone at the internship. On top of that, I've summarized only the Kintone-specific writing styles.
Basically, the Kintone documentation only contains JavaScript snippets, so I didn't know how much the REST API specifications were and where the Kintone REST API specifications were, so I picked up only the Kintone REST API specifications. It's a feeling.
I wrote a part of the following URL like python. https://developer.cybozu.io/hc/ja/articles/201941754
Header when using API token
headers = {"X-Cybozu-API-Token": api_token}
Header when authenticating with ID and password
import base64
str_ = str(id_) +':' + str(password)#'id:password'
encoded = base64.b64encode(str_.encode('utf-8'))
header = {
"X-Cybozu-Authorization":encoded
}
How to write a URL when writing a query when taking a record and getting all at once Reference URL https://developer.cybozu.io/hc/ja/articles/202331474
import urllib
url = 'https://{Domain name}.cybozu.com/k/v1/records.json?app={}&query={}'.format('App number',urllib.parse.quote('Fill in the query'))
Recommended Posts