The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [rest]

The REST API provides a powerful, convenient, and simple Web services API for interacting with Force.com.

Filter by
Sorted by
Tagged with
0
votes
0answers
397 views

Unexpected parameter encountered during deserialization

I am trying to write a REST service which will send SF objects between Orgs. Right now, as a test, I am sending data to the same Org that it is coming from. I wrote a GET request which worked so I ...
0
votes
1answer
687 views

Making REST API calls from Salesforce to Marketo

I am new to both making API calls and coding in Apex and feel way over my head. How can I make a call to the Marketo REST API through Salesforce? Is this possible through Apex? For example, ...
0
votes
1answer
326 views

Apex Callouts retrieve audio content

I am making a callout to a 3rd party to retrieve an mp3 file The endpoint is a HTTP GET (https://api.ubity.com/recording?key=HV5nPTLk98UPeTLxqwA8&callid=ABC12345) The response is the actual MP3 ...
0
votes
1answer
85 views

How do i get end point url?

I have to connect two different sales force org am getting error for 400 and 302 and bad request. Where do I get refresh token, Please can you give suggestion what correction should I do? httprequest ...
0
votes
0answers
66 views

How to read the content in RestRequest

I am passing a xml request and trying to read the req.requestBody but getting the value as Blob[2122]. How can I read the value which I have send for request in httppost. Please guide me.
0
votes
1answer
665 views

Cannot access url https://login.salesforce.com/services/oauth2/token

My customer's webmaster uses REST API to create Leads in salesforce, from his website. Since yesterday he is getting a connection error. The password has not changed. I tried to make a call from a ...
0
votes
1answer
1k views

how to retrieve specific fields for Object using REST api?

I know describe gives me a list of all the fields available for the specific Object.What if i want to retrieve a subset of the available fields.And I want to do this via REST api? The reason being is,...
0
votes
2answers
5k views

How to use C# to access Apex REST Service

I want to use C# to access my own apex rest service in a managed package. I can easily do it in IOS and Android. But in C# I wrote code below, it can not work. string restQuery = App._instanceUrl + @"...
0
votes
1answer
147 views

Cannot retrieve mobile delivery status via REST API call - Exact Target

Basically after sending to a list of mobile contacts, I wish to retrieve tracking events via API calls, currently I am unable to access delivery status for outbound mobile events. When I manually ...
0
votes
0answers
274 views

“Peer not Authenticated” Error?

I have created a custom Rest Service in SFDC . There is a external java program who is calling this service getting the error "Peer not Authenthicated". However, it work fine when make a call to ...
0
votes
1answer
150 views

Custom Rest Service with OAuth 2.0 and Connected Apps

Is there any example/sample code of Custom Rest web service in Apex with OAuth 2.0 and Connected Apps? Also wanted to know how to expose the object based on the selective parameters. If parameters ...
0
votes
0answers
63 views

Consumer key and secret not working

I am using the following tool: Advanced Rest Client, installed from google extensions to make a simple test - request to our sf instance. I have created a connected app in our sf instance, and ...
0
votes
0answers
140 views

How to name number property for JSONGenerator

In the PayPal REST API, there is a credit_card object which has a property called number. Unfortunately, "number" is a reserved keyword in Apex, which means that I can't simply name my property number ...
0
votes
1answer
232 views

REST API call from Salesforce1

I'm trying to make an API call from my Salesforce1 App. I've created a global action and now I would like that action to call my API. I'm not expecting copy-paste solution but it would be nice if ...
0
votes
1answer
35 views

Using Salesforce oauth to make calls to own account/app

We use salesforce in our website. I'm new to it, and still can't find a way to calls REST api to our own account without going long way of visiting oauth login page, granting access etc(oauth flow). ...
0
votes
2answers
87 views

Marketing Cloud API CORS problem

I would highly appreciate if anyone could help me in handling CORS policy for Salesforce Marketing Cloud API requests… The situation is following: I need to make direct API calls to Marketing Cloud ...
0
votes
1answer
707 views

Expired authorization code

I'm trying to use the REST API with OAuth2 in PHP. The problem is that I followed this tutorial : http://developer.force.com/cookbook/recipe/interact-with-the-forcecom-rest-api-from-php And when I try ...
-1
votes
2answers
25 views

Deserialize JSON Response from Rest Query, ERROR: System.JSONException: Malformed JSON: Expected '[' at the beginning of List/Set

Trying to convert some JSON to an Account List, I suspect my error is because the query next stuff coming into the response. How can I convert these results to an account list? HttpRequest ...
-1
votes
1answer
1k views

how to write a Dynamic SOQL query using condition operator '?' [closed]

client requesting data with some parameters like startdate, enddate, status. based on those parameters i have to return results in httpGet method. 1.if status!=null it will add status =:object.status ...
-1
votes
2answers
89 views

In If condition getting error and not going to Else condition

I have below code where i am chechking if recordtype is not 0 and if its blank then go to else and throw an error.but if recordtype is coming null then its trwoing Attempt to de-reference a null ...
-1
votes
2answers
646 views

How To Redirect Url Restapi to salesforce

I am creating a rest Service and its integrated with external system and sending data to external system through lightning component and its working fine while sending the data from Salesforce. while ...
-1
votes
1answer
52 views

Re-trigger rest call if i get read time out error using apex [closed]

How to re-trigger rest call if i get read time out error using apex. Any blog or link would be fine for me or any example also
-1
votes
1answer
104 views

values are not receiving dynamically in REST API

I wrote the batch and pass the values to REST apex class but when executing the endpoint url it doesn't take the values of fields it only takes names. this is my batch job global class ...
-1
votes
2answers
798 views

How do I delete a Data Extension using the Rest API

I can create rows but I cannot delete them. How do I do this using the Rest API?
-1
votes
2answers
89 views

How to find all Salesforce records with a specific WhoId?

I have a Lead or Contact. I want to find all of the Accounts and Opportunities for that specific Lead or Contact. Is that possible? What would the query look like?
-1
votes
1answer
50 views

How can I use OAUTH on Salesforce Live Agent REST API

We want to use OAUTH - userid/password flow to access salesforce live agent rest API. We have implemented this for other rest api provided by salesforce. However the live agent rest api are wide open ...
-1
votes
1answer
3k views

QUERY in REST URI in Workbench?

I have been trying to query the Lookup object field in workbench Rest Explorer. Please help me on how to query the Lookup Object Field. /services/data/v20.0/query?q=SELECT Data_Source__c,Name,...
-2
votes
1answer
412 views

Upload Salesforce user profile photo via rest

I am entirely new at this. I want to know if it is possible to upload the user record profile picture via rest. I found that the photo url is exposed via the following /services/data/v41.0/connect/...
-2
votes
1answer
2k views

Calling REST Web Service Using OAuth 2.0 from Apex [closed]

Any good examples of calling a rest web service using OAuth 2.0 from Apex?
-2
votes
1answer
262 views

Problem in converting null or empty string to decimal

I've implemented a REST HTTP method for lead creation. There is a Number field XYZ(16,2) field. When I tried to insert with a null value it is giving an error like invalid decimal. Please help me. ...
-2
votes
1answer
108 views

External website doesn't login ondemand through iframes?

public class CreateEvent{ public Test__c login; public CreateEvent(ApexPages.StandardSetController controller){ this.login= (Test__c)controller.getRecord(); ...
-2
votes
1answer
99 views

Alternate ways to Salesforce Integration than custom REST/SOAP development [closed]

Are there any alternate ways or tools available to integrate Salesforce with other systems (in house + other cloud applications like Facebook) apart from writing our own REST/SOAP API callouts ?
-2
votes
0answers
22 views

Salesforce and Webhooks: REST integration with another serviece

I want to get real-time updates with the Salesforce/another serviece integration through webhooks. When something is updated on the serviece, I have to get it on Salesforce. Without Callouts. What am ...
-2
votes
1answer
33 views

how to write a test class for web service HttpPost

I'm new to development here I'm developing a webservice in rest and I have no idea about how to write a test class for that. Please find the below code of apex class: @RestResource(urlMapping='/...
-2
votes
1answer
95 views

Not able to call Salesforce REST web service from Java web application as Salesforce has disabled SSL 3.0 encryption

What needs to be done/changed from the java application side to access Salesforce orgs?
-3
votes
1answer
37 views

Sending status code with response using apex [closed]

I am working on a rest API using http post to get the params and create a record. After creating the record I need to send a response with the details of created record along with a status code and ...
-4
votes
1answer
33 views

Callout Unit Test Need help in getting code coverage its getting to 46%

I have written a Callout Class Called RestCallout which makes Callout to an end point, get the httpResponse as xml and from the body of response gets different elements and updates the database. For ...
-4
votes
2answers
54 views

How can I get value in doPost?

@RestResource(urlMapping='/MilestoneRESTHandler/*') global with sharing class KLMilestoneRestResource { @HttpPost global static ResponseWrapper doPost() { string jsonStr; ...