Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [rest]

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

3
votes
1answer
1k views

Username-Password OAuth Authentication for community users?

I have a native ios app and i want to login using the username password flow, From the POC i made i discovered that for community user, i dont get a security token which i was using while REST call to ...
15
votes
3answers
7k views

Duplicate Matching Rules via rest API

So we are experimenting with the new duplicate matching rules in salesforce which seems to work great. My question is if its possible to use the more advanced features when working with data over the ...
2
votes
1answer
448 views

Error doing callout to a site with GoDaddy certificate

When we try to send some data to an external web service (REST, POST, JSON), we get the next error: System.CalloutException: sun.security.validator.ValidatorException: PKIX path building failed: ...
7
votes
1answer
3k views

What is the longest URI that Salesforce will accept through the REST API?

The Background I was handed a task to populate a developer sandbox with a limited set of data from our production org to allow another dev team to be able to test integration with a third party (with ...
3
votes
1answer
617 views

Custom Auth Provider usage for unattended OAuth flow

I am attempting to make a REST callout to an API in our company that uses ApiGee as the OAuth2 provider using a simple client credentials grant type. Open-ID is not enabled and will likely not be an ...
4
votes
1answer
3k views

Salesforce REST API authentication?

I feel like this should be really easy to do, but I can't find anything about it on the web. Is there a way, through either javascript or a java web servlet, to skip the subsequent authentication? We ...
1
vote
2answers
2k views

ErrorCode 180008 - Unable to queue Triggered Send request. There are no valid subscribers

I'm trying to send an email by ET rest api in Java. I already successfully sent a SMS and got a token in response, but an error is triggered with emails. Here is the JSON I send : { "To": {"...
5
votes
1answer
901 views

RemoteAction Vs REST? Which is faster?

I need to get the results really fast on my page. I have to decide between 2 approach. Build a HTTP get service, by using a VisualForce page as Service. Using contentType as 'application/JSON'. Use ...
3
votes
1answer
2k views

Sending a PDF from Salesforce through a REST call

How do I send a pdf through REST call out of Salesforce? Should we use sites? Any idea?
3
votes
1answer
1k views

Authorization header missing from RestRequest headers map

I have a publicly exposed web service (Rest Apex) through Sites and I'd like to do basic authentication which I will manage myself. I noticed that when I specify Authorization: Basic ...
1
vote
1answer
164 views

Calling ToolingAPI to save an AuraDefinition using PATCH via JavaScript possible?

I'm trying to save an AuraDefinition from within a native Visualforce app. Therefore I following @MartyC. suggestion here: Lightning ToolingAPI BETA Documentation As an unfortunate PATCH requests ...
0
votes
1answer
855 views

Event Log Monitoring from salesforce API

Below is my requirement: I have to track the event(eg: URI event) from event log file without manually using workbench or REST explorer. It means I have to write a code where it queries the URI event ...
2
votes
1answer
7k views

Upload files to a Case in SalesForce via REST API

I'm working on uploading attachments from my website to Salesforce, attachments should be related to case object. I'm using REST API in PHP. So problem is that I get an error when I tried to upload ...
4
votes
2answers
7k views

What is the maximum number of records I can send per RESTful API call?

There is a maximum batch size for the number of records returned by an API call. Most of the documentation for the API calls reference including a .json file, and some, like the Update a Record page,...
2
votes
1answer
12k views

Rest API (POST method) with Jquery

So I am using Jquery Ajax with rest API trying to create Account Record using POST method but getting error <apex:page> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/...
2
votes
1answer
5k views

400 Bad Request in Response

I have been using working on an Applicaion in angularjs, and While getting response of 2nd request for the token, I am getting following an error. Illegal Request You have sent us an Illegal URL or ...
5
votes
2answers
4k views

How to retrieve just the text without formatting from a rich text field using JSON?

I am querying a rich text field that contains text information using a public rest service using this method http://blogs.developerforce.com/developer-relations/2012/02/quick-tip-public-restful-web-...
3
votes
1answer
697 views

Rest API says email is queued but never shows up in web frontend or sends email

I'm using the REST API to send emails and currently have five test emails. Two of these never go to a 'Queued' status in the Triggered Send definitions after hitting the API, despite getting a 202 ...
3
votes
2answers
820 views

How to publish/consume bulkified Platform Events

Use case: External system wants to publish Platform Events to Salesforce. Salesforce wants to consume the Platform Events in a bulkified manner The Platform Events doc offers this REST call: /...
1
vote
1answer
848 views

Accessing Apex rest class with OAuth 2.0 with Named Credential authentication mechanism

I have been trying to implement Oauth 2.0 in my org and my requirement is to use Named credentials only when making a apex callout. I am using Named credentials, Oauth, Connected Apps and auth. ...
0
votes
1answer
2k views

ExactTarget - Is it possible to send template email to list of users

I am trying to build a simple email application using Javascript to go against either the ExactTarget SOAP or REST API. Our goal is to use only Exact Target to build email templates and then send ...
6
votes
3answers
11k views

Server-Side REST Authentication

We are trying to interface with our SalesForce instance via HTTP. The idea would be to call some of our custom classes from outside salesforce but without any user interaction. Typical scenario is ...
4
votes
1answer
3k views

Call Restful SFDC service from Java

I'm still working on getting the authentication working but having issues. I have been getting a 401 unauthorized error. All of the items I have hidden I am sure are correct values UNLESSS I need to ...
4
votes
1answer
1k views

Exposing same apex method via SOAP and REST API?

Is it possible to expose a single method in salesforce and make it available via soap and rest? I am looking at the docs and seems like you can't. For example on this page: https://developer....
4
votes
1answer
146 views

Workaround for TLS

We are using a number of integration operations with different systems and some of those systems are not going to be updated to the TLS 1.1 cryptographic protocols or higher anytime soon. This systems ...
4
votes
1answer
437 views

Securing a REST API

Once the Connected App is created, how is access granted to various endpoints exposed as REST Services via Apex REST? For example, if we have a Class called CreateCustomer, and it is decorated like ...
3
votes
2answers
564 views

Which Salesforce web APIs are available to Group Edition?

I've been writing a REST API-based service and testing on a Developer Edition org user and it's been working fine, but it stops working for a Salesforce user with a Group Edition org. I get this error:...
3
votes
1answer
689 views

How to limit an access to specific REST endpoint?

Let's assume I have an REST ednpoint created: @RestResource(urlMapping='/CUSTOM_DATA/*') global with sharing class MY_CUSTOM_DATA Now I am going to create Connected App with Full Access scope, I ...
2
votes
1answer
680 views

How do I prepare Salesforce to accept HTTP request from an external system?

A text messaging system we're integrating with includes a feature that sends an HTTP request to a URL with message receipt data but I'm not sure how to prepare our Salesforce to deal with it in the ...
2
votes
1answer
2k views

Debug Log not working with RESTResource

I have the following class: @RestResource(urlMapping='/myservice') global with sharing class MyService { @HttpPost global static String newMessage() { RestRequest req = RestContext....
2
votes
1answer
918 views

How to get the server timestamp through SOQL query or REST API?

This question was asked before, but the answer given was how to do it with Apex, and I am not using Apex: How to get the current timestamp using SOQL query? How do I do the equivalent of ...
2
votes
1answer
3k views

System.JSONException: Unexpected character ('}' (code 125))

I am passing the below JSON structure using POST method to a apex service: I get an error at line where the codes variable ends { "PId" : "345", "Description" : "test", "Codes" :[ { "Code" : ...
2
votes
1answer
202 views

Trying to get methods references using REST version of the Tooling API

I am trying to get methods references and external references using REST version of the Tooling API, but they all = null: /services/data/v36.0/tooling/query/q=Select+Id,Name,SymbolTable+From+...
1
vote
1answer
74 views

REST Request - AWS Access Key ID and AWS Secret Access Key [closed]

I am reading this document Authenticating Rest Requests The first paragraph says .. Every non-anonymous request to S3 must contain authentication information to establish the identity of the ...
1
vote
1answer
465 views

How to use HttpGet service to get a list of objects and create them?

I have a callout method which helps to get an list of objects from another salesforce-organisation. But how can I convert this list into objects on callout's organisation side? And how can I do this ...
1
vote
1answer
3k views

Solving issues of System.HttpResponse[Status=Method Not Allowed, StatusCode=405]

I am trying to use REST in posting/inserting List of Account records from an origin org (OrgA) into a target org (OrgB). I have this error of "[45]|DEBUG|RESPONSE_BODY : System.HttpResponse[Status=...
1
vote
1answer
121 views

Get Org URL Via Web Service

I've created a REST web service on Salesforce and exposed it as a public service (Using Sites). Now I am consuming this service from an external web site. I need to get the Salesforce base URL inside ...
1
vote
2answers
206 views

How to identify what type of request is coming

I have a class with @restresource. To which a request is coming to insert the record. How can we identify what kind of request is coming in. Is it XML or JSON format. Is there any way to identify ...
1
vote
1answer
2k views

Creation of a Public API

In my company's existing CRM system we have a lot of public APIs that are accessible to everyone in the web (kinda like Flickr APIs). We are planning to shift our CRM into Salesforce in the near ...
1
vote
4answers
431 views

How to update a record in a trigger with value from a REST API?

When an account is saved I need to update it with value from a REST API. I though my approach would work but I'm getting the following compilation errors. Method does not exist or incorrect signature:...
0
votes
1answer
272 views

is that possible to pass(POST) below JSON to REST endpoint?

I saw that we can't pass the Map<String,List<String>> to REST post method. So I decided to go with the json as like below. Will REST allow to post this similar json to REST? { 'Emp01' ...
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
179 views

How to save my website form in to salesforce custom object as record? ---Need Help

I have a form in my website(Example : Application for applying the Job).when the user fill the form in our website and submits.A record should be created in the custom object.
0
votes
0answers
272 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
0answers
284 views

Convert ContentVersion blob to bytestream for OneDrive Upload (MS Graph API)

I'm attempting to upload a file (VersionData from ContentVersion) to OneDrive using the Graph API Resumable Upload Method: https://dev.onedrive.com/items/upload_large_files.htm I'm able to create ...