I'm looking for examples of how to query the salesforce rest api, to get the values from these reports.
Reading this site, gives an example, but not much explanation.
curl https://na1.salesforce.com/services/data/v20.0/sobjects/Account/ -H "Authorization: Bearer token"
I'm looking for links, resources, or examples of how to query a report.
Update
My end goal is to receive json looking something like this:
{
"reports" {
"newTicketsThisWeek" : 36
"newTickes120days": 912
}
}
Update
I have managed to get basic information from the REST api. I am still looking for how to query a report.
curl -H 'Authorization: Bearer <my sid from session cookie>' -H "X-PrettyPrint:1" https://foo.my.salesforce.com/services/data/v28.0/
{
"sobjects" : "/services/data/v28.0/sobjects",
"licensing" : "/services/data/v28.0/licensing",
"identity" : "https://login.salesforce.com/id/00DE0000000K0eMMAS/005E00000018QfBIAU",
"connect" : "/services/data/v28.0/connect",
"search" : "/services/data/v28.0/search",
"quickActions" : "/services/data/v28.0/quickActions",
"query" : "/services/data/v28.0/query",
"knowledgeManagement" : "/services/data/v28.0/knowledgeManagement",
"tooling" : "/services/data/v28.0/tooling",
"chatter" : "/services/data/v28.0/chatter",
"recent" : "/services/data/v28.0/recent"
}
Update
I have found the report in the API, however it does not appear to have any queriable data
salesforcekey = foo
curl -H "Authorization: Bearer $salesforcekey" -H "X-PrettyPrint:1" https://acme.my.salesforce.com/services/data/v28.0/sobjects/report/bar
{
"attributes" : {
"type" : "Report",
"url" : "/services/data/v28.0/sobjects/Report/00OE000000qqqqqqq"
},
"Id" : "00OE000000xxxxxx",
"OwnerId" : "00lE0000000yyyyyyyy",
"CreatedDate" : "2012-06-26T16:48:20.000+0000",
"CreatedById" : "005E0000000zzzzzz",
"LastModifiedDate" : "2012-06-26T21:27:29.000+0000",
"LastModifiedById" : "005E0000000zzzzzzz",
"IsDeleted" : false,
"Name" : "WW Support - Weekly Tickets",
"Description" : null,
"DeveloperName" : "WW_Support_Weekly_Tickets",
"NamespacePrefix" : null,
"LastRunDate" : "2013-08-12T17:52:14.000+0000",
"SystemModstamp" : "2013-08-12T17:52:14.000+0000",
"LastViewedDate" : "2013-08-12T17:58:08.000+0000",
"LastReferencedDate" : "2013-08-12T17:58:08.000+0000"
}
I have also found out about https://apigee.com/ an excellent website for viewing REST api's
http://wiki.developerforce.com/page/REST_API
http://blogs.developerforce.com/tech-pubs/2011/10/salesforce-apis-what-they-are-when-to-use-them.html
http://wiki.developerforce.com/page/Integration
The end product is to create physical sensors that change depending on the result of these reports.
http://reidcarlberg.com/2014/02/21/philips-hue-raspberry-pi-node-js-salesforce-and-you/