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
1 vote
1 answer
27 views

http call out to an external REST webservice

Simple use case - make a http call out to an external REST webservice. Parse the JSON response. I know I could do this using Flow, but due to the business requirement have opted for Apex Class. Can ...
Cloud Rizon's user avatar
2 votes
0 answers
25 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
  • 121
0 votes
0 answers
40 views

Is it possible to maintain the order of json string using JSON.serialize? [duplicate]

I have a simple json format that I am trying to practice for the complex format that I am going to make. But it seems like, I'm not able to maintain the order when using the JSON.serialize method ...
Johan's user avatar
  • 1
0 votes
0 answers
24 views

Is there a server API for the Messaging for Web product?

I have a custom chat client that is using the Chat REST API. Given the product is in maintenance mode I'm looking at what will be needed to support Messaging for Web. However, all I found was a JS API....
thegenderbender's user avatar
0 votes
1 answer
56 views

How can I get the delivery details of a email sended by /interaction/v1/events

I'm using the request below to send emails using a journey builder/templates, etc: url = 'https://exacttargetapis.rest.marketingcloudapis.com/interaction/v1/events' headers = { 'Content-Type': '...
Alex Soto's user avatar
-1 votes
1 answer
47 views

HttpCalloutMock for string response

The response from my API call is a csv from a url: UniCode;Purchased Date;City 12343;12/04/2000;London 12344;12/04/2003;London How can I create a HttpCalloutMock and setBody to replicate that? I keep ...
user84162's user avatar
1 vote
0 answers
41 views

How to validate access to Apex API with an Integration User

I use an Apex REST API for communication with Java, which authenticates in the Connected App using the login and password data of any user along with the provided User Details. I was informed that, ...
Gabriel Zanotelli's user avatar
-2 votes
1 answer
52 views

Why does Salesforce standard API sends records in batches, even though no batch size specified?

In our Salesforce implementation, we are striving to use standard APIs' as far as possible. One of our list APIs' has around 1200+ objects, yet it is returning only 250 in response, along with a ...
Yash Sampat's user avatar
2 votes
1 answer
29 views

Composite sObject Collection call not reaching limit

The Composite API docs (ref) asserts that You can have up to 25 subrequests in a single call. Up to 5 of these subrequests can be sObject Collections or query operations, including Query and QueryAll ...
mhery's user avatar
  • 121
0 votes
0 answers
21 views

Access named layouts of sObjects

I am trying to test the REST API to get named layouts of sObjects. In this case can you point me how to create a named layout for a custom object or to an sObject type which already has namedLayouts
sahanhe's user avatar
-1 votes
0 answers
48 views

Facing System.CalloutException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 503 Service Unavailable [duplicate]

I'm having trouble with the API. I tried hitting the endpoint with Postman and the browser, and it worked great. However, when I try hitting the same endpoint from Salesforce using Apex and an HTTP ...
Kujambal R's user avatar
0 votes
0 answers
26 views

Upload user photo using REST API [duplicate]

I have a problem uploading a user's photo using the REST API. I follow the documentation https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/intro_input.htm#fileUploadExample ...
Piotr W's user avatar
0 votes
1 answer
64 views

Export view details from Journey Builder

I don't see a way of exporting this view from a journey activity I've tried with SQL but I only see one activity. SELECT sub.EmailAddress as email_address, ja.ActivityExternalKey FROM _Sent s ...
Johhnytska's user avatar
0 votes
1 answer
59 views

Downloading a file via REST API

I need to download files with the API, using now data/v59.0/sobjects/ContentVersion/{contentVersion}/VersionData but it's returning the entire file as application/octetstream but without a Content-...
Marcos Forlenza's user avatar
-2 votes
0 answers
28 views

Send Salesforce Object details via REST API

I am currently working on a project in which the requirement is to connect Salesforce with Sharepoint and send an Object record details via Rest API, I browsed on many forums but all I could find is ...
Othmane El Hanouch's user avatar
-2 votes
0 answers
27 views

Where is email-statistics in Pardot v5 API?

I'm looking for this data, but in the v5 API. How can I access this dataset?
klenium's user avatar
  • 119
0 votes
1 answer
105 views

Recently started showing Salesforce web api error for V49.0 "The requested resource does not exist". There is no issue in the URL

Salesforce web api GET and POST both were working OK before. Suddenly from today started giving following error. Noticed in the API setup API version is changed but after updating newer version code ...
user2207791's user avatar
-1 votes
1 answer
67 views

{"message":"This session is not valid for use with the REST API","errorCode":"INVALID_SESSION_ID"}]

I've created Connected APP - Auth Provider and Named Credentials in order to make Rest API Apex Classes : @RestResource(urlMapping='/Opportunity/*') global class RestApiIntegration { @httpGet ...
Fark's user avatar
  • 17
1 vote
1 answer
159 views

Why is OAuth Client Credentials safer than OAuth Username-Password?

According to Salesforce, here "You can use the username-password flow to authorize a client via a connected app that already has the user’s credentials. However, we recommend avoiding this flow ...
Morgan Marchese's user avatar
0 votes
1 answer
52 views

ssjs System.Collections.Generic.Dictionary`2[System.String,System.Object]

I have a SSJS code that i am running SFMC cloudpages. The code is to do a HTTP.GET call to a url and then parse the JSON response.when trying to write out the result of parse i receive the following ...
sam sfmc's user avatar
0 votes
0 answers
101 views

Decryption of Data failing in API calls

We have an Apex method in our Org which is exposed for a GET API request. The data is encrypted with AES256 before sending. However from the receiver end (Same Org for testing purpose), decryption of ...
Brav's user avatar
  • 708
0 votes
0 answers
51 views

Notify external service when a Contact record is changed

I have a connected app and I would like to create a something like a webhook to track all the "Contact" changes. Sales force has something like that? There is this webhook in HubSpot where ...
Roland's user avatar
  • 101
1 vote
2 answers
103 views

Export data from large reports programmatically

we have several reports that are over 100K rows. We would like to export them to a data warehouse to combine their data and run large analysis on that data. The reports need to be extracted daily to ...
luksfarris's user avatar
0 votes
0 answers
35 views

Named Credential Auth 2.0 JWT Token giving empty error: "Unable to complete the JWT token exchange. Error: . Error description: ."

My JWT token is retrieved using only the following parameters in a json body: { "username":"blabla", "password":"blabla" } I don't need the standard JWT ...
Samuel Dias's user avatar
0 votes
0 answers
26 views

Create profile tooling API giving INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY

I created a CustomField using the tooling API: POST "tooling/sobjects/CustomField" But it creates a custom field without the permissions on "Field-Level Security for Profile" As I ...
Roland's user avatar
  • 101
0 votes
0 answers
14 views

get pending email sends via API

I send out user-initiated emails via the SFMC API's. Is there a way to retrieve the scheduled emails that have not sent yet via an API?
Talk Nerdy To Me's user avatar
0 votes
1 answer
99 views

403 Forbidden when making a multipart/form-data REST PUT API Call to Azure DataStore

As the title suggests, whenever I try to send an API request with a PUT method and a multipart/form-data as the content-type, to an Azure Data Store, I get a 403 Forbidden response back. I am using a ...
MestreSales's user avatar
0 votes
0 answers
32 views

Newly gained Access Token from social login is resulting in This session is not valid for use with the REST API error for api requests

I am using Django-allauth for social logins. I confirmed that I have the access token that I receive from salesforce after the social login, but when I do headers = { "Content-Type": &...
Mango's user avatar
  • 1
0 votes
0 answers
41 views

Getting No such column error on PlatformEventChannel

I'm following documentation for integrating salesforce with AWS event bridge (HERE), but when I try to create a platform event channel With this payload: { "FullName": "...
Marcus's user avatar
  • 1
0 votes
0 answers
27 views

Missing required 'subjectId' parameter for Sending a Direct Message Connect REST API

Send a Direct Message URL above is giving me the endpoint and body for sending a direct message in community. When run in workbench, the DirectMessage, DirectMessageFeed, and FeedItem record was ...
JMRAF's user avatar
  • 31
-1 votes
1 answer
27 views

I want to migrate few Product, Product options etc records from a source org to a Target org while also maintaing their relationships

I already have the access_token for the target org, but I don't know how to proceed further. I can build a REST api to send data to the target org but that won't be sufficient to create a record and ...
Sf-noob's user avatar
0 votes
1 answer
24 views

Updating Lightning EmailTemplates using REST api

I'm trying to replace links within email templates created by the lightning builder programmatically. I've managed to get the sobject ID of an email template using the REST api, but when I try to ...
uplifterTom's user avatar
0 votes
0 answers
58 views

Issue with exposing and consuming REST service between 2 orgs

I have two orgs, A and B. Org A has some exposed REST services. Here is the code: @RestResource(urlMapping='/pokemon/*') global class PokemonHelper { @httpGet global static Pokemon__c ...
Ethan's user avatar
  • 21
0 votes
1 answer
93 views

REST API query failing after successful authentication

Problems with REST API access. We are able to authenticate and get a token using the Client Credentials flow, via an Integration user. i.e. the Integration User is specified in the Connected App as ...
mscholtz's user avatar
  • 1,314
0 votes
0 answers
23 views

Search layout restapi returns fields for event or any custom object which don't have search layout configured. From where we are getting these fields?

Rest api for search layout /services/data/v59.0/search/layout/?q=objectName returns result for both event and task object. For both of these objects we can't configure search layouts in setup. How we ...
Manjot Singh's user avatar
  • 3,406
-1 votes
1 answer
46 views

populate data extension with api response based on values in another data extension

we are intending on sending out an email which contains a section with information about events near the customers location/region/city. For this we are using an api from a third party website. i ...
sam sfmc's user avatar
-2 votes
1 answer
46 views

To have different data type for same variable in Rest API Request body

I am trying to wrap a request body from callin request which has a variable but values can be different data types. Example request body 1 : { RecordId:"cncjdn" } Example request body 2 : { ...
sf developer's user avatar
-1 votes
1 answer
91 views

Streaming Push Topics - Could not load Push Topics. Even though APIs are enabled in SF

I can't seem to get past this error in workbench even though APIs in the org are enabled using the latest or older api version
m_cain1's user avatar
0 votes
1 answer
30 views

System.StringException: Invalid id on class test

I'am trying to create api call using Postman and SF and i'm getting an error message when I try to create contracts. message = System.StringException: Invalid id code Class is below: @HttpPost global ...
Magda L's user avatar
-1 votes
1 answer
71 views

Attach file stored in ContentVersion object to ServiceNow Incident

I'm writing an integration in Salesforce where users can create an Incident in ServiceNow from within Salesforce. I'm able to create the Incident fine from Salesforce. I need to be able to attach a ...
AUEagle2005's user avatar
-1 votes
1 answer
52 views

sending user-initiated email via API

I have a user-initiated email send definition set up in SFMC. Which API endpoint or customized envelope do I use to initiate an actual send-out using that send definition?
Talk Nerdy To Me's user avatar
0 votes
1 answer
107 views

PATCH Method is not working with an Error "Bad Request"

I have an apex callout and LWC that retrieve case records from another org and display them in a data table with an edit feature. It's displaying the records but when I am trying to edit a record and ...
Cyberbless's user avatar
2 votes
0 answers
38 views

Difference between how the labels are returned in compact layout and search layout api if user language is different than english

I am calling salesforce API to get compact layouts( /services/data/v46.0/sobjects/Account/describe/compactLayouts/primary ). I get fields label in user's translated language.I am getting same response ...
Manjot Singh's user avatar
  • 3,406
-1 votes
1 answer
46 views

Salesforce REST API Integration Issue with Dynamic Path Parameter

I am currently working on integrating Salesforce with an external REST API. The external API expects a URL in the format: https://message.com/api/v1/campaign/message/:botId where:botId is a dynamic ...
satishW's user avatar
  • 13
1 vote
2 answers
103 views

Download Salesforce Marketing Cloud Journey Builder History via REST API Returned all ContactKey as Contact Unknown

I tried this method from SFMC Summer 23 update by REST posting to interaction/v1/interactions/journeyhistory/download and get a CSV response back. Every other columns worked great but all ContactKey ...
Khoa Nguyen's user avatar
0 votes
1 answer
105 views

Recommended approach for coupon assignment in SFMC?

In SFMC, we are currently using claimrow() approach for coupon assignment but in past we have seen some issues with this where same coupons getting assigned to same subscribers since coupon email is ...
kl2's user avatar
  • 317
0 votes
0 answers
55 views

Unable to create Content Version using list via ApexRest API

When I upload a 30 MB document in the first class, it uploads without any issues. But when I try to upload two 10 MB files in the other class, it says the maximum heap limit has been exceeded. I'm ...
user22481700's user avatar
0 votes
1 answer
40 views

How to change file properties(Created By, Modified By etc.) while sending file as base64 in API Callout? [closed]

I have requirement of Creating a file (in base64 form) using POST callout in Microsoft OneDrive API. But I want to change the file properties like Created by Name, Last Modified Name, Owner Name etc. ...
Parvez Alam's user avatar
1 vote
1 answer
117 views

External named Credential is not able to fetch in Apex code for Winter 24 Pre

Created the External Named credential with name Samsung Test Added the Principal Added the permission set However I am not able to fetch this named credential in Apex code. HttpRequest req = new ...
neha rai's user avatar
0 votes
0 answers
275 views

Oauth2.0 Authentication code generation from client id and secret in Apex code

I am not able to get the Authorisation code Oauth2.0 from Apex code, However i can get the same from Postman callout. Is it possible to get the authorisation code from apex? I am using the below ...
neha rai's user avatar

1
2 3 4 5
70