title: Parse.com REST API Relation Query
body: <p>If this has already been answered please feel free to direct to a relevant Q&amp;A. The only answer I have found is what I am already trying and I am not getting the result I am hoping for. Also looked over the REST API documentation for Parse and no luck in figuring this out. That being said...</p>
  
  <p>I have two classes in Parse.com: Invites and Events
  Each Invite has a relation to an Event. Ideally I would like to query the Invite but also receive event_name and event_address from the Events object related to the invite.</p>
  
  <p>This is the curl query I have been trying (pulled from the other answer I mentioned and Parse.com docs):</p>
  
  <pre><code>       curl -X GET \
         -H "X-Parse-Application-Id: xxxxx" \
         -H "X-Parse-REST-API-Key: xxxxxx" \
         --data-urlencode 'where={"$relatedTo":{"object":{"__type":"Pointer","className":"Events","objectId":"Yp04m8QT2N"},"key":"event_name"}}' \
         https://api.parse.com/1/classes/Invites/XXQ0191KSv
  </code></pre>
  
  <p>Yp04m8QT2N is the related 'Events' objectId, event_name is in the Events class</p>
  
  <p>I am getting results from the invite class but was expecting event_name to be included in the results. What am I missing? I haven't gotten as far as including multiple columns from events so if you could save me another question it would be much appreciated!</p>
  
  <p>Response:</p>
  
  <pre><code>    {"createdAt":"2014-06-07T20:26:04.877Z","event_objectId":{"__type":"Relation","className":"Events"},"invite_email":"test@test.com","invite_firstname":"Steven","invite_lastname":"Carlton","invite_opendate":{"__type":"Date","iso":"2014-06-08T19:16:00.000Z"},"invite_phone":"1234567890","invite_sentdate":{"__type":"Date","iso":"2014-06-07T20:26:00.000Z"},"objectId":"XXQ0191KSv","updatedAt":"2014-06-08T19:17:17.980Z"}
  </code></pre>
  
  <p>Thanks for your help!</p>