Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
10 views

Authenticating REST Requests [on hold]

https://s3.amazonaws.com/doc/s3-developer-guide/RESTAuthentication.html I am trying to understand all the steps mentioned in the above document. At REST Authentication: Example 2 there is a line ...
0
votes
1answer
17 views

Calling salesforce API using java application returns 301

I tested the following code and is working perfectly on sandbox and returning the following: HTTP/1.1 200 OK Successful login instance URL: https://XXXX.salesforce.com access token/session ID: ...
0
votes
0answers
7 views

Pardot Interaction Report

I have a request to get the data that is currently in Pardot under reporting and the email interaction tab and add it to Campaigns in Salesforce. Pardot Email Reporting I have gone through all the ...
1
vote
0answers
24 views

PersonAssistantName field unavailable to API in Person Account

I have an Org with 'Person account' enable onto it and I am working with Salesforce API to create/update person account record. I am sending some data in 'PersonAssistantName' and getting an error in ...
0
votes
1answer
32 views

Please suggest a way to post to salesforce rest resource without using the username and password as the authentication

I'm trying to post to a Salesforce Rest Resource from a java console app. Currently I'm exposing it as a public resource via custom portals. I'm looking for suggestions for a way to implement the ...
0
votes
1answer
24 views

Rest API: The Requested Resource does not Exist

I am trying to get a Salesforce REST API Integeration to work and struggling quite a bit. I've got a successful authentication via OAuth that returns an access_token. I'm using that access token ...
0
votes
0answers
27 views

Test class For http Post

i wrote unit test code and got 52% code coverage and struck with following error: System.NullPointerException: Attempt to de-reference a null object. Please correct me where i wrong i am new tp ...
-1
votes
0answers
20 views

getting Insufficiant_Access while get call to user in sfdc

i am trying to get user details from get call via workbench.I dont understand the below issue Please suggest how can i resolve this error
-1
votes
0answers
17 views

Test Class For Http Post(Rest API) [duplicate]

I am new to Rest APi and don't know how to write Test Class for below code. @RestResource(urlMapping='/something/*') global with sharing class CreateXYZ { @HttpPost global static string ...
0
votes
0answers
26 views

Performing multiple operations on same record in same transaction [duplicate]

I am trying to do three operation using same record. First Operation: Set ContentDocument isArchived field to false. Second Operation: Grab contentdocument by calling REST API Endpoint. Third ...
2
votes
1answer
42 views

Enterprise Patterns for Consuming non-trivial REST services in Apex

Communication from Apex with huge REST Apis feels cumbersome to me as there is so much repetitive work involved with building Apex Objects that function as callout request params or responses. This ...
2
votes
1answer
29 views

Create and Link Document to multiple records using rest api

From the docs I've successfully been able to create a document in Salesforce using Inserting a New Document. I'd like to be able to link this document to multiple cases. From what I understand, it ...
2
votes
0answers
26 views

Is it possible to download archived contentversion or contentDocument

I am having a hard time downloading a contentversion/contentdocument where contentdocument is already archived. I am trying to download the file by hitting rest endpoint services/data/v44.0/...
0
votes
1answer
34 views

SSJS Post request error

I'm trying to delete contacts based on DE. So far I'm testing the code on cloud page but eventually, it will be used as part of automation. I'm successfully retrieving a token but struggle to execute ...
1
vote
2answers
25 views

How to incorporate Consumer id and consumer secret in my REST API (Apex class)

I have a requirement where some external web forms would be calling our REST API to submit Lead. I have created a connected app, got the consumer id and consumer secret. I want my apex class to be ...
0
votes
0answers
24 views

Salesforce to IBM DB2 Integration [on hold]

I am working on a requirement where I need to pull data from IBM db2 to Salesforce using the REST services. Has anyone tried it yet? I am not interested in the third party connectors.
0
votes
0answers
26 views

request signature does not match with the provided signature in execute-api service of AWS

String dateStamp = EncodingUtil.urlEncode( System.now().formatGmt('yyyyMMdd'), 'UTF-8'); System.debug('dateStamp>>' + dateStamp); String dateTimeStamp = EncodingUtil.urlEncode(System.now()....
-1
votes
0answers
49 views

Callout error to external system in salesforce Throws even after seperating the Callout and DML as per earlier questions [duplicate]

We have Trigger that calls a future web service class , which is inturn calls out external system. When the Account status is set to Active then the system callout the external ITSm system and ...
2
votes
0answers
34 views

Populate Owner in REST API Using external Id

I'm upserting a custom object via the REST api. How can I use the REST api to populate the record owner using an external id? See details below: Endpoint: /services/data/v42.0/sobjects/...
1
vote
1answer
49 views

New Transactional sending Email API Error 400: TriggeredSend definition not sendable due to definition status

I've created a new send definition OK with a status 201 : where URL parameter "status" = "Active"... When I check the response I can see that it is set to "New". When I try to post to "/messaging/v1/...
0
votes
2answers
44 views

Using REST to update Salesforce record from Salesforce

I am trying to update a Salesforce record but I have to update it using an older version of Salesforce API (v44) due to some new standard behavior changes salesforce made. I am doing this by making a ...
0
votes
1answer
23 views

Can multiple autorization_code co-exist for a single integration user?

I have a single integration User, which is used to authenticate a background integration job. This uses web-server flow. And to avoid storing username/password on the server, I have only supplied ...
1
vote
2answers
47 views

How to expose REST API to external users — how do they authenticate and authorize to create lead in Salesforce [on hold]

I am a bit confused. The requirement is that we need to create a REST API in Salesforce that has one POST method. Right now, I have been testing it with POSTMAN tool in 2 steps: Making a POST request ...
1
vote
2answers
34 views

What happens if I don't provide Time in Date/Time field

I am creating a Rest API. I have one DateTime field(one of the field for POST request). Wondering what happens if someone calls the API, makes the POST request and fills out just the Date part of the ...
1
vote
0answers
17 views

Specify a clientId during a REST api call in Salesforce

I am trying to make a REST api call from my node.js script to invoke a REST API in my Salesforce Org using OAuth.I wanted to track the Client from which the call was being made using the standard API ...
1
vote
1answer
22 views

Event Notification Service Webhook vs. API limit?

https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/createCallback.htm --> As far as I understood, the Notification Service triggers POST requests to the configured ...
0
votes
2answers
29 views

Salesforce Marketing Cloud API Get Data Extensions a ContactKey is in

A contact Key can be in multiple data extensions. I was wondering if there's a way to retrieve through the APIs all the data extensions a contact key is in? EDIT: We foresee our marketers creating ...
0
votes
3answers
78 views

How to send Post request to Rest API with XML data

I have created a rest API(apex class) in Salesforce. I have multiple nested tags in xml that comes via API request. I am wondering how do I define my post method in apex that could handle the request. ...
0
votes
1answer
27 views

Incremental callouts

I have a rest webservice that returns a limited number of accounts for each call. How can I make incremental calls to receive all accounts and save them on Salesforce? For example at the first call I ...
0
votes
0answers
15 views

SOAP DuplicateRuleHeader allowSave Duplicate Request Body

After researching, it appears that the SalesForce REST API unfortunately doesn't have an equivalent allowSave option for overriding duplicates that the SOAP API has. I'm writing a Python client that ...
0
votes
1answer
15 views

Can I send data to Salesforce Analytics / Einstein as JSON and not CSV?

The Salesforce Analytics / Einstein API documentation says that in order to upload actual data to the datasets you need to prepare CSV files and JSON is used only for metadata. Is there any way to ...
3
votes
0answers
31 views

AuraError: Error at new Aura.externalLibraries

Background I am using this approach Call REST API from Lightning Components without Named Credentials to call the Salesforce REST API from a Lightning component. It works when I call this URL: /...
0
votes
1answer
43 views

Variable not defined on Data Extension but able to print it in content

For parsing variables for the respective values on the email content html blocks, I usually have 2 kinds of variables. The first case. The variable is defined on the sendable Data Extension. The ...
1
vote
0answers
14 views

ERR 596 SERVICE_NOT_AVAILABLE at ETClient()

I have a very basic Installed Package, with an API Integration component... ...and a very simple connection test... public void TestConnection() { ETClient client = new ETClient(); ...
0
votes
0answers
22 views

send mass emails from Salesforce using personal emails

We have users who will trigger mass emails to generated leads, child users as a part of their campaign. Till date, it is done using google and we are planning to remove gsuite from our system. When we ...
2
votes
0answers
25 views

Status=Unauthorized, StatusCode=401 when accessing the Tooling REST API [duplicate]

I am getting this HTTP error: Status=Unauthorized, StatusCode=401 When I try and access the Tooling REST API from an Lightning component Apex controller being used inside Salesforce, running as ...
0
votes
1answer
32 views

Apex call-out 404 not found error on Developer console while it works perfectly when the request is sent through postman

This is the request, I've added the URL to named credentials. What am I doing wrong!! Http http = new Http(); HttpRequest request = new HttpRequest(); request.setEndpoint('Callout:AppointmentTest/...
0
votes
0answers
18 views

JSforce bulk api version 2

I'm trying to use the bulk api from jsforce in nodejs using the methods mentioned here. When running this, I'm noticing that its creating a job with BulkV1. Is there a jsforce library that supports ...
0
votes
2answers
42 views

Can anybody tell me on which org I have to create connected app?

I want to integrate two salesforce org so that I can show the data of source org in the target org via VF page. Please tell me on which org should I create connected app, source org and target org ?
4
votes
1answer
73 views

Create or update Automation with Marketing Cloud REST API new endpoint

there is an endpoint to retrieve automation using Rest API with OAuth2 token and GET method: https://{{tenant}}.rest.marketingcloudapis.com/automation/v1/automations/{{id}} In the response you will ...
0
votes
1answer
41 views

How to Retrieve large data from Salesforce using Rest API?

I have one new requirement where My client wants to retrieve large data set (~80K records) from Salesforce daily. I have created rest web service but it returns only 2k records. for 80k records, do ...
0
votes
1answer
44 views

External Database to Salesforce Integration Steps

I am working on an Integration project. The communication is between an external database and Salesforce. The Goal is - To Send a request from Salesforce to the external Database -Get the response ...
2
votes
1answer
86 views

Connect to Salesforce production REST API from Sandbox using Named Credentials

Background I would like to connect to the REST API of a production org, from a sandbox org. Configuration so far: Production Org has a Connected App Sandbox Org has a Auth. Provider Sandbox Org has ...
2
votes
1answer
66 views

Salesforce REST API: Session expired or invalid: INVALID_SESSION_ID

Background I am trying to access the Salesforce Reporting REST API. public with sharing class SalesforceReportApi { private final static String REPORTS_RESOURCE = '/services/data/v44.0/...
0
votes
0answers
41 views

First REST API Call for the day taking more than 40 seconds

We have exposed a custom rest webservice to perform dml operation on Case. We have a custom metadata where we fetch for a particular record based on the request parameter and populate the values for ...
0
votes
1answer
55 views

How to elegantly handle asynchronous pushes from Salesforce to external system via a REST API [closed]

The key word in the question is elegantly; I'm an experienced developer familiar with the mechanics of asynchronous programming, REST APIs, database triggers, programming idioms and design patterns. ...
1
vote
1answer
35 views

ui-api within a composite api

I'm looking on an approach to create a ui-api request within a composite api request and its always returning me a response as "The requested resource does not exist". Following is a simple GET ...
0
votes
1answer
45 views

Possible to retrieve data from data extension using soap?

I've done a bit of research and turns out it is possible to retrieve data from Data Extension with SOAP but not with REST. So far I've only seen examples of importing data to Data Extension but not ...
0
votes
1answer
33 views

Marketing Cloud - Create Data Extension (Rest API) [closed]

Is possible to create a Data Extension in Marketing Cloud using Rest API? if yes, can provide one example?
4
votes
0answers
76 views

Making concurrent REST API requests to Marketing Cloud

I'm trying to understand how rate limiting works for REST API calls. I was informed that it's based on the number of concurrent requests, which I can live with, but I can't figure out what the ...