I am retrieving a list of entries in the Request table with the requestId equal to 1. At the moment, there is only one entry with that value. Then I am converting the results to a string then grabbing the objectId.
However, I get the error "KeyError: ‘objectId’
new_requests = Popen(['curl',
'-H', 'application-id: %s' % backendless_appid,
'-H', 'secret-key: %s' % backendless_sk,
'-H', 'Content-Type: application/json',
'-X', 'GET',
'-v', 'https://api.backendless.com/v1/data/Request?where=requestId%3D1'],
stdout=PIPE).communicate()[0]
new_requests_str = new_requests.decode(encoding='utf-8')
new_requests_objectid = json.loads(new_requests_str, strict=False)['objectId']
Printing new_requests_str returns nothing, but I don’t understand why.