The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
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
1answer
190 views

Calling Chatter API with in salesforce“INVALID_SESSION_ID”

I am trying to call a chatter API with in salesforce and i am getting the below error message. Error Message: DEBUG|[{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}] Code: ...
2
votes
0answers
451 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
138 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\...
2
votes
1answer
930 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 ...
2
votes
0answers
827 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
1answer
713 views

How to access force.com Rest Api from Site.com? [duplicate]

I need to call an authenticated Apex Rest API from Site.com page. The way I am trying is using Username-Password Oauth authorization flow, to get access token. Below is the javascript code I am ...
2
votes
1answer
496 views

Error doing callout to a site with GoDaddy certificate

When we try to send some data to an external web service (REST, POST, JSON), we get the next error: System.CalloutException: sun.security.validator.ValidatorException: PKIX path building failed: ...
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 ...
2
votes
1answer
5k views

400 Bad Request in Response

I have been using working on an Applicaion in angularjs, and While getting response of 2nd request for the token, I am getting following an error. Illegal Request You have sent us an Illegal URL or ...
2
votes
2answers
701 views

Salesforce rest query “join”

So I would like to know if a domain is in three or more tables Normally I would do something like this to get one row SELECT c.Email, a.Website, l.Email as leadEmail FROM Contact as c ...
1
vote
2answers
62 views

HttpResponse[Status=BAD_REQUEST, StatusCode=400]

I'm trying to sending a field value to third part but here the issue is Suppose the filed is Name = "Test Account" here in this case call will be failed but for suppose Field Name is like Name = ...
1
vote
1answer
362 views

Rest uri using Workbench

How can i create a child record in Rest URI. For example how can I create a Contact for Account using Rest URI in Workbench. Your help is much appreciated.
1
vote
1answer
6k views

JSON Parsing of REST response

I am trying to integrate our Salesforce with Yodlee. I have been successfully able to send and recieve REST response to their test server. My issue is with the REST response body. Their REST response ...
1
vote
2answers
2k views

can we query SOSL using REST API?

can we query SOSL using REST API? As we can do with SOQL like this : /services/data/v37.0/query/?q=
1
vote
3answers
4k views

Consume SFDC REST Service through Mulesoft ESB

I wanna consume a REST service exposed by Salesforce, right now I'm using a Sandbox instance and using Anypoint Studio to create my flow, I would like to know what's the best practice to implement it. ...
1
vote
2answers
214 views

Dynamic JSON Body in HTTPPost Ampscript

I am trying to set dynamic JSON parameters in an ampscript HTTPPost. When attempting to insert those parameters it only returns the actual ampscript function and not the data that was supposed to be ...
1
vote
1answer
2k views

Best way to parse JSON Response from Google Maps?

I've written something that will get the longitude and latitude from a Google Geocode Callout. The response we get from a generic callout looks like this: { results=( { ...
1
vote
1answer
45 views

Restforce Assistance

I'm new to ruby and I've managed to connect my SalesForce app via oauth. I was following a couple of examples in Restforce. And I made the following query: accounts = $cliente.query("select id from ...
1
vote
1answer
2k views

Creation of a Public API

In my company's existing CRM system we have a lot of public APIs that are accessible to everyone in the web (kinda like Flickr APIs). We are planning to shift our CRM into Salesforce in the near ...
1
vote
1answer
47 views

Calling a REST API with a preset token

We have a need for equipment to post status updates to salesforce. Unfortunately the equipment lives on a secure network that will not allow return communication The methods I see all require a ...
1
vote
2answers
308 views

How to be able to process a large JSON response?

We're calling an external REST service from Salesforce and are receiving a JSON response of more than 45 MB. Has anyone attempted anything like this?
1
vote
1answer
37 views

JWT authentication without a username?

I'm working on a managed package that needs to allow an external web service to call an Apex REST endpoint within the package. As far as I'm able to gather, the best route is to use OAuth2 JWT ...
1
vote
4answers
875 views

How to update a record in a trigger with value from a REST API?

When an account is saved I need to update it with value from a REST API. I though my approach would work but I'm getting the following compilation errors. Method does not exist or incorrect signature:...
1
vote
2answers
94 views

Existing Test Class - Getting 500 error

Why would I get an 500 error on this test class? I am troubleshooting someone else's test class and am only getting five out of nine methods passing with all four failing methods failing on the ...
1
vote
1answer
614 views

Rest call with same salesforce org - [Status=Unauthorized, StatusCode=401]

Can some one please guide me where I am going wrong. For some reason i have to invoke the same instance. But i am getting [Status=Unauthorized, StatusCode=401] Error when I Debug. public class ...
1
vote
2answers
3k views

ErrorCode 180008 - Unable to queue Triggered Send request. There are no valid subscribers

I'm trying to send an email by ET rest api in Java. I already successfully sent a SMS and got a token in response, but an error is triggered with emails. Here is the JSON I send : { "To": {"...
1
vote
3answers
579 views

Trailhead : HTTP Post Issue : JSON does not contain correct case sensitive keys

I am using Chrome Extension (Advanced REST client) to mock sending/receiving my HTTP payload. Request Screenshot Response Screenshot I am following exactly as per the guidelines given in that ...
1
vote
1answer
1k views

Callouts in triggers not currently supported? [duplicate]

I'm getting an error when I am call non void method from REST API class. Trying to add the Rest Response id in contract object. trigger RestAPIcalloutTrigger on Contract (after insert , after Update) ...
1
vote
1answer
3k views

Solving issues of System.HttpResponse[Status=Method Not Allowed, StatusCode=405]

I am trying to use REST in posting/inserting List of Account records from an origin org (OrgA) into a target org (OrgB). I have this error of "[45]|DEBUG|RESPONSE_BODY : System.HttpResponse[Status=...
1
vote
2answers
1k views

Error Message for web service call?

I am trying to write a valid error message for when certain lists/calls return empty, without having to remove 'void' from my class, what is the best practice/syntax for this task? I know I can remove ...
1
vote
1answer
83 views

Get the Info of a REST API Sender

Is there a way to get the Sender info in a Rest WebService? for example : Part A - Sender sends this JSON Via POST Request : Http httpProtocol = new Http(); HttpRequest request = new HttpRequest();...
1
vote
4answers
1k views

Calling a rest API from one Org to another Org?

I have created Connected App & Auth Provider. This is the Code i am currently running. Getting error. What I am doing wrong? Can anyone please help me with this? 1st Org - (Class ...
1
vote
1answer
444 views

Retrieve a list of all JobID done in Marketing cloud

I want to know if you can retrieve the list of all jobID via a REST or API call, I found nothing in the official doc so does anyone have a trick to get this list? There should be a way, because if you ...
1
vote
2answers
340 views

Salesforce Marketing Cloud REST vs SOAP API

This quetion is related to marketing cloud APIs. I need to perform below tasks on marketing cloud via API. Create a Data Extension Create a Query activity Run query activity Retrieve data from Data ...
1
vote
1answer
2k views

Create PDF from the created record and save it as attachment

Good day everyone. I am trying to create a pdf from a newly created record. I search in the internet and I find this link : https://jungleeforce.wordpress.com/2014/06/11/generate-a-pdf-and-attach-it-...
1
vote
2answers
203 views

Apex Rest Web Service Error - List index out of bounds

All, I have seen this problem documented numerous times but have yet to find a fix that will address my situation. I am trying to either update an existing case or create a new on based on SOQL look ...
1
vote
1answer
3k views

RestResource Annotation - What is the urlMapping To?

I have never worked with Rest Resource classes before and am trying to debug one from a previous developer. I am looking at: @RestResource(urlMapping='/CompanyData/*') and am unsure what CompanyData ...
1
vote
1answer
949 views

Accessing Apex rest class with OAuth 2.0 with Named Credential authentication mechanism

I have been trying to implement Oauth 2.0 in my org and my requirement is to use Named credentials only when making a apex callout. I am using Named credentials, Oauth, Connected Apps and auth. ...
1
vote
1answer
311 views

JSON deserialise doesn't give the full string

When deserializing a JSON string to List<Object> using JSON.deserializeUntyped( resParams ) the list received is incomplete: {Address=null, BillingAddress=2509, CompanyId=632, County=null, Fax=...
1
vote
1answer
445 views

How to Use Reserved Keywords in a REST Resource?

I have configured Plivo SMS in my org. Sending and logging outbound messages is no problem. I have configured a Plivo app to direct inbound SMS to my rest resource to create an inbound record (custom ...
1
vote
1answer
197 views

Authenticating REST Users

I'm working on extenral service that will use REST API. The service will make a login to Salesgforce every day and will run REST queries. From this article, it seems that I need to use OAuth2 - ...
1
vote
1answer
425 views

Datetime representation in SOQL executed via REST API

I am trying to execute below SOQL using Salesforce REST API using Postman services/data/v36.0/query?q=Select Id from Opportunity where CloseDate < 2016-07-31T04:17:54 But I am getting below ...
1
vote
1answer
151 views

Attempt to de-reference a null object in rest test class

I'm writting a test class for a rest class, and I'm getting a System.NullPointerException: Attempt to de-reference a null object and Class.RESTCommande.getCodeCommande: line 28, column 1 ...
1
vote
2answers
4k views

ExactTarget Triggered Send is not processing any messages

I have created a triggered send in Exacttarget which I am calling via APIs (SOAP and REST). While trying out the REST APIs I ran into two errors after which the triggered send has stopped processing ...
1
vote
1answer
1k views

AWS Signature Version 4 IAM authorization

If we want to use AWS Signature Version 4 IAM authorization to add some security controls to some functions in our AWS API, so only a salesforce user can use these particular functions. Do ...
1
vote
3answers
7k views

convert json to string

Trialhead Apex REST Callouts challenge https://developer.salesforce.com/trailhead/apex_integration_services/apex_integration_rest_callouts Hi i am very new to salesforce and has statred learning ...
1
vote
1answer
151 views

Authenticated Outbound Calls

I am sending an outbound call when an update is done in account. I am using REST Service and sending data as json from salesforce to my API. Now how do i authenticate this call. APEX Class public ...
1
vote
1answer
1k views

Get html source code with cURL in salesforce

Is there any way to get html source code of external url using cUrl or rest api. As in php we can get by using following code. $ch = curl_init("http://www.example-webpage.com/file.html"); curl_setopt(...
1
vote
1answer
561 views

405 response code when trying to callout to Google

Here is my code for callout. Http http = new Http(); HttpRequest req = new HttpRequest(); HttpResponse res = new HttpResponse(); req.setEndpoint('https://google.com?q=...