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
1answer
36 views

Restrict access to Salesforce REST Resources

The Salesforce org I am working on needs to restrict access to the Salesforce's REST Resources from Lightning Platform REST API. (for example /services/data/vXX.0) From my research I understood that ...
0
votes
0answers
18 views

Rest API: How to log/monitor executed SOQL queries

We have mobile application which communicates with our SF org via Rest API by executing thousands of different SOQL queries. There are usually three types of problems with such queries built ...
4
votes
1answer
40 views

Get Schema of all sObjects in one Api Call, like Schema Builder

I am building a web tool to get the schema of a particular sObject, or an entire org, and save it as a Json file using the SalesForce Rest API. To do this, I am first getting a list of all the ...
2
votes
0answers
25 views

SFMC REST API how to use advanced retrieve of image name when providing publishedURL

I'm interested in finding images that I have put into Content Builder based on their url but I'm having trouble retrieving the image name when I provide the publishedURL. I am able to do the reverse ...
0
votes
1answer
19 views

Salesforce chatter REST api rate limits

I am new to the Salesforce platform. I want to create custom branding of chatter for our organization. I looked into the limits of chatter api and found out that, we are allowed to make one request ...
1
vote
2answers
43 views

How to correctly construct a TestClass for an API Rest Callout | Getting the error “Method does not exist or incorrect signature”

Apex Class for REST Callout public with sharing class FindAnApprenticeship { public class Payload{ @invocableVariable(label='Find An Apprenticeship URL') public String ...
0
votes
1answer
15 views

Call Standard salesforce rest api using jsfoce

I am trying to write a simple node app to get the record count from various objects in salesforce. Following rest api gives the count for objects mentioned in the request /services/data/v45.0/limits/...
1
vote
1answer
34 views

Uploading File against Lead via REST API

I am trying to Upload the File against Lead via REST API. My understanding is that I need to use ContentDocument and then create Content Document Link against that Lead. However, I am unable to ...
0
votes
0answers
10 views

How to create sharepoint instance? [closed]

I wanted to build connection between sharepoint and Salesforce.For that I need a sharepoint instance. How Can I create sharepoint instance.what are the requirements for that? Thanks, Chandu
0
votes
2answers
58 views

Impossible to patch Account

Is there a configuration to allow patching in SalesForce ? I tried to patch the Account on Postman, no success. I also tried on Workbench, no success. My Url (on workbench): /services/data/v47.0/...
0
votes
1answer
20 views

Updating CampaignMember Record via RESTful web service

Also new at APEX and this is my first crack at it. I want to update some fields on the CampaignMember object when I catch a Webhook on a force.com site. I have the Webhook working, however I am having ...
-1
votes
0answers
12 views

Can you call a webservice by keypress event? If Yes how can we achieve that? [closed]

I have a requirement that on giving input to the field it should fire keypress event and search the record in the webservice and should give some records in listview which they are matched
0
votes
1answer
15 views

Composite REST - INVALID_BATCH_REQUEST - Cannot access this resource in a batch request

(I was having an issue, it took me awhile to figure it out, and the Google search results and Salesforce documentation wasn't helping - so I'm posting this question, and the answer to my problem, so ...
0
votes
1answer
37 views

What is performance gain of using Composite API over Custom Apex REST API?

I want to know whether using Salesforce Composite API will give me any performance gain or not in my scenario. I am not expert in Salesforce and don't know much about Composite API. So, before I move ...
6
votes
0answers
86 views
+100

Payload for attributeGroups/{groupId}/attributeSetDefinitions MC API endpoint

I'm trying to figure out how to create Attribute Groups and link them to data extensions via the Marketing Cloud REST API (and SOAP API for data extensions, if needed). I managed to create an empty ...
0
votes
1answer
25 views

Problem with Rest Webservice Code coverage [duplicate]

I have the following set of lines in my code RestRequest req = RestContext.request; RestResponse res = RestContext.response; AreaRequestWrapper areaRequestRecord = (AreaRequestWrapper)...
1
vote
1answer
30 views

Need to get Knowledge Record Type (How To, FAQ, etc.) using REST API?

Here's what I did so far. I got the access token in Postman using the Connected App. I then send a request to /services/data/v47.0/support/knowledgeArticles Here I could only find groupLabels and ...
1
vote
1answer
24 views

Setting Data Privacy modes from Android MarketingCloud SDK

I need to be able to set one of 3 data protection modes from an Android client that uses the MarketingCloud SDK. I understand based on this that there is no way to do this via the SDK directly, and ...
0
votes
1answer
32 views

Update Content builder Email - using REST API

I was going through the trailhead and found this topic. REST API to UPDATE CONTENT builder email https://trailhead.salesforce.com/en/content/learn/modules/marketing-cloud-apis/use-rest-api-across-...
0
votes
1answer
41 views

How to subscribe platform events on external systems?

I have requirement to subscribe salesforce platform events in external systems(adobeConnect) and display event notifications. For that I have a trigger to publishing the platform events and I wrote a ...
0
votes
1answer
14 views

How to get the notifications in my External system(AdobeConnect) using salesforce change events or platform events?

I have a custom object called AdobeMeeting__c and platform event Meeting__e. If I did the changes in AdobeMeeting__c object,I need to push the notification to my external system(adobe connect). For ...
0
votes
0answers
16 views

How can I retrive the ProfilePasswordPolicies metadata using the Rest API?

currently, I'm using a website to collect data and then create a Salesforce Community User. For the Salesforce Community Profile, I specified the Password Policies in order to overwrite the Password ...
0
votes
1answer
29 views

Access token length differs when generated by code [closed]

I'm trying to integrate with MS Project Online. Following is the code to generate access token: public Map<String, Object> getResponse() { HTTPResponse httpRespone = this....
1
vote
1answer
28 views

SOQL Query With Running Tally or Running Totals

I have a Payments object with dates and corresponding payments. We can query the data via SOQL in our API and the data looks like this: SELECT Date, Amount FROM Payments WHERE CreatedDate>2019-01-...
2
votes
1answer
29 views

REST API - Using External ID field for traversing relationships

I've got an object CustomTable__c which has a lookup relationship Account__r to the Account object, and an External ID field ExternalId__c. I'm trying to use the API to get the Account record, given ...
1
vote
0answers
33 views

How to determine the Business Unit for the Journey from Custom Activity

Hello I've been digging through the internet on how I can retrieve or get the business unit of the currently running journey from the custom activity, basically I want to get the business unit from ...
0
votes
1answer
35 views

Not able to see client id and client secret in the connected app [duplicate]

I have created a connected app with below configuration in Salesforce Developer edition: But not able to see client id and client secret in the app. I tried opening the connected app through Setup->...
0
votes
1answer
18 views

Continuation not working for the endpoint which has Curly braces in it

I am using Continuation to make API calls from lightning component. And noticed that if endpoint contains Curly braces, callback method is not getting called and we get "Communication error, please ...
1
vote
1answer
28 views

Working with searches and query API. Executing a SOQL query using “IN” clause

select Id, Name from Contact where Email in ('apple+super@gmail.com','apple+100@gmail.com') Can anyone help me to query this using the salesforce query api endpoint. The endpoint that I have tried ...
0
votes
1answer
46 views

Unable to Query SetupAuditTrail Object

I am Unable to query "SetupAuditTrail" through Rest call. When I made "SELECT Id FROM SetupAuditTrail Where CreatedDate>2019-12-25T15:00:00Z"query, I got RESPONSE: Object type '...
0
votes
1answer
35 views

Leads aren't re-entering Journey, despite being updated

I'm using the REST API to send Leads to Salesforce. I have a Journey that reacts when new Leads get created or updated in Salesforce (i.e. Salesforce Data entry source). The only entry criteria is ...
-2
votes
1answer
32 views

How to use JSON generator to create object within array [closed]

I have one JSON format { "request": { "key": "NC", "msgId": "XXXXXX", "sourceSystem": "Salesforce", "targetSystem": "test", "objectName": "Notifcation", "payload": { ...
1
vote
2answers
59 views

Logging Solution for Force.com Public RESTful webservice

I've created a public site with a RESTful service mentioned in this blog, however this site uses Guest User License and I can't see any debug statements when this webservice is used by Postman. Is ...
0
votes
1answer
61 views

Unauthorized Access using Named Credentials [duplicate]

I am using Named Credentials oAuth2.0 protocol to connect with Xero. I have setup Auth. Provider and Named Credential. Named Credential is also authenticated. I have followed the steps mentioned here ...
2
votes
2answers
32 views

RestResource extracting array from JSON packet

I am currently receving a JSON packet from an external server and placing the values in variables for further use. The JSON packet has an array that can and will grow depending on the amount of assets ...
0
votes
0answers
51 views

How to access data extensions through rest/soap API

In our application we allow users to navigate to + select a Data Extension (including in a folder) and then we read the column names from it to help them map their data. This was originally ...
1
vote
0answers
44 views

uploading content (images) with the Salesforce Marketing Cloud REST API

How exactly do you create a new asset with the salesforce REST API? I've tried the following with no luck - does the content-type needs to be different? imageData is the base64 representation of a ...
0
votes
1answer
23 views

how we know which version to pass in the bulk API

I am integrating the SF via connected APP and I'm trying to do bulk query and i followed the document and got to know how to achieve. My question is, how can i know which version should i pass in the ...
3
votes
2answers
43 views

Retrieving a list of change events

I am trying to work on a task which will find all recent changes to any fields for an Opportunity within the system. It looks as if Change Data Capture takes care of this, but I'm struggling to ...
0
votes
2answers
49 views

How to pass JSON in Set.Body Using rest and method= Post in apex? [duplicate]

I want to pass JSON as request Body in rest API request call using the POST method. JSON:- { "product": { "title": "Burton Custom Freestyle 151", "body_html": "<strong>Good snowboard!...
0
votes
0answers
10 views

Importing pst file to salesforce with attachments

I have a PST file exported from outlook that i need to import to Salesforce with the corresponding attachments. I'm not able to find a solution for this. At the moment i'm exploring the use of the ...
0
votes
0answers
31 views

Email message from template not rendering content SFMC

I need to create a template based email using the Marketing Cloud REST API. From the documentation it seems straightforward and everything is working - the email message is created in the correct ...
0
votes
0answers
11 views

queuing batch controller which has Outbound calls to get record details from external appilcation

I am requesting external application from SF on daily basis to get records and sync. I have 5-10 custom objects in our environment. I have to make API calls individually to get all those records and ...
2
votes
1answer
47 views

Connecting to SF server from Postman fails

Trying to connect to Salesforce server using Postman, it was showing below error { "error": "invalid_grant", "error_description": "authentication failure" } Then tried all the options ...
1
vote
1answer
37 views

Receive and handle POST from external server outside of Salesforce [closed]

I am trying to accept a JSON payload that is supposed to create new assets in the Asset sObject. I'm trying to wrap my head around how to expose the API to the server that is sending the POST request. ...
2
votes
1answer
65 views

Journey, tracking subscribers in WAIT state

I have a question about Journeys, can I track subscribers that are in a state of WAIT inside a journey? I tried to track with Data View: Journey Activity but the column JourneyActivityObjectID is ...
0
votes
2answers
50 views

MC REST API for starting Automation

I am looking for REST API to start Automation. I see following endpoint with POST it helps to create Automation. Is there any REST endpoint to start Automation? I do see there are SOAP API available ...
0
votes
1answer
26 views

Deserialization using Apex class generated using JSON2Apex gives null for inner values

I have the following piece of code. @RestResource(urlMapping='/Update') global with sharing class OpportunityUpdate { @HttpPost global static void updateOpportunity() { RestRequest req = ...
1
vote
0answers
44 views

Setting a Scheduled Automation to Active with REST API

I can activate scheduled automations through soap but only if their schedule is not already configured. Does anyone know how to activate a scheduled automation through REST API? I think the "isActive" ...
1
vote
0answers
24 views

OCAPI request length restriction

if I send a PATCH request for a customer resource (.../customers/xyz) with the following data: {"birthday":"11.11.1980","email":"max@mustermann.de","first_name":"Max","last_name":"Mustermann","title":...