Questions tagged [restresource]
The restresource tag has no usage guidance.
20
questions with no upvoted or accepted answers
4
votes
1
answer
543
views
API login after MFA enforcement
With the enforcement of MFA coming next year, I've started to test an API I wrote for a client that allows their website to talk to Salesforce. It's working fine right now, but if I enable High ...
2
votes
0
answers
150
views
Is there a way to specify an API version of a call to @RestResource?
I would like to specify an API version when I call a @RestResource via an API. Is that possible?
Why
For some reason, our Spring '19 sandbox is having a weird issue, and I'd like to fix this before ...
2
votes
0
answers
2k
views
RestResource urlMapping routing is conflicting with a similar URL
So we have a number of mapped urls, and up until recently they were working fine. We recently noticed that our requests are inconsistently being routed to the wrong APIs.
Example:
@restResource(...
2
votes
1
answer
401
views
RestRequest in RestResource is returning null
I am having a problem reading JSON content using a RestResource. I am always getting a null value. My goal is to create a webhook to receive JSON content. Here is what I did.
Created a Visualforce ...
1
vote
0
answers
126
views
End point receipting of touchnet credit card transaction requiring IPs for guest user site for firewall rule
I'm in a real pickle! I have a missing critical, overdue deadline to use a TouchNet Upay site to receive deposits via credit card. Desperate help is needed.
My code currently posts out to touchnet ...
1
vote
0
answers
181
views
REST resource Unicode characters not working (form data)
I'm currently developing a Rest Resource that will be able to handle post method into Salesforce.
The request that I get is in form-data(!!!).
It contains Hebrew characters translated into Unicode
(i....
1
vote
1
answer
337
views
Usage of Connected App in terms of exposing a RestResource API for consumption?
I know I have done it before, but I am lost this time around. Previously, I have created Connected Apps for implementation of Oauth 2.0 authentication process with Salesforce. But, this environment is ...
1
vote
0
answers
506
views
calling RestResource with a list of SObjects
I have a simple rest resource that takes in a list of Contract objects and just prints out some information about them.
@RestResource(urlMapping='/contracttest/*')
global with sharing class ...
0
votes
0
answers
24
views
Not able to hit restresource URL from LWR community site
Issue: From my LWR community I am not getting the output from the restresource URL
I created one rest resource like as below code.
PS: I commented all my original logic and just trying with some test ...
0
votes
0
answers
175
views
Test.startTest and Test.stopTest affecting RestContext
I have a very weird issue related to an Apex RestResource that I can't seem to wrap my head around.
I have an Apex class defined as a RestResource and am trying to test the functionality. In one ...
0
votes
0
answers
3k
views
Parse blob in apex
We have a @RestResource apex class using which we are receiving the JSON data from application which resides outside of salesforce through REST API. We parse this data to get the jobId from it and ...
0
votes
0
answers
72
views
"You have uncommited work pending" when there's no obvious DML?
I have a RestResource which is running some callouts, as well as running some DML (after the callouts).
I'm recieving this error: You have uncommited work pending. Please commit or rollback before ...
0
votes
1
answer
120
views
Is that we can send the multipart/form-data till 2GB by using rest api in apex
Is that multipart message is available in RestAPI in Apex 2021 to send the large files(till 2GB) from source org to target org??
0
votes
1
answer
1k
views
We added the header Access-Control-Allow-Credentials to true
We load JS code by creating a script tag with dynamic src endpoint and append the script element into the page our src will call resource apex class (@RestResource)
I know that Community domain is ...
0
votes
0
answers
73
views
Is there Salesforce documentation on RestResource Object?
I'm following a design pattern set by one of our devs.
RestResource.RequestBody requestBody = RestResource.getRequestBody();
I'm trying to find documentation on this object, but I can't seem to ...
0
votes
0
answers
500
views
How to access the REST API with the user with Permission 'Is Single Sign-On Enabled' is enabled
I have created one RestResourc to give the ability to the external system to attach the Report to Asset in Salesforce. Now the problem I am facing is the user which I am using for Authentication ...
0
votes
1
answer
593
views
CRUD FLS issue to edit task access for site guest user
I am applying CRUD FLS on task object fields and also I have provided read and edit access to task for site user profile. Even checked with sharing settings as 'Controlled by parent'.
But still when ...
0
votes
1
answer
34
views
Why POST is routed to GET?
I have rest controller with GET, DELETE and POST. GET and DELETE work ok.
@RestResource(urlMapping='/test123')
global class TestRest {
@HttpGet
global static String getOperation(){
...
-1
votes
3
answers
56
views
Unexpected parameter encountered during deserialization: Name
Unexpected parameter encountered during deserialization: Name
@RestResource(urlMapping='/Account/*')
global with sharing class MyRestResource {
@HttpDelete
global static void doDelete() {
...
-1
votes
1
answer
290
views
Can I add suffix in urlMapping for HttpPost in RestResource
I'm having an apex class like this:
@RestResource(urlMapping='/api/v1')
global without sharing class MyRestService {
@HttpGet
global static List<sObject> getDataById() {...}
@HttpPost
global ...