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
2answers
711 views

Callout to SAP from Salesforce using REST API

I am trying to pass a json data to an external URL. With a basic knowledge, I have added them to remote site settings. The sample URL is http://xyz-xyz.sap.xx.com:50000/xyz/xyz. I have created an apex ...
-1
votes
0answers
19 views

I am getting the Error 400 Not a multipart request

I am struggling from last week and getting same error please help me I am trying to upload pdf on the third party system I am using session id and URL to upload to PDF, It is working fine on Postman ...
2
votes
0answers
44 views

Multipart form data uploads only the first file when using HttpFormBuilder ( try with given RestEndpoint and Anonymous Apex)

I am using the same solution as Daniel provided : When I use the below method to upload file, one by one, it works fine, jpg, pdf, docx anything. But when I try to upload multiple files using the ...
0
votes
1answer
24 views

You have uncommitted work pending. Please commit or rollback before calling out. Apex Batch

I have a little problem with my batch: List<String> idList; public My_Batch(List<String> ocIdList) { idList= ocIdList; } global Database.QueryLocator start(Database.BatchableContext ...
0
votes
0answers
23 views

Enhanced External Services and a REST API that wants header parameters

External REST API with its OpenAPI definition: "paths":{ "/":{ "post":{ "summary":"Sends phone number for validation", "description":"", "...
2
votes
1answer
589 views

How to return full report (>2000 rows) using rest api?

I am unable to fetch a full report using the Salesforce REST analytics API. As was posted on another question, I am using the following solution(python): reportFilter = { "reportMetadata": {"...
0
votes
0answers
20 views

Salesforce to Telegram integration [closed]

I am trying to integrate Salesforce to Telegram API. As I go through some of the blogs. I found that there is a BOT APT through which we can achieve that. But I am stuck how to add someone in a ...
-1
votes
0answers
15 views

org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! byte Ef in state 2

I am Uploading Pdf file please help me, I am getting the error org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! byte Ef in state 2** public static void uploadFile(Blob ...
2
votes
2answers
2k views

Salesforce Lightning: How can i get session Id of current user in Salesforce lightning component?

I have a requirement to call REST API from Salesforce lightning component, for that i need to have session id of that user while requesting a REST service. But, in current version (Summer 18) of ...
2
votes
1answer
510 views

Error calling a custom Rest API in Salesforce

I am facing a weird issue and was wondering if anyone had faced this error. Here are the details: I have written a Custom Rest Service in my Salesforce Sandbox org named CustomAccountService which ...
2
votes
1answer
509 views

Expose Site context via REST with Community Guest User Access

Having a community site and planning to build mobile apps. Is it possible to have the guest user authentication from a mobile client? Below are the concern. Community user registration need to be ...
0
votes
0answers
15 views

How to get the complete forecast information using REST API? [closed]

I have followed the reference "https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_forecasting.htm" to get the complete forecast information. But I am not ...
1
vote
1answer
42 views

How to create multiple contacts with account's external id using standard REST API?

I need to create multiple contacts in single REST call with account's external id using standard REST API I'm able to create contact with account external id using below rest URL but it does not ...
1
vote
0answers
27 views

Forgot Password Interstitial Page

I am facing the following problem, which may be a result of my misunderstanding of the whole concept. Let my try to explain. We use one community. The community users have in their profile the flag ...
2
votes
2answers
621 views

refresh token not update access token

I have a trouble between integration with SalesForce and our's service. We are using oauth2 authorization and SalesForce REST API. Our clients authorize successfully for the first time and get the ...
-2
votes
0answers
57 views

respSystem.HttpResponse[Status=Unauthorized, StatusCode=401] [closed]

Hello I am tring to upload attachment in a website using apex rest I am using session id and url to upload this. This is working fine in postman with sam sessionid and end point URL But not working ...
0
votes
2answers
24 views

Re Purpose Connected App and API Only User

An External App, lets call it App A makes a REST API call to Salesforce for Candidate Account. (Account: RecordTYpe = Candidate) I have - Create a Connected App 'External App A', Created an Apex ...
0
votes
1answer
30 views

Can't create assets outside parent folder via Fuel SDK

I'm trying to create assets using the Marketing Cloud PHP Fuel SDK, and I'm running into a problem where the assets are being created (as in, I can retrieve a list of assets and see the assets I've ...
0
votes
0answers
10 views

Update Quip - Spread sheet drop down list values through API [closed]

I am trying to automatically populate a drop down list through rest api . Looks like quip only accepts single entity instead of a list . I was able to update a row drop down cell through a quip api ...
3
votes
2answers
619 views

BULK API cURL commands to GET 100k records from Account

curl "https://xxx.salesforce.com/services/data/v35.0/query/?q=SELECT+Id,+Name,+Phone+FROM+Account" -H "Authorization: Bearer <access token> " But this only fetching 2000 records. I need all ...
0
votes
2answers
1k views

Bulk Query with PK Chunking enabled sometimes does not return all the batches

The requirement is to use Bulk Query API with PK Chunking enabled, and to create CVS files for each batch with the chunk-size For example, in the Account Object if I have 80,000 records, and have the "...
0
votes
1answer
20 views

can i call my apex class by just the url

Here is my ( i have tested with workbench and it does work) URL to call : /services/apexrest/ContactUpdatetService.SetContactInactive my json: { "contactId":"1234", } Can I just call it by doing ...
1
vote
1answer
598 views

Is there any documentation for www.exacttargetapis.com/messaging/v1 REST API

I'm trying to send Content Builder emails via the REST API and the best option looks like the 'www.exacttargetapis.com/messaging/v1' endpoint. But there is little documentation on the API web site for ...
1
vote
1answer
32 views

Apex REST does not support multipart/form-data requests

From salesforce I Need to expose a webservice to accept pdf/txt files from Mule and once I receive I need to store in Salesforce as an Attachment. However, from Postman while trying to hit as below I ...
0
votes
0answers
18 views

Quip spread sheet data validation automation [closed]

I am trying to populate quip spreadsheet data validation through rest API . I was successful at updating a cell but not one with data validation. Does any one have any suggestions?
1
vote
2answers
3k views

Using Python to send POST request with REST API on Wave Analytics

this is a follow on from this question Something is wrong with my saqlquery string variable I am passing as 'data' to the api. The below code is returning the response {"errorCode":"118","message":...
1
vote
1answer
936 views

Upserts a data extension row using Rest Api

When I am try to insert data into a data extension using REST API I'm getting an error. Api Doc: https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/...
0
votes
0answers
18 views

I cant able to get more code coverage cant able to parse json deserilalize code [duplicate]

I am inserting multiple invoice and invoice items at using post web service REST API Bulkinsert_InvoiceInvoiceitems class @RestResource(urlMapping='/InsertInvoiceandInvoiceitems/*') global ...
7
votes
1answer
7k views

Test class Rest Webservice parameters

I´m having problems with url parameters (req.requestURI) in my test class. This is my code. REST CLASS: @RestResource(urlMapping='/Accounts/*') global class StoreController { @HttpGet ...
3
votes
1answer
436 views

Error 500 when using Live Agent REST API with prechatDetails

Hello I am developing an iOS app allowing to chat with a service agent using live agent. The app is using Live Agent REST API. Everything was working fine till I added prechatDetails to the ...
3
votes
1answer
546 views

No read access to ProfileId for a User over the REST API

We've been looking up ProfileId from a given user that has OAuth-ed already. Normally they're returning the Id correctly when we call this: /services/data/v28.0/sobjects/User/THEIR_USER_ID However,...
0
votes
3answers
420 views

How to write SOSL IN query

I've following SOQL query - SELECT Id, Name, Email, Account.Id, Account.Name FROM Contact WHERE Email in :emails Here emails is a comma separated list of email ids. Can I write the same query in ...
0
votes
0answers
9 views

How to download the image behind a DocumentId from a soup's property using the iOS mobile SDK

I have to download the image which is represented as a DocumentId property in a soup. I'm very confused about the different ways which worked in the past but maybe will no longer work today. I was ...
0
votes
1answer
28 views

How to pull data from SQL Server 2016 to Salesforce [closed]

Basically I need to fetch data from SQL Server 2016 and insert fetched data into salesforce. Can we do it by writing Salesforce REST API or Web Services API without using any third party tools or ...
0
votes
0answers
25 views

Update Vote of KnowledgeArticle With API

I have come up with a specific requirement, wherein I need to update the vote(Like/Dislike) of the guest user on the knowledgearticle published in salesforce from any API. I researched and found ...
2
votes
1answer
510 views

REST API: create dependent picklist values

I am aware that it is possible to create dependent picklist values using the Metadata API but I want to use the REST API. I know how to create triggers, classes, and pages but I can't wrap my head ...
0
votes
2answers
395 views

Create Subscriber in Exact Target from External Salesforce Org

We have a simple requirement of creating a subscriber in an Exact Target Org from an external Salesforce Org. The requirement is on webpage on click of a sign-up button the user email id will be used ...
1
vote
0answers
16 views

How to automate sending DocuSignenvelope [closed]

In Our Org, DocuSign is being used to send documents for esignature related to an Opportunity. Currently, the users have to manually do the following steps which need to be automated for which I need ...
2
votes
1answer
642 views

Retrieve Security Token via APEX or a better way?

We have developed a portal accessed by users who use our product - a desktop application. In addition to what our desktop app does, it needs to make API calls directly to Salesforce, authenticated as ...
1
vote
1answer
516 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 ...
2
votes
1answer
612 views

Pardot API and custom fields in email templates

I'm using the Pardot REST API to send emails documented here: http://developer.pardot.com/kb/api-version-4/emails/#sending-one-to-one-emails It's all great but I would like to set custom fields in ...
7
votes
1answer
120 views

Can API access be limited to only via Apex classes?

We are building a product that offers two routes to the back-end data: JSON calls to @RestResource Apex class APIs LWC calls to @AuraEnabled Apex classes Is there a profile setup that keeps these ...
4
votes
1answer
391 views

possible to access REST API of another SF instance with portal user from scheduled class?

I have a scenario where I'd like a user of another SF instance to register in our portal, then have a scheduled class on their end reach out to a REST endpoint on our end. Upon reviewing the oAuth ...
1
vote
1answer
625 views

Live Agent Chat Rest API Issue

I have enabled the live agent in sandbox1 and I'm trying to invoke the same from sandbox2 using the Live Agent Chat REST API using the jquery in visual force page.But I'm receiving some errors. <...
1
vote
2answers
34 views

Is there a way to pass parameters other than sObject fields for inserting record in Salesforce Standard REST API?

I am looking for a way to pass key-value in salesforce rest API payload for inserting a record. By using below rest API. /services/data/v47.0/sobjects/Account/ And access those key-value pairs in ...
0
votes
2answers
71 views

Title attribute of <a> in FeedItem is replaced by null

I posted several FeedItems using Salesforce Rest API but the title attribute of <a> tags in rich texts were not working correctly for me. For instance, POST /sobjects/FeedItem/ { "...
2
votes
0answers
40 views

Duplicate management: Insert Account Id of duplicate record in API REST Response

I'm planning to integrate an external website with Salesforce. In Salesforce I used Matching and Duplicate rules in order to block the creation of new duplicated PersonAccount and those rules work ...
0
votes
1answer
29 views

Salesforce Data Extension POST/PUT Data Using JSON

I tried to POST method to create a new record in salesforce data extension. I am using following method POST /data/v1/async/dataextensions/key:MYEXTERNALKEY/rows In header I am passing content-...
1
vote
0answers
401 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 ...
1
vote
2answers
5k views

How to fire Journey API Entry event through AMPscript?

I need to trigger a Double Opt-In Journey process instantly after a Marketing Cloud Landingpage form submit (Smart Capture cannot be used). I'm aware that I could save data in a DE an run an ...

1
2 3 4 5
52