Questions tagged [rest]

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

Filter by
Sorted by
Tagged with
4
votes
2answers
652 views

REST Vs SOAP API for Email Content Creation in ExactTarget

This might be a newbie question, but here it goes anyway The Web Service Guide talks about Creating Email content using Web Services API (http://help.exacttarget.com/en/technical_library/...
4
votes
1answer
520 views

Unable to get access_token from salesforce

I'm trying to get a nodeJS RestAPI service in place that should get and post data to and from a Salesforce org. However I can find a way to get my access_token from Salesforce. I've tried with ...
4
votes
2answers
1k views

Decrypting Salesforce Encrypted Fields

I'm storing user passwords for an external web service in salesforce, in encrypted fields. Using the SOAP API in JavaScript, I wish to use the password in a REST request. However, I'm unable to ...
4
votes
2answers
883 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
1k 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
2k views

REST OAuth connection for Bulk API queries

Is it possible to authenticate an OAuth app for the user and then make Bulk API queries on their behalf? The results are easily going to be more than 20k records each authenticated user. When I have ...
4
votes
3answers
8k 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
637 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
501 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
0answers
38 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
152 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
299 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 ...
4
votes
0answers
824 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
1answer
3k views

REST error handling design

I have created a very simple REST service to convert a lead: @RestResource(urlMapping='/ConvertLeadFromApp/*') global with sharing class RESTLeadConvertController { @HttpGet global static ...
3
votes
2answers
1k 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
7k 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
1answer
818 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
171 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
367 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
148 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
567 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
834 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
83 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
872 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
362 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
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
6k 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
560 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
685 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
481 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
43 views

REST API 12MB Limit

I'm receiving a PDF in Base64 from an external web service, the PDF is received in JSON along with some other details. Is there anything I can do to avoid the Heap size being blown when converting the ...
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
133 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
725 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
724 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
297 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
74 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
2answers
2k views

API for Validating OAuth Access Token

Here is my usecase, I have two apps, one written in rails and other is written in R. App written on rails acts as landing page. From there we can go in to app written in R. We are using Salesforce ...
3
votes
1answer
829 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
778 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