17
Confidential
REST API
• @client.materialize("Lead")
2012/12/8
***** REQUEST: https://ap1.salesforce.com/services/data/v23.0/sobjects/Lead/describe
***** RESPONSE: Net::HTTPOK -> {"name":"Lead","fields":
[{"length":18,"name":"Id", "type":"id", "defaultValue":null,"label":"Lead ID",...
{"length":0, "name":"IsDeleted","type":"boolean","defaultValue":null,"label":"Deleted",...
• contact = Lead.find_by_Email(‘
[email protected]')
***** REQUEST:
https://ap1.salesforce.com/services/data/v23.0/query?q=SELECT%20Id%2CIsDeleted%2CMasterRecordId%2
....%20FROM%20Lead%20WHERE%20Email%20%3D%20'demo%40splashtop.com'%20LIMIT%201
***** RESPONSE: Net::HTTPOK -> {"totalSize":1,"done":true,"records":
[{"attributes":{"type":"Lead","url":"/services/data/v23.0/sobjects/Lead/00Q9000000Cd0XXXXX"},
"Id":"00Q9000000Cd0BlEAJ","IsDeleted":false,"MasterRecordId":null,"LastName":"SplashtopDemo",...}]}
References – Insight (2/4)