Stack Exchange Network

Stack Exchange network consists of 174 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]

The REST API provides a powerful, convenient, and simple Web services API for interacting with Force.com.

4
votes
0answers
50 views

Message sent through Marketing Cloud isn't delivered and doesn't show up on the deliveries endpoint, what can it be?

I'm making a call to Marketing Cloud's endpoint to send SMS messages like this: -- request to /sms/v1/messageContact/{messageId}/send { "mobileNumbers": [ "55009999999999" ], "...
4
votes
0answers
26 views

When does 'If-Unmodified-Since' header prevent DML operations for custom Apex Rest?

I have a custom Apex REST class that accepts a POST request and updates a custom object associated with the request. The inbound POST request contains an 'If-Unmodified-Since' header with the time it ...
4
votes
0answers
805 views

REST API Query Timeout Expected

Having recently completed an integration with salesforce using the REST API we've come across an interesting feature. All the documentation I could find suggests that we should get a QUERY_TIMEOUT ...
3
votes
0answers
39 views

Unsubscribe MobilePush Contacts with Automation

I need to unsubscribe multiple Contacts from Push Messages with the help of external attributes. It is to be done within an Automation. The only way I see I can do this is the following: Get ...
3
votes
0answers
182 views

Another STRING_TOO_LONG problem, HTML text into a rich text area

I have a custom object with a rich text field, max size 131,072. Using the force.com REST API, attempting to add an entry with text size larger than about 63,700 characters (I have not pinpointed the ...
3
votes
0answers
121 views

why extra string append with the REST request?

I am trying to send this data to another salesforce org REST endpoint. map<string,Set<string>> mp = new map<string,Set<string>>() ; mp.put('Data1',new set<String>{'...
3
votes
0answers
189 views

Deploy Apex Class to another Salesforce ORG via Metadata API?

So I've been looking around to see if there is a way to push Apex Classes via the Metadata API, and I'm a little confused at the documentation. I've used the Eclipse plugin before, so I know that you ...
3
votes
0answers
121 views

Performance issue when offset used in SAQL

I am using the endpoint data/v35.0/wave/query to execute a SAQL query. When I execute the below SAQL which does not contain offset, I am getting the response approzimately in 1 secs load \"xxxx/xxxx\...
3
votes
0answers
601 views

Send PDF from Salesforce to EchoSign through Apex REST and EchoSign REST API?

How to send PDF generated from VF page to EchoSign through Apex Code and REST API of EchoSign? I'm getting error as "Content Type not Supported/ UNSUPPORTED_MEDIA_TYPE". Any idea? String ...
3
votes
0answers
424 views

Login Service Cloud user through the REST API

I am building a web portal for the SalesForce Service Cloud using the REST API (PHP/WordPress Project). I need Service Cloud users to be able to login to the site through the API without being ...
2
votes
0answers
96 views

How do I access a Rest endpoint on a scratch org?

I've set up a connected app and a rest endpoint on a scratch org but can't access it through either the workbench, Postman or client code. I get the following error in each case: 404 Not Found ...
2
votes
0answers
32 views

Cannot insert Contact with REST API if a Lead with the same e-mail address exists

I noticed in the UI that when I try to insert a contact with an e-mail address that a lead already has, I get a warning (before I click save and insert the contact) saying that this is a possible ...
2
votes
0answers
155 views

REST API - Issue connecting JS app when CORS and Remote Site are both setup properly

I cannot connect to Salesforce to automatically create accounts from my javascript app. I continue to get the error: "Failed to load https://login.salesforce.com/services/oauth2/token: No 'Access-...
2
votes
0answers
229 views

Is there a way to create an OpenAPI / Swagger spec for my Salesforce Account?

I've been using the Saleforce REST API for a while and I'm interested in using an OpenAPI / Swagger spec to auto-generate a SDK using OpenAPI Generator and Swagger Codegen. Is there a way to get an ...
2
votes
0answers
135 views

Bug? FieldDefinition is Createable via Tooling API

I found this question very interesting: Programmatically Determine Which Objects Allow Lookup References to Them? In my naiveté, I thought perhaps this question could be answered by using the Tooling ...
2
votes
0answers
207 views

Create a Report using Salesforce SOAP or REST API

I know about Salesforce Reports and Dashboards REST API. But Report REST API allows only to change (update) an existing report by sending PATCH request with appropriate json body and clone a report ...
2
votes
0answers
30 views

Case Closed Layout REST API

Anyone our there know if there is any way of retrieving the Case Closed Layout details using REST APi at all?! My googling skills are not coming up with any trumps here
2
votes
0answers
337 views

Connect to external HTTPS REST API

I'm looking for a solution how to connect to external API with Salesforce. The API I want to connect with is a HTTPS url, with some parameters. (https://www.url.com?param=...) Here is the code I ...
2
votes
0answers
784 views

How to pass the parameters from one salesforce org to another salesforce org?

VF Page <apex:page controller="Apex_Rest_DemoController"> <apex:form > <apex:pageBlock > <apex:pageBlockButtons > <apex:commandButton value="Create ...
2
votes
0answers
79 views

Using the REST API, how can I tell that a user has blocked OAuth access vs revoked OAuth access?

It seems that I get the same authentication error message the token is invalid. Is there a way I can tell the difference as the vendor? Note that I am not referring to an Apex app. My app is purely ...
1
vote
0answers
56 views

HTTP patch not supported as a method

I am trying to integrate with a third party service, while trying to make a http request , i want to send PATCH as a method,I have looked for two solutions mentioned here in this questionHow can I ...
1
vote
0answers
37 views

How can I update a User Record from a custom AuthProviderPlugin's getUserInfo() method?

I am trying to integrate Salesforce with Jira using a Named Credential and oAuth 2.0. The Named Credential requires a Custom Auth. Provider which requires an AuthProviderPluginClass. The ...
1
vote
0answers
142 views

sObject Collections - Update Multiple Records via REST using PATCH - Bad Request 400

I am trying to use the Salesforce sObject Collections REST API resource that was released in Spring '18. Per the Salesforce Documentation, this should be a PATCH request, however when I try to call ...
1
vote
0answers
71 views

Retrieve the list of tracking on a Data Extension via REST

I'm trying to make an API call to, if possible, have the JobID of all sends done on this Data Extension. Is there a way to get the list of tracking on a data extension via REST API ? When you are on ...
1
vote
0answers
84 views

Using REST API to Upsert a Child record onto a Parent record using the Parent's external ID

Error Lead: id value of incorrect type: EMAIL_HERE Code $body = [ 'Name' => 'Survey', 'Lead__r:MySQL_Email__c' => 'EMAIL_HERE' ]; $result = Forrest::sobjects('...
1
vote
0answers
124 views

SFMC Custom Activity - Save, Publish, Validate, and Execute not firing

I'm currently having some issues getting the Publish, Save, Validate, and Execute event to come back to my Custom Activity. I've tried looking at a few different answers for similar issues, but they ...
1
vote
0answers
324 views

Problems with deserializing JSON to class

I have created a parser class to parse some JSON into an object. This is accessible as a REST based service. This is the class I parse to: global class statParser { global class Request { ...
1
vote
0answers
352 views

REST API Keep Alive

The first time the rest api, is hit it takes between 15 to 20 seconds to get a reply. Is there any way to keep the api alive, because if I hit it a second time it takes between 2 - 4 seconds.This is ...
1
vote
0answers
40 views

Writing a REST web service that creates new record and attachments from form on company website

I have been reading around all kinds of documentation and posts and haven't been able to wrap my head around what I need to accomplish my goal. What I am trying to achieve is to write a custom Apex ...
1
vote
0answers
62 views

REST (GET) Service fails on certain Encrypted IDs

I have the following REST service that allows you to return data based off an ID. These ID's are encrypted from a external system we control, and when I call it through workbench using 2 different ID'...
1
vote
0answers
167 views

How to change developerName of Dashboard and Report using an existing Salesforce SOAP or REST API?

I tried to save dashboard and report via Salesforce Reports and Dashboards REST API and it works, but when I change developerName in the request body and send this request, in the response I got a ...
1
vote
0answers
290 views

SOQL over REST: “Truncated”, “Malformed query” depending on which record IDs I ask for

The following query, when run over the REST API, gives me an error: SELECT Id WhatId, WhoId , TaskWhoIds , Subject, ActivityDate, Status, Priority, Owner.Name, ...
1
vote
0answers
40 views

Fetch Data of Different Organization?

I have 2 Orgs- Org A & Org B both are ap1 Instance In Org A I've created a Connected app In Org B I am trying to Query accounts of Org A From the Connected App Through Http Call, but I am ...
1
vote
0answers
86 views

Bad request error and Case field data formats

I am quite new to Salesforce development. I am working on Laravel project that sends data collected from the users to Salesforce using Salesforce's REST API. The data collected from the users ...
1
vote
0answers
379 views

Anonymous access to REST API - without using Sites?

I'm looking for a way to enable public/anonymous access to my REST API developed using APEX without using Sites. The reason for this is that Sites is only available in Enterprise and not in ...
1
vote
0answers
73 views

Hitting system limits with my testClass

I have two classes. One exposed as a REST service. Lets call this class "thefeeder". This class calls another class which implements Queueable interface. Lets call this class "theQueue". I wrote a ...
1
vote
0answers
452 views

Error: Destination URL not reset. The URL returned from login must be set

I am trying use a REST service by sending a GET HttpRequest to a REST @HttpGet method to retrieve some VisualForce pages and attach them as pdfs to a given record id. I have added the URL of my ...
1
vote
0answers
41 views

Can we retrieve the subscribers of an SMS opt-in message?

I can create an SMS opt-in message with the REST API. But I can't find any endpoint where I can retrieve all the numbers that have subscribed to the opt-in message. Do we have that feature somewhere ...
1
vote
0answers
187 views

JSON Deserialization Array

I need help parsing the completedetails array from below JSON object and store it in a lead object Below is the sample JSON Object {     "request": {         "Details": { ...
1
vote
0answers
274 views

Get ExactTarget accessToken from Salesforce callout

I am trying to obtain the exacttarget accessTokem from a HTTP POST to 'https://auth.exacttargetapis.com/v1/requestToken I always recieve this response -> {"message":"Unauthorized","errorcode":1,"...
1
vote
0answers
105 views

Rest API - Duplicate products and partners are added to opportunities

I'm trying to add 2 products and 2 partners to an existing opportunity through REST API. Even though both products and partners are different, they have the same name and product code in SFDC. ...
1
vote
0answers
177 views

Call external REST web service using Javascript

I have a custom object AccountNotes__c and a curstom field URL. When I save a new Note I have to check for the valid URL by calling external REST webservice and once it is valid data, the record has ...
1
vote
0answers
4k views

400 Bad Request on RestTemplate POST request to Salesforce Oauth

I am trying to send a POST request to https://test.salesforce.com/services/oauth2/token to retrieve the oauth access token. The response is 400 Bad Request with no info. Here's the (Java) client code: ...
1
vote
0answers
122 views

Validation Rules and the REST API

I'm testing the REST API using workbench on an object that has many validation rules. Why is is that the REST API only returns a single error, instead of an array? If this were in a normal visualforce ...
1
vote
0answers
542 views

Calling Rest Api(Hosted in salesforce) from MuleSoft

In one of my implementation I need to call a Rest base webservice (which is developed in salesforce) from Mulesoft.I am able to call other Rest URI (eg.Yahoo etc) but when I am trying to call ...
1
vote
0answers
365 views

Apex REST CORS request

I'm getting an error upon calling my REST endpoint from a visualforce page with Angular. My error is this: XMLHttpRequest cannot load https://... A wildcard '*' cannot be used in the 'Access-...
1
vote
0answers
155 views

Inbound REST integration web service

I want to get leads which is getting cerated on a another server, when every time it get created. Eg : In broadbean when the new person register i wan to save the information of the register person to ...
1
vote
0answers
1k views

Insert Trigger not firing when creating record by REST API

I Have (after insert, after update) trigger on Account sObject. When I manually inserting or updating Account trigger fires, also when I updating existing Account via REST API request it fires too. ...
1
vote
0answers
5k views

Create and insert new document into specific folder via (sfdc) REST API?

In order to create a new document and insert it to a specific folder via API, must I specify the folder in Database.insert (doc); method? I am getting a missing required fields error when testing ...
1
vote
0answers
343 views

Authentication with google calender api

have been trying to integrate google calender api with salesforce was able to achieved it using auth 2.0 ,has i navigated it to google page for auth ,so now when i was trying to use auth 1.0 with ...