There are three classes in my Parse database. For some reason, fetching data from the second class ContactsData always returns an empty result. Would be great if anyone could provide insights into the problem!
1. The default "Users" class
No problems getting data from this class following examples at https://parse.com/docs/rest#users
ACL column is empty
2. A custom "ContactsData" class. A user is allowed to add name and phone of contacts through our iOS app
Custom columns: name (string), phone (number)
ACL is write: true and read: true.
What I want to do: Fetch all contacts of a given user using python REST API.
METHOD 1:
import json,httplib
import apikeys
import dataset
MY_CLASS = '/1/classes/ContactsData'
connection = httplib.HTTPSConnection('api.parse.com', 443)
connection.connect()
connection.request('GET', MY_CLASS, '', {
"X-Parse-Application-Id": apikeys.PARSE_APP_ID,
"X-Parse-REST-API-Key": apikeys.PARSE_REST_API_KEY,})
parseData = json.loads(connection.getresponse().read())
print parseData
Output:
{'results':[]}
Keep getting this even when there are objects in this class
METHOD 2
Also tried MY_CLASS = '/1/classes/ContactsData/ABCDEFG' where ABCDEFG is the objectId of a particular object.
Output:
{'code': 101, 'error': 'requested resource was not found'}
3. A custom "Testing" class
Exactly the same as MY_CLASS. Just that I did not use ACL, and created the object directly from the Parse dashboard. This time, I was able to get the data using MY_CLASS = '/1/classes/Testing'