Questions tagged [rest-api]

REpresentational State Transfer (REST), or RESTful, web services provide interoperability between computer systems on the Internet. The Salesforce REST API provides a powerful, convenient, and simple Web services API for interacting with Force.com.

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

Hi, Can anyone help me write test class for the following class [duplicate]

@RestResource(urlMapping='/InstallationWebService/*') global without sharing class Wx_InstallationWebService { @HttpPatch global static void updateContactGUID() { RestRequest ...
user avatar
0 votes
1 answer
34 views

Are there any ways to create a template-based email in Content Builder via SFMC REST API?

So far I have only been able to create paste HTML emails using the REST API /asset/v1/content/assets route. I have yet to find a way to create an email based on a template. Is this possible? Thank you
user avatar
  • 13
0 votes
0 answers
9 views

Unable to view the Event in Event Source after creating it with REST API using schema not the DE Id?

I have created an event, the response says successful, but I can't find the event in Journey Builder I have seen that I'll have to provide the sourceApplicationExtensionId as well as the DE id in the ...
user avatar
  • 159
0 votes
1 answer
30 views

Performing a query via REST-API - Solve encoding problems

I am using Guzzle as my PHP HTTP client to perform api-calls. This worked great so far, for retrieving my access-token for example. However, now that I am trying to perform a query search I get a ...
user avatar
0 votes
0 answers
17 views

what are the risks of passing external id in patch url of inbound callout to salesforce from external system using standard Rest API?

We are creating a connection to external system. For this we are not using custom webservice instead using the Salesforce standard Rest API by using its functionality of Patch by passing the external ...
user avatar
0 votes
1 answer
30 views

How to pass more than one parameter for Invocable Methods with using flow

@InvocableMethod annotation is not allowing to pass two parameters. i want to pass parameter in my rest api can any one plz tell me where i need to do changes in my code here my code public class ...
user avatar
  • 1
-1 votes
0 answers
39 views

Built Connected App for 3rd party vendor for integration - Vendor doesn't know how to connect

We require 3rd party vendors API Only access, usually creating a Connected App for them and providing them a Token and Secret. We have a new Vendor who has no experience in being an Integrated Vendor ...
user avatar
  • 15
0 votes
0 answers
28 views

Accessing HTML content from the email using REST API endpoint

Using the REST API I am trying to extract the HTML content of an email. Endpoint URL : https://SUBDOMAIN.rest.marketingcloudapis.com/asset/v1/content/assets/{{asset_id}} The above URL returns a ...
user avatar
  • 1
0 votes
0 answers
16 views

Integration of Salesforce with Link2Feed. How to convert a Javascript pre-request script into Apex?

I'm trying an integration of Salesforce with Link2Feed system. I have a pre-request script in postman but it's written in Javascript and I am having trouble converting that code into Apex. I'm not ...
user avatar
  • 1
-2 votes
0 answers
34 views

Unable to resolve host "na111.salesforce.com": No address associated with hostname [closed]

I'm doing a callout to salesforce from my external system and getting this error. I checked the instance status and it looks fine in trust.salesforce.com The external system from where I'm doing this ...
user avatar
0 votes
0 answers
20 views

Trouble getting VersionData from ContentVersion through REST API - always returns null

I am trying to retrieve the binary file data from a ContentVersion. As i understand it, you get this from making a GET request to the value that is stored in VersionData on ContentVersion. For me it ...
user avatar
-1 votes
0 answers
44 views

i want to send SMS with twilio using salesforce api

heyy i try to send sms with twilio using salesforce api but i want to call that apex class in my flow so plz tell how to do it if code is wrong plz let me know here is my code. public class Sendsms { ...
user avatar
  • 1
0 votes
1 answer
35 views

400 Bad request for concurrent 10 sessions hitting REST API from Informatica

I have an Informatica integration workflow processing around 200 or 100 records each session for 10 sessions concurrently to REST API (Salesforce). It first authorizes using connected app details (...
user avatar
  • 9
-1 votes
0 answers
29 views

UTF8 decoding issue

I have an api exposed and the external system is calling the API and from that, we are creating a record of data received from the external system. Some of the values are in german like 'München' but ...
user avatar
0 votes
0 answers
22 views

Salesforce Dashboard Filter Options Analysis REST API returns NOT_FOUND error code [closed]

I use PostMan to verify my dashboard using Salesforce Dashboard Filter Options Analysis REST API, but the response message says that "The request resource does not exist". This is weird ...
user avatar
  • 111
-1 votes
0 answers
10 views

Can't pause journey using API

I'm trying to pause&resume journey using API and it doesn't work. Keep getting the same response saying "InteractionStudio" and not sure what's going on. Can anyone give me a hand? Thank ...
user avatar
  • 1
0 votes
1 answer
37 views

Creating record through Postman (REST API) - request body ignored

I'm experimenting with creating records through Postman. I have authenticated, and I'm able to query data, so I think authentication is OK. However when I'm trying to create or update an Account, it ...
user avatar
-1 votes
0 answers
15 views

Usecase : Integrate Salesforce and Dynamics 365 CRM with realtime bi-directional sync for standard objects(Account, Contact, Lead, Opportunity). Help! [closed]

I have a usecase in my current organization that requires me to integrate Salesforce with Dynamics 365. The integration should sync both the systems realtime. Any changes in Standard sales objects in ...
user avatar
0 votes
0 answers
38 views

AccountContactRelation update delay

I am using the REST api to create Accounts and Contacts, I am also using it to update the AccountContactRelations between them (the Roles field) I have a flow where I need to set roles on an ...
user avatar
  • 101
3 votes
1 answer
69 views

Comparing timestamps in SSJS

As the access token is valid for 20 mins in SFMC, I want to reuse the access token. Hence I tried to write the below code. What I am doing currently I have created a Data Extension called - tokens_DE ...
user avatar
  • 33
0 votes
1 answer
55 views

Attempting to upload file to AWS S3 but file is corrupt

I am attempting to download a file from SharePoint through their Rest API, and then upload that file to my S3 Bucket. I can "successfully" download the file and upload to S3. The issue is ...
user avatar
  • 103
0 votes
1 answer
45 views

Apex Callout Issue - System.HttpResponse [Status=Moved Permanently, StatusCode=301]

I am trying to make a callout to an open public api. When I tested it on Postman, it is giving me the expected response. But when I tried it on the Apex class, the response is giving me the following ...
user avatar
  • 35
1 vote
1 answer
72 views

What is the limit for retrieving files via standard APIs?

We are trying to archive some unused files from Salesforce to an external DMS system. This is not a one-time task but an ongoing feature in order to preserve storage space in SF. For smaller files we ...
user avatar
1 vote
1 answer
52 views

Getting an error in the REST API call for Send Preview when passing the row id otherwise works fine

I have issues with the REST API call for Send Preview. I am using the method given here -https://gortonington.com/email-send-preview-and-test-sends-via-rest-api/. I am testing this in POSTMAN ...
user avatar
  • 11
0 votes
1 answer
56 views

Send data to external system on bulk update

Scenario: On update of a record, record data should be sent to external system. This can be achieved by platform events or outbound messaging or by rest/soap callouts. But if there is a bulk update, ...
user avatar
  • 1,375
0 votes
0 answers
27 views

Creating folder and moving files via REST API

I'm fairly new to Salesforce and I'm trying to achieve something that I'm not sure is even possible. Basically there is a Files tab (Lightning Experience) in the navigation bar, I got a bunch of ...
user avatar
  • 113
0 votes
0 answers
40 views

Obtaining report results via REST

I was following this article to fetch data from reports using the query api, so that I can apply filter in the future: https://developer.salesforce.com/docs/atlas.en-us.204.0.api_analytics.meta/...
user avatar
-1 votes
0 answers
18 views

How call and get values from rest api in salesforce [duplicate]

hey I am new to salesforce, i need to call a rest api and simply get values to populate a list using apex. i have no idea where to make the actual rest api call and how to pass the returned value to ...
user avatar
0 votes
2 answers
43 views

why my JSON deserializeUntyped giving me Exception

I'm creating a new REST API in salesforce and receiving the below JSON in Restrequest string {"event_source":"","event_time":"2022-05-25 08:12:40.151","...
user avatar
0 votes
0 answers
17 views

Use SwitchServer for dynamic url changes for Chat rest API call

I am using SwitchServer to get the newURL for Chat API endpoint. But the response newUrl is returned for requests to Visitor resources if the Live Agent instance URL is not correct for the ...
user avatar
1 vote
0 answers
43 views

Get Knowledge Articles using Salesforce REST API [closed]

I'm working on an integration of Salesforce Knowledge Base consuming the Salesforce REST API (following this guide). I'd like to consume the Knowledge Articles that are loaded in my Salesforce domain. ...
user avatar
  • 11
0 votes
0 answers
16 views

Integration batch job + Data Encryption : Need some suggestion

I have written a batch job to push Open Case record every one hr from Salesforce to External system using REST API. I need to Encrypte the data and push it to the external system. Below is the Class ...
user avatar
  • 659
0 votes
2 answers
41 views

Speed up REST SOQL Query

Other than reducing the complexity of the Query is there any way of speeding up how quickly you can iterate through a SOQL Rest Query? I can't use bulk SOQL as I require Parent-to-child relationships ...
user avatar
2 votes
2 answers
64 views

rest api SOQL Query max records

The documentation states that if it cannot return all records in the query then you can use the next records URL to get more records. Does this still have the same limitation of no more than 50,000 ...
user avatar
3 votes
0 answers
47 views

How can I tell if a field is a non-custom formula field in the REST API?

We have an integration that allows users to specify criteria to listen for on arbitrary object types in Salesforce. The user specifies the object type they want to listen to updates on and then they ...
user avatar
1 vote
3 answers
64 views

Get values from nested JSON dictionaries in Apex

I'm trying to make use of the Jira Rest API from within Salesforce. I am somewhat useless with Java, so hopefully someone can point me in the right direction. I can use the following Apex to get an ...
user avatar
  • 43
0 votes
1 answer
65 views

Apex REST API call throws 401 error, status: token expired or invalid [closed]

I am trying to call external REST API from Salesforce. Sometimes I get error 401 with messages token expired or token invalid. Is there a way to prevent calling API when token is not valid. The thing ...
user avatar
0 votes
1 answer
38 views

Getting tasks stored in List Views

I need to get the tasks that are stored in list views that are selected by the user. I've tried a couple things that I'll outline below: HTTP API request I've tried making a REST API call to get the ...
user avatar
0 votes
0 answers
44 views

I am trying to delete account record using Postman tool. I have created apex class and method to delete account. but the account doesnt get deleted

@RestResource(urlmapping='/v1/Account/*') global class AccountManager { @httpDelete global static String deleteAccount(){ RestRequest request = RestContext.request; String requestURI = ...
user avatar
1 vote
1 answer
26 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 ...
user avatar
-1 votes
1 answer
67 views

is it possible to add uri parameters on a http callout using named credentials?

Context: I have to call, from a source org, a HttpGet method from a target org. This method will return a list of records that match a certain value on a field, which I have to send from my source org....
user avatar
-1 votes
1 answer
24 views

Web service to get related opportunity Ids based on converted lead records

I am trying to setup a web service where I call to get a list of opportunity records based on converted leads from a specific source. I am trying to create a list of opportunity ids based on a SOQL ...
user avatar
  • 5
0 votes
1 answer
56 views

How to get Send Classification ID, Delivery Profile ID and Sender profile ID in SFMC?

I am trying to make an API call from Postman to make a test send. I am trying to implement the solution given here - https://gortonington.com/email-send-preview-and-test-sends-via-rest-api/. I am ...
user avatar
  • 3
0 votes
1 answer
26 views

SOQL Queries using the Rest API results are close to half that of the Salesforce reports

I have a query in SOQL SELECT+Event.Id,Event.CreatedDate,Event.StartDateTime,Event.EndDateTime,Event.Subject,Event.DurationInMinutes,Event.OwnerId,Event.Status__c,Event.Intro_meeting_summary__c,Event....
user avatar
  • 21
2 votes
1 answer
34 views

Updated API method to detect merged records

Following the answer on this question, I had been using SELECT Id, isDeleted, masterRecordId FROM Contact WHERE masterRecordId != '' and adding AND SystemModStamp > [the last time we checked] with ...
user avatar
0 votes
0 answers
26 views

Search Journey based on salesforce object as entry source or entry data field?

Is there a way to find out which journeys using a specific salesforce object as entry source or search them based on entry data field? I tried to search journey through this API GET /interaction/v1/...
user avatar
  • 146
5 votes
0 answers
35 views

Unable to re-parent a folder of reports using REST API

Is it intentional that I get such an error Folder parent cannot be part of a patch request body. when I try to re-parent a folder using REST API? According to the documentation PATCH allows to change ...
user avatar
1 vote
1 answer
44 views

Rest API - Returning Newly Created Fields on Create (POST)

I have an application that is creating a Salesforce Case via the API (POST on /services/data/v48.0/sobjects/Case/). This application is expected to return the case number to the user. Therefore, the ...
user avatar
-3 votes
1 answer
77 views

Consuming salesforce Rest API with out security token [closed]

I am exposing a API in salesforce which will be hit by an external c# application. I am enabled oAuth mechanism. Things are looking good but when the external end point needs to pass user id and ...
user avatar
  • 59
2 votes
1 answer
73 views

How to generate and send a PDF via REST API Request

This is a follow-up new question to This SE Is it possible to create a custom REST API Class to allow an oAuth connected app client to download a dynamically generated PDF visualforce page via REST ...
user avatar

1
2 3 4 5
65