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.

1
vote
2answers
372 views

Rest Callout to External Resource, 401 Unauth Error, Cannot Set Api Key

I am having issues giving an API key to an external url for a rest callout. req.setHeader is where I attempt to do so. How should I structure this? I only get 401 unauth errors. I am trying to ...
1
vote
2answers
39 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 ...
2
votes
1answer
665 views

Get Instance Url with valid OAuth Access Token

How do I get the Instance URL with just a valid OAuth Access Token? I don't have any other information, for example, I don't have the client_id or client_secret. If I make an assumption that the ...
1
vote
1answer
353 views

Querying LeadStatus (including inactive)

It is trivial to retrieve all active LeadStatus values through the REST APIs, but I cannot see a way to pull in the inactive ones. SOQL query to retrieve active lead statuses: SELECT Id, ApiName ...
0
votes
3answers
179 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. ...
1
vote
0answers
19 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
25 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
35 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 ...
24
votes
6answers
5k views

Most API call efficient way to retrieve all attachment bodies

I need to download the binary body of all the attachments in my organization. I'd like to do so with the least amount of API calls. It is my understanding that the SOAP API returns a single attachment ...
0
votes
0answers
20 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
29 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 ...
1
vote
1answer
30 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 ...
0
votes
1answer
46 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 ...
3
votes
0answers
62 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: /...
1
vote
0answers
26 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
1answer
2k views

Salesforce REST API using Java

I am trying to make Connect Salesforce with Java using Rest Api. But I am getting authentication Error and status = 400 I followed the all the steps mentioned here : http://resources.docs.salesforce....
1
vote
2answers
156 views

Marketing Cloud - Multiple queries targeting the same data extension

It's a little disappointing that there is no way to track the status of a query, I guess there is a SOAP API for that but I am a REST/python guy. What happens when I start a query that overwrites a ...
4
votes
1answer
1k views

Live agent chat in bottom corner of page, not popup

We're implementing a Salesforce LiveAgent chat for a customer, and they want the chat to appear in the bottom right corner of the page, in a layer, not a popup. My question is: is this even possible ...
5
votes
0answers
81 views

Issue with receiving HTTP with Content-Type:application/x-www-form-urlencoded

I've faced a strange issue during my development related to the API. My goal was to create a web service that will receive POST requests from different sources. First service: It passes all the ...
1
vote
1answer
1k views

Uploading a file to Chatter - REST API

I'm trying to upload a file to Chatter files using the REST API but I'm getting the following error : Binary data included but file attachment information is missing. If providing rich JSON/XML ...
2
votes
1answer
857 views

How do you construct a REST API URI with multiple primary keys?

The documentation for upserting data extension rows by key uses this as an example URI: https://www.exacttargetapis.com/hub/v1/dataevents/key:SomeKey/rows/Email:someone@exacttarget.com. Let's say ...
0
votes
0answers
23 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 ...
0
votes
1answer
36 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/...
2
votes
0answers
26 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
0answers
30 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
45 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 ?
2
votes
1answer
142 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/...
2
votes
1answer
696 views

how to upload contact/lead profile image through REST API?

I have byte array data of user image and what is best way to upload contact/lead profile photo and what is the REST API for uploading the same. I have also social site photo url. is there any API to ...
0
votes
1answer
43 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 ...
2
votes
1answer
129 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 ...
1
vote
1answer
2k views

AMPScript for REST API call in landing page

I'm trying to call REST API to display a push message that is sent from Marketing Cloud in landing page. How do I call the API? I was able to get the Token using the client secret and ID but how to ...
0
votes
1answer
1k views

Approach for uploading, sending and receiving large files

What I need to achieve: Upload files (called as supporting documents) through Lightning Components Send these files to external system using REST API Receive updated/signed copy of the files from ...
0
votes
1answer
52 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 ...
1
vote
2answers
1k views

How to issue/send access token from apex page to connected app

We have implemented 2 OAuth flows between our app and SF where SF is auth provider - Web Server and Username and Password Now we have use case where user is signed on SF and has to invoke our ASMX ...
0
votes
0answers
48 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
25 views

How to List Jobs with the REST API?

My problem is that I can't list job postings from Sage People API. I managed to authorize my web application and get an access token. Now I only need to know the correct way to consume the API. What ...
0
votes
1answer
59 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
2answers
357 views

Any replacement of chatter API for Download URL e.g. “/services/data/v32.0/chatter/files/06917000000XXXXAAA/content?versionNumber=1”

I want to download the file or ContentDocument using non-chatter REST API. I have explored that we can download any ContentDocument or file by using following kind of chatter REST API (which is ...
0
votes
2answers
822 views

Journey Builder event fired via Rest API

I want to understand the behaviour of an event fired via REST api in journey builder. a. Each time while firing why i need to provide all the column values of the associated DE in data method, if ...
0
votes
1answer
222 views

Bulk API with PK-Chunking creates huge sets of batches when query is with where clause and subset of the records needs to be extracted

We have a Java API which uses Bulk API to extract records from an Object. The "select query" has a where clause, which should extract a subset of records, to honour the where clause, but we see that ...
1
vote
1answer
38 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
679 views

Uploading multiple files using REST API of Chatter.

I am trying to upload multiple files using Chatter REST API. I was previously able to upload a file. Now I have to upload multiple files. I got these file names and parameter names in array, as stated ...
4
votes
2answers
799 views

Storing 'date' attribute for ExactTarget subscribers

I've been trying to store 'Date' via API, but somehow it doesnt work I have created new field in profile management, called 'prospect_date' If I create new subscriber, pass all attributes via API ...
1
vote
2answers
1k views

Inserting attachment in REST API

I have a rest API that takes many different parameters. One will be a list of possible different attachments (images, pdf, etc.). They will come base64 encoded already. With that being said, what's ...
0
votes
1answer
52 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
46 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?
1
vote
1answer
855 views

Marketing Cloud REST API - Show List of Data Extension

is there any REST API request to get a list of all Data Extensions in my Business Unit?
4
votes
0answers
93 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 ...
4
votes
2answers
292 views

Assertions In A Mock Callout Test

Working on my first call out class. When a contact is created or has an email changed we need to make a call out to a third party service that verifies the email address. Everything is working excep ...
0
votes
0answers
28 views

Record not visible for Community users through Apex class

We have an Apex class which provides data for our mobile app(sdk not sf1) through an API. This app users are of community users. The Apex class used here is declared as Without Sharing but when users ...