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 votes
0 answers
28 views

Exceeded maximum time allotted for callout (120000 ms) , how to optimize it to make it work this error comes very rarely when response is big

See comment with ===>: public class CreateAccountInSFDC { @future(Callout=true) public static void fetchAccount(){ String endPointupdateURL = System.label.AccountUpdationCalloutURL; ...
SACRED WARRIOR's user avatar
0 votes
1 answer
17 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
0 answers
49 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
0 votes
1 answer
49 views

Delete ContentDocument through REST API permission

I'm trying to delete a ContentDocument, added as attachment in an Account, throught REST API. I'm able to retrieve the ContentDocument, Get the Document Data (requesting ContentVersion as described ...
Leto's user avatar
  • 486
-1 votes
1 answer
45 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
35 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
  • 602
-1 votes
1 answer
40 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
0 votes
0 answers
41 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
49 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
  • 148k
-1 votes
1 answer
25 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
0 votes
1 answer
117 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
204 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
933 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
56 views

set VF outputText value using REST call

I'm trying to generate PDF from richtext(which is not saved in SF) that I get from Flow via InvocableMethod. Im not able to set it as VF URL parameter because in that case the URL size will over the ...
elvi's user avatar
  • 1
0 votes
0 answers
167 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
69 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
78 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
147 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
0 answers
36 views

How to update a field when its creat or modified a Contact with a value from a webservice?

I tried getting it to work like this, but got stuck. I am still polishing my English, so I apologize for any mistakes 1 Person clicks New/modify Contact, and fills in the appropriate fields and fill ...
William's user avatar
0 votes
1 answer
60 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
84 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":[ { &...
KVN's user avatar
  • 3,053
0 votes
2 answers
238 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
29 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
0 votes
0 answers
76 views

How to create a Salesforce User using SCIMv2 but specifying an existing Account

I am integrating the user management of another system with Salesforce using the SCIM v2 REST API. So when a user is created/modified in the other system, a related user is automatically created/...
MrGrumpy's user avatar
-1 votes
1 answer
80 views

Condition not checking after adding error condition in postman

I have created apex class to update existing records, and I am adding error code, but record is updating when I run it in postman. But if I miss any parameters, I have to show error which is given in ...
user116229's user avatar
0 votes
1 answer
68 views

Create opportunity record in target org from source org

My company is using two different Salesforce orgs (org1 and org2). I have a custom object in org1, called Tender__c. I want an automation to create an opportunity record in org2 when the Tender__c in ...
Marjan's user avatar
  • 15
2 votes
0 answers
676 views

REST API: retrieving a report with more than 2000 rows

We are working with the Salesforce REST API to fetch reports. When fetching more than 2000 records from a report how does the pagination work? Is there any querystring parameter to append to the URL ...
Platoscave's user avatar
0 votes
1 answer
249 views

After Establishing connection from external system to Salesforce getting error

We have created a standard callout class to establish a connect between Salesforce to SMIT system, and then we have provided our Salesforce credentials (like clientid, client secret etc). They ...
user116229's user avatar
0 votes
1 answer
268 views

API Callout via Connected App is Not working in React PWA but working fine in POSTMAN API

Im calling access token grant API from Postman Rest Client its working fine,but when Im calling the same via React PWA its not working error 307 is coming. Connected App is built on UAT and Production ...
Sudhir's user avatar
  • 1
0 votes
1 answer
297 views

Call Rest API from Apex REST Class

I know it's possible to make Apex class methods available as a REST service with annotations. I also know it's possible to make a call to an external web service from an Apex class. Can I combine the ...
Jeff's user avatar
  • 99
0 votes
0 answers
409 views

Is it possible to retrieve fields from SOQL in a simpler way?

I'm working with REST API, using endpoint /services/data/v53.0/query. The question in place is: is it possible to retrieve requested fields API names present in SOQL? Example. Get from SELECT Id, Name,...
Mariia Illarionova's user avatar
0 votes
1 answer
706 views

How to trigger custom button by REST API call [closed]

I'm trying to achieve the following but can't seem to find a way to get it to work. On a custom Salesforce object, there is a custom button present in the UI. Clicking on this button triggers an ...
Senne's user avatar
  • 1
0 votes
0 answers
206 views

Download file from Google Storage Cloud using REST API

I've successfully been able to authenticate and upload files from SF to a bucket in GCP, however I cant figure out how to set the save to location from SF when downloading. Example below from the ...
paul's user avatar
  • 1,502
0 votes
0 answers
22 views

How to add multiple entries (records) to a Custom Setting list with REST POST request [duplicate]

So I have created a custom setting of type list and I'm trying to fill it with multiple records using a POST request. I'm using workbench to try this and I've successfully posted 1 record. URI: /...
Nolo's user avatar
  • 1
0 votes
1 answer
222 views

Preserve order of params in RestRequest

In my RestResource, I need to validate the source of an incoming RestRequest. To do so, I need to create a hash using a concatenated string that includes the full request URL, including the query ...
Diego's user avatar
  • 365
0 votes
1 answer
130 views

Query for all Custom Apex Web Services "@RestResource"

I am looking for a way to query for all Custom Apex Classes that have a @RestResource annotation. I am currently using the following SOQL query and filtering for anything that has @RestResource. ...
Matthew Metros's user avatar
-1 votes
2 answers
782 views

Disable "Generate new password and notify user immediately" checkbox while creating User via API

I have a usecase where I am creating new users via REST API. When we create a new user from UI then there is this checkbox Generate new password and notify user immediately which is selected by ...
Baba's user avatar
  • 9
-1 votes
1 answer
613 views

REST web Service to consume PDF in Binary Form from external System

I have a requirement where external system will be posting PDF to salesfore in binary form as REST Post call and I need to cosume the PDF to attach it to the Object as attachments. Following is my ...
David Mycka's user avatar
  • 1,295
0 votes
0 answers
49 views

I want attach csv to opportunity using salesforce function

Hello I want to Attach document to a record which is a csv file, I want to use the salesforce function for that. Below is my code and it is giving me some error. public class MyfunctionFunction ...
balkrishan's user avatar
0 votes
0 answers
87 views

Create SandboxInfo record using tooling API

I'm working on automating sandbox management. Just wondering if we are able to create/update sandboxinfo record using tooling API. I was able to retrieve list of records from workbench using GET /...
RaptorStrike's user avatar
4 votes
1 answer
673 views

Retrieving license consumption stats for a Customer Community Login license

I am testing my app: at this moment I check does it properly count licenses. Everything was fine until I started checking Community licenses. I have created a user with a Customer Community Login ...
Yurii Saiapin's user avatar
4 votes
1 answer
388 views

Flow -> Apex -> Salesforce REST API: why "Unauthorized endpoint"?

I have an Apex class that calls into Salesforce using a new HttpRequest(). When I call that Apex from Anon Apex, it works fine. But when I call it from a Flow I am testing in FlowBuilder, it complains ...
Paul Prescod's user avatar
0 votes
1 answer
220 views

setBody on HTTPCallout not working apex to stripe [closed]

I used some similar code I had done successfully in a trailhead here public class HttpCallout { @AuraEnabled public static String makePostCallout() { System.debug('----apex ...
mackmama's user avatar
  • 605
1 vote
1 answer
101 views

Rest API - Which has higher priority in a SOQL query, LIMIT clause OR Sforce-Query-Options: batchSize?

When a SOQL query has both a LIMIT clause and a Sforce-Query-Options: batchSize with different but valid values, which one of these gets a higher precedence? A query with only LIMIT clause SELECT ID ...
Anupam Saini's user avatar
0 votes
1 answer
267 views

When does mc api rest for journey respond with "The contact status should be Active"

We are getting the error HTTP/1.1 400 { "message": "The contact status should be Active.", "errorcode": 30000, "documentation": "" } when ...
SebOB's user avatar
  • 819
0 votes
1 answer
616 views

I try to do callout to my apex rest service from first to second dev org, but got CalloutException

String endPoint = 'https://wise-otter-ngj5eu-dev-ed.salesforce.com/services/apexrest/v1/getAccounts/'; Http h2 = new Http(); HttpRequest req1 = new HttpRequest(); req1.setHeader('Authorization','...
Ivan's user avatar
  • 13
0 votes
2 answers
604 views

Retrieve all Data Extensions across all running journeys

I found out on this forum there is an option with Marketing Cloud API to retrieve all the Data Extensions associated with Journeys. When using Postman, the request below works perfectly GET /...
nerran's user avatar
  • 5
-1 votes
1 answer
104 views

A newbie's integration question - bearer token [closed]

I have two Salesforce orgs. First org has a REST web service, second org is calling the webservice. Webservice: @RestResource(urlMapping='/Johnny') global class WebServiceFactory { @HttpGet ...
DevelBase2's user avatar
0 votes
1 answer
129 views

Sending email with template without storing data

We've set up a Apex REST endpoint to send emails on behalf of an external system. Data to fill the templates will be sent in the JSON payload to the REST endpoint. We're finding that the data is going ...
d2013's user avatar
  • 81
0 votes
0 answers
644 views

Connected App Error - { "error_description": "invalid_grant", "error_description": "expired access/refresh token" }

I've have successfully created a connected app using our sandbox account by following this Enable oauth settings api integration, However when I try to request for access_token I'm getting the follow ...
Shark's user avatar
  • 1

1
2 3 4 5
18