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]

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

4
votes
2answers
822 views

Describe call to sobjects with Tooling API fails

I am trying to make a describe call to CustomObject however I get no response back. The URL for the call is: Note : I am describing entity "CustomObject" (Similar to CustomTabs) - it is not a ...
4
votes
2answers
991 views

Multi-object create/update/delete? Use select SOAP APIs from REST client?

I have a client calling various SF REST APIs. So far so good. Unfortunately (and inexplicably in my opinion), object create, update, and delete operations can handle 1 object per REST API request, ...
4
votes
3answers
4k views

REST Api Debug logs

Does anyone know how to enable debug logs for code executed through a REST interface? I have a stream of data that comes into Salesforce, but it is a nightmare trying to debug it based solely on the ...
4
votes
2answers
1k views

ExactTarget: is there a REST API to add subscribers to a list?

I have successfully used the Python Fuel SDK to add subscribers to a list: https://github.com/ExactTarget/FuelSDK-Python/blob/77d9d16b51952fcb90564ae456a65794b56e1554/FuelSDK/client.py#L217 I would ...
4
votes
3answers
7k views

How to send authenticated REST request with Python

Complete noobie question here. I'm trying to access the REST API for ExactTarget to access Campaign data and open / clicks etc using Python I have installed the FuelSDK and can perform requests such ...
4
votes
1answer
627 views

@future invocation of REST service on same org - how to get accessToken?

I have a business requirement to attach a pdf document (visualforce rendered as pdf) to Notes and Attachments on a record when that record gets updated. Since we can't use getContentAsPDF() in the ...
4
votes
1answer
491 views

REST API: 18 Digits ID is not working but 15 Digit does

In rest if I, for a standard user, use "/services/data/v28.0/sobjects/User/"User ID"/Password" to check whether logged in user password is expired or not (testing in REST explorer Workbench). ...
4
votes
1answer
65 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
34 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
2answers
147 views

Does IOT Cloud have REST APIs? Or does it uses third party platforms to connect devices to cloud?

I am working on integration services for salesforce. Salesforce has APIs e.g. for creating Account, Contact, Lead etc., making it easy to develop integration services. Now I have been asked to ...
4
votes
0answers
810 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
2answers
825 views

How to publish/consume bulkified Platform Events

Use case: External system wants to publish Platform Events to Salesforce. Salesforce wants to consume the Platform Events in a bulkified manner The Platform Events doc offers this REST call: /...
3
votes
1answer
6k views

Malformed JSON: Expected '{' at the beginning of object?

I searched all over but not found the right one. My Body string below, [{"revokePermSetNames":["RemovPerm1","RemovPerm2"], "EmployeeNumber":"8507", "assignPermSetNames":["AddPerm1","AddPerm2"]}, ...
3
votes
2answers
3k views

converting string to Schema.SObjectField

I have created an API But struggling in converting String to Schema.SObjectField as If there is any possible way to cast string into Schema.SObjectField field type for example Account.example__c to ...
3
votes
1answer
795 views

How to specify BatchSize in Rest API SOQL call?

How to specify BatchSize in Rest API SOQL call, I tried it as per salesforce documentation and its not working ? Note - I know you can do this using offset, but I wanted to explore if its possible ...
3
votes
3answers
164 views

How to Break Down Object Data Type

This returns the Object in the debug logs: 'USER_DEBUG [21]|DEBUG|{amount=1825.73, currency=USD}' I really just want the price and could care less about the currency. How do I strip out just the ...
3
votes
1answer
340 views

Using HTTP Trace in Salesforce

According to documentation ,Salesforce supports HTTP trace request type. HTTP Trace Support Salesforce I was trying a callout HTTP trace method to get network details for debugging DNS issues. But Am ...
3
votes
2answers
146 views

Public REST Web service query

We are planning to develop a REST webservice for creating a lead in our org. This webservice should be accessible to all of our partners. We are planning the following Create a web service class ...
3
votes
2answers
564 views

Which Salesforce web APIs are available to Group Edition?

I've been writing a REST API-based service and testing on a Developer Edition org user and it's been working fine, but it stops working for a Salesforce user with a Group Edition org. I get this error:...
3
votes
2answers
790 views

Rest Call without using Connected App

We have a REST call that one of our systems is making to Salesforce but we do not have a Connected App set up. I cannot for my life figure out how to do this without a connected App that uses the ...
3
votes
1answer
77 views

How to consume a salesforce REST service?

I want to integrate two salesforce orgs using username-password flow. First I got access token, after that I'm trying to call another service which is located in the org. I'm getting following error. ...
3
votes
1answer
761 views

Get Asset via REST API with only a Account Id

Given a list of Account ID's, I want to get all assets associated with them. So far, I worked out I can get the account by calling : /services/data/v32.0/sobjects/Account/{accountId} Seems simply ...
3
votes
1answer
3k views

@InvocableMethod and @InvocableVariable in Salesforce

I am trying to learn about these two annotations that has been introduced as Spring 15 release. Can anyone please explain why and under what circumstances do we need to use these two annotations. An ...
3
votes
1answer
2k views

Sending a PDF from Salesforce through a REST call

How do I send a pdf through REST call out of Salesforce? Should we use sites? Any idea?
3
votes
1answer
148 views

How can I implement SalesForce custom RestAPI model binding?

When implementing rest api methods in Salesforce, I often have to write code like this: @HttpPost global static String CreateLead( String LastName, String Company, String Email, String Country, ...
3
votes
1answer
277 views

More detailed API statistics than The “API Usage last 7 days” report?

Recently had an API usage scare and found that the very loose "Day of the Week" column left a lot to the imagination about when that actual day starts. There is no documentation I've found that ...
3
votes
1answer
622 views

Custom Auth Provider usage for unattended OAuth flow

I am attempting to make a REST callout to an API in our company that uses ApiGee as the OAuth2 provider using a simple client credentials grant type. Open-ID is not enabled and will likely not be an ...
3
votes
1answer
1k views

Avoiding Recursion While Updating Trigger Records

I'm running into roadblocks everywhere with this particular task. My goal is simply to have a trigger do a GET request on an external REST API service, get some data, and update the lead currently ...
3
votes
2answers
5k views

How do I set a boolean value for a custom field? (Java REST)

All, I'm trying to create a Contact via the REST API - that works without issues if I don't include custom boolean fields in the request. However, my Contact object contains a pair of custom boolean ...
3
votes
1answer
535 views

Writing an HttpPost RestResource for multipart contentType

I've been able to write a simple HttpPost RestResource that would accept a Base64 string as one of the parameters and make an attachment out of it. But actually we want to use multipart instead of ...
3
votes
1answer
616 views

tried to login using the rest api but i get error 400

grant_type—Value must be password for this flow. client_id—Consumer key from the connected app definition. client_secret—Consumer secret from the connected app definition. username—End-user ...
3
votes
1answer
476 views

Developing a Realtime Integration pipeline between Salesforce to Salesforce

I plan to develop an integration pipeline between two salesforce dev orgs for the following use case. Use Case : Send a custom object record (having two string fields only) from Salesforce ...
3
votes
2answers
3k views

creating a REST API for an external service to call and create a new record in my salesforce

I am currently working on creating a REST API for an external service to call and create a new case object in my salesforce environment. This is the code I have created so far. However, due to my ...
3
votes
1answer
3k views

JSON.serialise give output with escape charater

I am doing this: JSON.serialize(payload); where payload is an object instance. and getting this: "{\"signup\":{\"salesforce_id\":\"003110022068XNz\",\"nationbuilder_id\":65536,\"last_name\":\"...
3
votes
1answer
1k views

Username-Password OAuth Authentication for community users?

I have a native ios app and i want to login using the username password flow, From the POC i made i discovered that for community user, i dont get a security token which i was using while REST call to ...
3
votes
1answer
127 views

Upload assets to Site.com via FTP or REST API?

I am using site.com to host a mini site which works fine. I need another delivery method other than manually uploading my .zip file to my site as an asset. I have found a way to expose an endpoint ...
3
votes
1answer
689 views

How to limit an access to specific REST endpoint?

Let's assume I have an REST ednpoint created: @RestResource(urlMapping='/CUSTOM_DATA/*') global with sharing class MY_CUSTOM_DATA Now I am going to create Connected App with Full Access scope, I ...
3
votes
1answer
697 views

Rest API says email is queued but never shows up in web frontend or sends email

I'm using the REST API to send emails and currently have five test emails. Two of these never go to a 'Queued' status in the Triggered Send definitions after hitting the API, despite getting a 202 ...
3
votes
1answer
1k views

Authorization header missing from RestRequest headers map

I have a publicly exposed web service (Rest Apex) through Sites and I'd like to do basic authentication which I will manage myself. I noticed that when I specify Authorization: Basic ...
3
votes
1answer
159 views

Custom OAuth Auth Provider

I have a Rest API Endpoint that I am looking to callout to. Something like this: https://myrestservice.com/service/logs When setting up the Named Credential, I set up the URL to: https://...
3
votes
2answers
71 views

@future callout from trigger doesn't seem to send data

I've got stuck with a simple problem. When an Opportunity is updated to "Closed" and "Won" I want to send some data to another system. So far I have: update trigger class handling HttpRequest and ...
3
votes
1answer
806 views

Include JSON string in JSON object

I have an Apex class similar to this: public class MyDTO { public SomeComplexObject data; public String reportRow; } Where the String reportRow contains a valid JSON String. The DTO object ...
3
votes
1answer
758 views

How can I call the SFDC REST API from somewhere outside of SFDC w/jquery?

I've been wrangling with this issue for a day or two so far and I'm not sure I have all the pieces I need to make it work. I'm marginally competent with jquery and OAUTH and all the other parts that ...
3
votes
1answer
1k views

ExactTarget REST API - Getting issues with /contacts/ and /campaigns/

I'm new with ExactTarget APIs, I'm using Php curl to request the ExactTarget REST API. Basically, I tried to create a contact: $array = array( 'contactKey' => 'test@test.fr', 'contactId' ...
3
votes
2answers
3k views

Delete list of object via REST API

Is there any way to delete a list of object via single request? I see a possibility to delete only one per request - Delete a Record
3
votes
1answer
150 views

Android REST Create Event

I am trying to create an Event on my salesforce Calendar. All I am receiving is a 400 error. Can anyone help me with what I am doing wrong or missing? Any help would be greatly appreciated. ...
3
votes
1answer
491 views

OAuth with Active Directory Single Sign On

I am writing a Java App that will integrate with Salesforce using OAUTH + REST. In normal circumstances without any single sign on everything is cool. But the same app might be used to work with ...
3
votes
0answers
67 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
212 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
134 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>{'...