Questions tagged [rest-api]

REpresentational State Transfer (REST), or RESTful, web services provide interoperability between computer systems on the Internet. The Salesforce REST API provides a powerful, convenient, and simple Web services API for interacting with Force.com.

Filter by
Sorted by
Tagged with
1
vote
1answer
447 views

Zend client for Salesforce webservice

I am new to Salesforce and Zend. I succeeded to implement a regular php client, but I am struggling to do the same in Zend framework. Does anyone know how to do it? Code example (especialy its ...
2
votes
2answers
941 views

Problem in Displaying image Using RestApi

Am unable to display image which is there in external site .When am Displaying am getting like this core.filemanager.FileBlobValue@4747ae4b here is my code public class RestImage { public blob ...
8
votes
1answer
928 views

Dynamic Apex Class

I am using Tooling API to create a class. Used the following link as reference to create a class and it works fine. But if i try to make it bit more dynamic by putting Apex Class Name in string and ...
5
votes
1answer
2k views

Getting bash error and no response while using REST API

I write a visualforce page with code <apex:page > <apex:outputText >{!$Api.Session_ID} </apex:outputText> </apex:page> i copied the session Id.and used curl and run the ...
6
votes
1answer
6k views

unsupported grant_type?

When I'm executing a web service on "Advanced REST client (a chrome extension)", I'm getting this error constantly. I do need to get "access_token" { error_description: "grant type not supported" ...
6
votes
1answer
9k views

Test class for REST Api

@HttpPost global static Map <String,String> doPost(String firstName, String lastName, String phone, String email) { Lead lead = new Lead(); Map <String,String> sta = new Map &...
7
votes
2answers
2k views

How do I setup access for a REST resource apex class using session ID

We have a REST resource apex class, and its sole purpose is to eliminate the problem of hitting Salesforce page view limits. The way it is currently setup doesn't seem to be eliminating this issue. ...
1
vote
1answer
41k views

“unsupported_grant_type” error when trying to authenticate

I am using the following code to try to get an authenticate. This is in C#, using the RestSharp library: public string GetAuthToken(string code) { var client = new RestClient("https://login....
1
vote
1answer
831 views

Salesforce Web Service Execution

There is a requirement wherein, I need to have a connection established between Salesforce and AS400. The AS400 developers will be providing us with web services and similarly, I need to provide web ...
2
votes
1answer
432 views

Rest API access a rest resource with authorisation and data transfer in one call

We are integrating salesforce with a third party customer care IVR application. Once the call is connected I need to get data from salesforce to IVR application. As this should be as quick as ...
2
votes
1answer
128 views

REST Downloading a document Response Headers don't have Content-Length

I am using /Document/{id}/Body endpoint to download the file. The returned response headers don't contain a content-length header { which really is a norm, right ? } ... Does anyone know why that ...
10
votes
2answers
359 views

How can updated SObjects/CObject be queried/retrieved without duplicate or missing records?

Another way to ask the question: Are SOQL queries transactional/atomic on the second level? I am writing a data integration with salesforce using the REST API. I want to retrieve a list of updated ...
6
votes
1answer
1k views

Accomplishing 'Long Polling' to monitor events - REST or STREAMING API?

My use case is to be notified of any new documents uploaded to the account - { I could potentially use the StreamingApi but my entire infrastructure is based on REST, while the StreamingApi uses ...
4
votes
1answer
37 views

Sharing 'Document' sobject among different user?

Say, there are two users - A and B. One document - X X is owned by A but shared with B. The REST Access is granted with user B. If X was modified by A, would invoking 'updated' API from B's ...
6
votes
1answer
1k views

How do I upload a 'Document' sobject using the REST API?

Given a folder ID, I wanted to be able to 'upload' an sObject of type 'Document' from within my code to the salesforce instance for the authenticated user. I was going through the api reference, but,...
4
votes
1answer
620 views

REST API Sobject GetUpdated/GetDeleted on sobjects returns The requested resource does not exist

I am trying to use the following - http://www.salesforce.com/us/developer/docs/api_rest/Content/resources_getupdated.htm On 'Document'. Authentication and everything is successful, even calls to '...
4
votes
1answer
2k views

Salesforce REST API example, error: failed with status 400

I am going through this example of REST web service to salesforce from PHP app, and I was getting the same errors described here. I tried to implement more permanent solution with curl_setopt($curl,...
2
votes
3answers
3k views

Chatter feed tracking for new record creation

I want to notify users through chatter Stream when a new record is created on an object So when a new account record is created , a post at chatter will be notified to all or select users. User ...
2
votes
2answers
934 views

Use of rest api in salesforce?

I am new to Salesforce. I want to learn about the rest api. What are its uses? Thanks in advance!
5
votes
3answers
286 views

Ensure Data Integrity Between SFDC and an Mobile Client Device

What are the best practices to ensure SFDC REST API communications are transmitted to and from a mobile device with full integrity? I have a custom iOS app that allows offline editing of Force.com ...
5
votes
1answer
1k views

Client Id blank in “API Calls Made Within Last 7 Days”-Report

we have created a connected app, when running the "API Calls Made Within Last 7 Days" - Report, the report doesn't show the name of our app in the column client id (see picture). What do we need to ...
3
votes
1answer
774 views

Is there a JSON Schema available for the Analytics REST API?

Is there a JSON Schema (or similar) available for the Anaylytics REST API? I'm looking to generate strongly typed code for parsing the JSON responses. Usually I'd go with SOAP and WSDL based code ...
6
votes
1answer
4k views

OAuth API doesn't send refresh token with custom redirect_uri

If I put this link in my web browser (I put them on separate lines for readability): https://login.salesforce.com/services/oauth2/authorize ?response_type=token &client_id=MY_CONSUMER_KEY &...
4
votes
1answer
200 views

Does the Tooling API SymbolTable support custom interfaces?

I have been looking at the tooling api in versions 28.0 and 29.0. I have a couple of example classes that implement custom interfaces and also some that implement standard interfaces (i.e. Database....
0
votes
1answer
88 views

How to throw data at Salesforce and have Salesforce catch it

I am very new to Salesforce, and I need to be able to simply hand something like a CSV, JSON, or XML to a Salesforce I am not a user of. Right now, these are loosely the steps I believe need to be ...
3
votes
1answer
677 views

Is there a way to force the Analytics REST API to return groupings where all the values are zero?

I'm programming an HTML SPA which consumes data from Salesforce. I'm a web developer by trade, and this is my first experience working with the Salesforce API. Another company are doing the report ...
3
votes
1answer
291 views

Obtaining of the username over REST API with one step

I want to get user name from SF over REST API. Is it possible to do with only one step when I have access token. As I saw from documentation and samples I have first to call something like this ...
3
votes
1answer
3k views

INSERTING MULTIPLE RECORDS USING SALESFORCE REST API [duplicate]

i need to insert multiple records from one org to another org using rest API(bulk) am unable to insert multiple records ..as of now am able to insert single record successfully.can you please tell how ...
3
votes
1answer
132 views

Threading emails onto a lead

I'm working on a project that takes care of sending emails to customers who sign up with us. The project automatically creates a new Lead for every customer that signs up, but we next want to store a ...
3
votes
3answers
11k views

How to add Contacts in Salesforce via REST API

I want to add contacts in my salesforce account via REST api, I already found some code to access the REST API but i dont know how I will integrate it to my account since when i tried the sample codes ...
4
votes
1answer
3k views

How to use google rest console with salesforce rest API

Hi I wanted to test my rest webservice from Google Rest API Console earlied I did this by copy pasting session from VF page in same browser. I feel this should be directly possible can anybody ...
6
votes
1answer
428 views

Create Unresolved Tasks/Contacts/etc through the REST API?

Is this possible? I have found a few results googling this, but only of people asking the question, never answering it.
2
votes
1answer
273 views

problem returning results from several SFRestRequest at the same time

I am currently trying to execute a few SOQL queries using the SFRestRequest method and have the results stored in NSArrays. Below is my code, but the problem I run into is that the methods inside ...
4
votes
2answers
7k views

Creating a custom object using REST API

Hi i have a small requirement ,i need to create a custom object in from one salesforce org to another salesforce org using rest API ,how can i achieve this using REST API .
8
votes
3answers
3k views

Custom REST Service HTTPS error

I am building an apex REST service to be hosted on a public site using the approach outlined here (basically hosting a REST service on a site allows you to perform actions against it without ...
6
votes
1answer
1k views

Update Record via @RestResource class, return related SObject

I'm trying to create a REST API class that will allow the following: POST Object ID Update(ObjId); ('Touching' the record, fires triggers on Salesforce) Find SObjects on a custom object that have ...
5
votes
1answer
798 views

Rich text Area Image ajax fetch as blob

I am trying to access and image stored as rich text area in my product records. I am getting an anchor tag and after removing the escape sequences I am able to test the image URL in browser, and it ...
0
votes
1answer
2k views

using REST api to get data from server

I am still facing the problem of getting the data from the server using the salesforce's REST api. My question is: If I have an URL to the JSON data is it possible to get the data using some specific ...
2
votes
0answers
122 views

using the SFRestAPI singleton is there a way to request the results of a report?

Is there an easy way to request the results of a report yet through the RestAPI using the Salesforce Mobile SDK for iOS? (something similar to below?) SFRestRequest *request = [[SFRestAPI ...
4
votes
1answer
969 views

Any way to determine HTTP verb (GET, POST, PUT, DELETE) in Apex controller?

I need to create a REST (or REST-like) API for my SF application. After reading https://salesforce.stackexchange.com/a/19058/3382, my thought was to simply use the @RestResource annotated classes ...
1
vote
1answer
1k views

How to update a single record in VF page using REST API?

How to update a single record in VF page using REST API on click of a button? The requirement is to update an account status on click of a button. I dont want to use apex controller . Want to do it ...
1
vote
0answers
234 views

How to select dynamically linked items from Pricing Matrix via PHP REST API [closed]

I've been given the task of writing a new SalesForce application for our company. It's to be a sort of front-end for some clients. One of the functions is to allow these clients to build a product ...
8
votes
1answer
2k views

How to properly allow non-user/client login for external apps with the REST API?

So, I've been given the task of writing a web application for constructing and submitting quotes for my company. First off, I'm brand new to SalesForce, and I'm understanding it better and better ...
5
votes
1answer
212 views

Expose features of portal application via api?

We have built a complex application and expose it using the high volume portal licenses. The users of this app have restricted access to our salesforce data, this is controlled by the application. We ...
3
votes
2answers
812 views

Need to enforce data integrity using REST API

We are consuming a REST API which created an insert on Lead object. We want to enforce data integrity from the external application to salesforce so that any field level changes on the external ...
4
votes
1answer
453 views

Salesforce Integration with External Scheduler

I'm currently working with a customer that is interested in launching Salesforce Batch jobs from an external scheduler. I was thinking about the following - Create a global interface global ...
2
votes
1answer
598 views

OAuth Possible for Chatter Communities?

Can customer community or partner community users use OAuth to authenticate and then interact with Salesforce data through the REST API?
7
votes
1answer
11k views

Using Java and Spring to integrate with Salesforce REST APIs

I want to send information from our webapp (using Java and Spring) to the Salesforce REST APIs. I'm looking for an up-to-date example of how to use Spring Security to authenticate with OAuth to the ...
2
votes
2answers
245 views

Can I display Salesforce report data in a graph in my Viewcontroller?

I am building a native iOS app using the Salesforce SDK, I want to be able to show reports as graphs, but there doesn't seems to be any resources on this. Is it possible to retrieve a summary report ...
5
votes
1answer
2k views

HttpRequest with Authentication Cookie

I am working on a project that will send an httpRequest to an external server. When connecting to the REST API, the application must first authenticate. Once authenticated, and cookie is sent, the ...