Skip to main content

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
1 vote
0 answers
26 views

How can I identify which connections or connected apps are using legacy API versions?

I have received an alert from Salesforce stating I'm using a legacy version of REST / SOAP in my org. Is there I can identify which app / service is using an older version? I have tried following the ...
Deployment Failure's user avatar
0 votes
0 answers
26 views

REST API - Limit Exception converting string to Blob [duplicate]

Based on my understanding, any inbound call to Custom REST service built in Salesforce gets heap size of 12 MB as it is considered asynchronous. Currently, I have below code which when consumers call ...
sf_user's user avatar
  • 2,260
1 vote
1 answer
76 views

Error using simpleEmail REST API: UNKNOWN_EXCEPTION with error ID

Context Hello, I'm encountering an issue when attempting to use the simpleEmail function via the REST API in Salesforce. The error message returned is as follows: [ { "actionName": &...
Nuraly's user avatar
  • 21
2 votes
1 answer
33 views

Why do we need Connected App ClientId and ClientSecret to get token for Username And Password flow, but those are not required for SOAP login?

Why do we need Connected App ClientId and ClientSecret to get token for Username And Password flow, but those are not required for SOAP login? Which are the uses cases to use the first over the second ...
Gabriel Serrano Salas's user avatar
0 votes
1 answer
28 views

How to get only the value of two fields from a report of my Salesforce ORG via GET

on the following GET I want to take only the values of Case_number__c and Status: https://abc.sandbox.my.salesforce.com/services/data/v44.0/analytics/reports/00O2C000000eX7KUAU How can I do It, and ...
André Rödel's user avatar
0 votes
1 answer
90 views

"message": "JSON request body must be an object at [line:1, column:2]","errorCode": "JSON_PARSER_ERROR"

I attempted to send an HTTP request and transmit a JSON to the Salesforce REST API in the following manner, but encountered the following error: Error: [ { "message": "JSON request body ...
yukichia's user avatar
0 votes
0 answers
92 views

Create & Send EmailMessage through REST API

I am using the REST API to create an EmailMessage related to a Case. My goal is for this Email to be sent to the customer as if it was sent by a rep directly from the Salesforce UI, with all of the ...
Morgan Marchese's user avatar
0 votes
1 answer
183 views

Unexpected character ('�' (code 65533 / 0xfffd)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')

I am making a POST call and receiving a 200, but getting the below error when I try to parse the response. The call works in Postman and I can read the JSON response. I am guessing its related to the ...
Cincopation's user avatar
-3 votes
1 answer
67 views

What exactly is the use of all the annotations in apex rest class [closed]

Apologies if this sounds too noob but am trying to understand what exactly is the used of all the annotations like @HttpGet,@HttpPost,@HttpDelete,@HttpPut and @HttpPatch in apex rest class. The ...
Aniket Srivastava's user avatar
0 votes
0 answers
52 views

Zentitle and Salesforce

Has anyone used REST with Zentitle? I'm having a problem authenticating. They give some examples in Java, but apparently I'm failing with converting them to Apex... This is the example code I'm ...
Florida Hippy's user avatar
2 votes
1 answer
556 views

404 URL No Longer Exists with REST API Call

When submitting a GET request with either Postman or boomi, I receive the following 404 error. ‘You have attempted to reach a URL that no longer exists on salesforce.com’ In either tool, I can get the ...
cmims's user avatar
  • 23
0 votes
0 answers
120 views

Sforce-Auto-Assign header not having any apparent effect on assignment

I can't get the Sforce-Auto-Assign header to kick in when I'm creating a new Case: resp = self.session.post(f'https://domain.my.salesforce.com/services/data/v60.0/sobjects/Case/', json=data, ...
user145214's user avatar
0 votes
1 answer
31 views

Inbound and Outbound calls question

Can we make an outbound REST SYNC call when receiving an inbound REST call? External system 1 calls Salesforce Salesforce calls External System 2 Salesforce returns to external system 1 the answer of ...
stackusiastic's user avatar
0 votes
1 answer
100 views

How to load (image) file using REST API using Acces Token in authorization Bearer?

Using an access token I can successfully receive Query responses. Now I would like to load an (image) file URL using the same method, but it returns a 302 redirect with JavaScript code to redirect (I ...
Z0q's user avatar
  • 91
0 votes
1 answer
129 views

Workaround for Offset limitation

I am currently working on setting up REST service in salesforce where in consumer can pass few parameters based on which there is logic to build and combine SOQL results and send in response Sometimes ...
sf_user's user avatar
  • 2,260
0 votes
0 answers
47 views

REST Web Service problem: /apex/FileNotFound

I built a REST Web service to create a custom record everytime a call is made in a calling app. Json is sent to the web service via webhook. So far all the tests I did in sandbox were succesful and ...
Sebastian C's user avatar
0 votes
0 answers
35 views

Test method throws Script-thrown exception during multi-endpoint callout [duplicate]

I have a test method that is throwing a Script-thrown exception at the line where a callout is being made. I am not sure what is the problem, I am using a mock class and validating which endpoint is ...
Mauricio.Ramos1979's user avatar
1 vote
2 answers
153 views

JSON.deserializeUntyped Error : System.JSONException: For input string

I have a simple REST API call sent from apex class, I a trying to handle the response body with the bellow code: String jsonPayLoad = '{"Accts":[{"Name":"ABC","Exp&...
Raphael D's user avatar
  • 616
2 votes
0 answers
27 views

Integration User license: restrict access to specific fields on a standard object [duplicate]

I would like to give an API user^ the least necessary permissions to interact with (particularly edit) objects. Ideally, I would enable only the fields they need to be able to edit. First I tried ...
Matthew's user avatar
  • 129
0 votes
0 answers
82 views

'activityInstanceId' field on execute request of a custom activity and where to find it in journey history?

I have a custom activity that uses activityInstanceId field from request as unique id for each request. I now need to somehow connect that id that I save on my side to contact for which activity was ...
mradovcic's user avatar
0 votes
0 answers
96 views

Create and populate custom object in Salesforce

I have built a custom survey system, and I would like to see the option on saving the results in Salesforce, on a custom object. In general, the object will have the following fields: Start date (...
Stratos Nikolaidis's user avatar
0 votes
2 answers
353 views

Nested query works in salesforce inspector but not in request with query in url

I'am trying to get(request) Accounts with some informations from child called Services__c. When im performing query in inspector it works fine SELECT Legal_Name__c, Name, BillingCountry, (SELECT ...
B.G's user avatar
  • 23
0 votes
0 answers
26 views

I want to update part of an email in SFMC using restAPI

I am looking at updating only part of an existing email using the following Rest API call. https://et_subdomain.rest.marketingcloudapis.com/asset/v1/content/assets/ I am able to update all the content ...
Ahmed's user avatar
  • 11
0 votes
1 answer
272 views

Getting data extension eventDefinitionKey and Id

I'm creating a journey through the journey REST API. I want to add a data extension to that journey. To add a specific data extension, as far as I can see, I need the data extensions ...
Thor Christensen's user avatar
1 vote
1 answer
93 views

Test Coverage issue for a simple rest-service class

Just get started with Trailhead but got stuck with one challenge. It requires you to write an apex class to implement a REST GET service to retrieve an account and associated contacts. Then you have ...
user9035826's user avatar
-1 votes
1 answer
793 views

How to download a PDF file which is present in Salesforce using Rest Callout

I have to create a RestResource apex class which should let the user to download a pdf from salesforce. I have written the following code, but I am not sure how to proceed further to let file ...
Dilipan Manoharan's user avatar
0 votes
1 answer
525 views

Proper way to store a .pdf from a REST callout using ContentVersion/ContentDocument

I am working on an integration where I am provided a URL + document ID, which should send back a .pdf, I retrieve it using a GET, and then I take the blob of the pdf and create a ContentDocument and ...
Chris's user avatar
  • 61
-1 votes
1 answer
778 views

Access to fetch has been blocked by CORS policy - LWC

I'm having the following error once I try to do a POST in an outside link of my Salesforce org, So, I've already added this URL to the "CSP Trusted Sites" and the "Remote Site ...
André Rödel's user avatar
-1 votes
2 answers
84 views

Accessing the Deserialized JSON list's values and modifying the null values

I have deserialized a JSON data into a list.I want to access the null values present in the list for any wrapper variables and modify it to an empty string. Deserialization Code: lstSeeds = (List<...
Hira Khan's user avatar
0 votes
0 answers
43 views

REST - Journey with DE as trigger

In my app i have a api call which creates a new dataextension through the soap API. When that is done I want to create a new journey with that DE as a starting source. I'm able to create the journey, ...
Kriss's user avatar
  • 1
-1 votes
1 answer
1k views

Update multiple records at once - REST API Call

Requirement is to update a single record at once, for which I am using a simple PATCH request using REST. The request is being made from an external platform Sample: URL: /services/data/v56.0/sobjects/...
Akshay Srivastava's user avatar
0 votes
1 answer
122 views

Salesforce CMS Search Rest API Cannot Work

We got an error about CMS search by Rest API We run this url in workbench, always report errorCode: MISSING_ARGUMENT message: Specify a Library. /services/data/v57.0/connect/cms/items/search?...
Robert Guo's user avatar
0 votes
1 answer
882 views

Composite API to delete multiple records by an external id

I have been looking for an example of what @sfdcfox suggested for this thread https://salesforce.stackexchange.com/a/332678/133263 "The first subsequent would be a get, the second the delete call&...
Lena Razov's user avatar
-1 votes
1 answer
468 views

How do I send a Callout after a DML operation and return the data to Flow [duplicate]

I'm new to Salesforce and I am struggling to resolve an issue with Apex. What I want to do is create a flow that activates daily and sends a GET request to an IAP protected server (I can't just use ...
Arthur Santos's user avatar
0 votes
1 answer
401 views

How to use Web Server 2.0 OAuth flow with new "Salesforce API Only System Integrations" profile user

I am using recently announced Salesforce Integration license user for an integration using Web Server 2.0. As per the Web Server 2.0 flow, I need to first obtain the Authorization Code. To get the ...
user36778's user avatar
  • 656
-1 votes
1 answer
58 views

RestResource HttpGet close new tab

I'm currently trying to work with an integration with an external API (Lansweeper). When trying to authenticate the API, I'm running into an issue where they authenticate through an external url (...
Kevin Yao's user avatar
  • 117
0 votes
0 answers
67 views

Securing API access to Salesforce from a custom mobile app

Custom mobile application sends requests to a custom REST web service on Saleforce. The request contains an external ID, which is saved on the Contact standard object along with customer data. This ...
DevelBase2's user avatar
1 vote
1 answer
240 views

Most Appropriate HTTP Method for Query with Optional Upsert?

I have inherited a REST endpoint that has one key action it performs, named find. This action will generally just query for any matching resources, rank them, and return the most favorable result. ...
Adrian Larson's user avatar
  • 151k
-1 votes
1 answer
256 views

Batch Import ContentVersion data via the REST endpoint

I am trying to upload a large amount of photos for Salesforce via the /sobjects/ContentVersion REST endpoint. Currently I am able to use this endpoint to upload one photo at a time. Is there a way to ...
EchoNano's user avatar
  • 101
0 votes
1 answer
560 views

How To POST Request To PHP Endpoint And Process Values

I'm trying to send data from Salesforce to an endpoint hosted on an external server. The endpoint is written in PHP that will insert a new record into an external MySQL database. I've got the ...
joshholloway's user avatar
-1 votes
1 answer
1k views

Casting from a JSON body to a List of a specific Object

I am trying to convert JSON, which is something like this: [{"_id":"55d66226726b611100aaf741","replacement":false,"quantity":5,"name":"Generator ...
ApexNoob's user avatar
1 vote
1 answer
1k views

Salesforce Platform API Versions 21.0 through 30.0 Retirement

I received an email "Salesforce Platform API Versions 7.0 through 30.0 Retirement". I am new to my org and I managed to see the list of installed packages, I then run a query to get the list ...
Valentina Novara's user avatar
0 votes
0 answers
312 views

Salesforce : How do we block a User from using query with Rest API?

We are integrating an External System (Drupal) with Salesforce . The corner case being , A user who may get access to the shell of the server the Drupal Instance is running , may have access to all of ...
Salesforce Girl's user avatar
0 votes
1 answer
236 views

Nested Json not detected

I'm trying to parse a nested JSON through a REST Api but somehow it is not getting read. For example: I'm passing a JSON like this in my request body. [ { "first":"I like sfdc", &...
Accredo2442's user avatar
1 vote
1 answer
90 views

Salesforce retirement from v21.0 to v30.0, generated ApiTotalUsage file from eventlog files, how to know where the resource is used

I have generated ApiTotalUsage file from eventlog files. I followed the steps mentioned in this article and generated the ApiTotalUsage file https://help.salesforce.com/s/articleView?id=000389618&...
user125558's user avatar
0 votes
1 answer
251 views

Issues with SOAP API login callout

I have the following piece of code that used to work before: Custom_Data__c cData = [SELECT Password__c, Security_Token__c, Username__c FROM Custom_Data__c WHERE Name = :Constants....
Alin Paraschiv's user avatar
0 votes
1 answer
215 views

Authentication for Google DocAi Api in Apex

We try to integrate the Google Doc Ai https://cloud.google.com/document-ai/docs/drag-and-drop to send pdfs and receive parsed texts. I am struggling with the authentication in Apex for the Api call. I ...
N4go's user avatar
  • 1
0 votes
2 answers
311 views

JSON Exception "Illegal value for primitive" obtained during response parsing

I am calling a Webservice which returns the following as JSON response. **REST Response** : {"totalRowCount":1, "hasMorePages":false, "data":[ { &...
Varun's user avatar
  • 3,103
0 votes
2 answers
665 views

Custom fields not being saved

I'm using propertybase to create contacts via salesforce (it uses apexrest REST API) and I followed this guide: https://help.propertybase.com/hc/en-us/articles/360003180752-WebToProspect-REST-API I'm ...
Gabriel Costa's user avatar
1 vote
0 answers
34 views

How to use an Integration User with a REST site: documentation request

My app is a Lightning native Twilio integration that uses a REST site to receive data from Twilio. I would like to run flows that are triggered by data created by these incoming http POSTs. However, ...
PatMcClellan__c's user avatar

1
2 3 4 5
18