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.

0
votes
0answers
65 views

Apex RESTful Callouts: OData protocol

I've a question, when building an API with Apex RESTful Callouts is it possible to use OData URI? OData is for what I understand a Rest call..
5
votes
3answers
396 views

Lightning: Getting a 401 when calling @AuraEnabled Apex method to do a REST call

Trying to write an Apex method that accesses Chatter REST api using this technique: https://chintanblog.blogspot.com/2017/02/call-salesforce-rest-api-from-apex.html This method is @AuraEnabled - so ...
0
votes
0answers
50 views

How to use SObject Describe resource and the If-Modified-Since HTTP Header in workbench

I'm trying to use If-Modified-Since in workbench, based on the example available in Rest API developer guide. But I'm not able to see the desired response. Here is what I tried so far: Please let me ...
0
votes
0answers
28 views

How to make ParameterizedSearch REST call with option “Limit to items I own”?

I cannot figure out how to make ParameterizedSearch REST call with option "Limit to items I own"? I didn't find such options at https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/...
1
vote
2answers
157 views

updating json response salesforce

{ “FirstName” : “Foo”, “LastName” : “Bar”, “Address” : { “city” : “Pune”, “state” : “Maharashtra”, “country” : “India” } } My issues is to fetch the "city" value from the above json ...
0
votes
1answer
340 views

URL_NOT_RESET error REST API

I have created the REST Resource to fetch the data from Salesforce. My Domain is also activated in our Org. When I fetch the data using https://myDomain.my.salesforce.com/.../... it is returning me ...
-2
votes
1answer
159 views

Problem in converting null or empty string to decimal

I've implemented a REST HTTP method for lead creation. There is a Number field XYZ(16,2) field. When I tried to insert with a null value it is giving an error like invalid decimal. Please help me. ...
1
vote
2answers
138 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 ...
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" ], "...
1
vote
1answer
83 views

Return Custom Response via Marketing cloud API

I wish to expose a custom service API (Soap/Rest) from marketing cloud so that when an external entity invokes the same, I can have some logic to process the data from the request and then return the ...
2
votes
2answers
400 views

How to Query ApexLog raw body?

I need to find, in ApexLogs raw bodies, references to a given String value. I know we can query the object ApexLog fields, by using the following code: SELECT id, loguserid, ...
0
votes
1answer
101 views

Can't update existing record with external ID

I have this script that gets time entries from a time tracking tool and that I'm trying to push into a custom object in Salesforce : Time_Entry__c. After following this help page : https://developer....
2
votes
1answer
181 views

Sending batch rest api request from apex

I need to get multiple data from salesforce. To get the resource i call the endpoint as shown below. public String getData(Id docId) { HttpRequest request = new HttpRequest(); request....
0
votes
1answer
442 views

Upload file in Salesforce File object using rest

I am trying to understand if I can upload a user profile picture in Salesforce using Rest. I have performed the following : Uploaded a file in Salesforce. Then I used the file Id to upload it into ...
1
vote
1answer
78 views

REST API route for SMS Opt Outs?

Hey QQ on Mobile Connect REST API for Marketing Cloud - we can retrieve subscriptions that show what keywords a mobile number is opted in to, but can we also retrieve subscriptions that they've OPTED ...
3
votes
2answers
526 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: /...
0
votes
0answers
22 views

Get list of recent searches with REST API

Is it possible to get list of recent searches? I mean "search salesforce" input box at top.
0
votes
1answer
23 views

How to get all entities owned/assigned to particular user? [closed]

How to get all entities/records owned/assigned to particular user via REST API at a time?
0
votes
1answer
76 views

How to get all Events and Tasks or OpenActivities for particular user?

I was trying all listviews for Event sobject but nothing's working for me? /services/data/v42.0/sobjects/Event/listviews/{id}/results INVALID_FIELD message: What.Name, ActivityDate, toLabel(Status), ...
0
votes
0answers
35 views

Unable to get Activities via relationship REST endpoint [duplicate]

Unable to get Activities via relationship REST endpoint /services/data/v42.0/sobjects/{Entity}/a020I00000kzRKHQA2/ActivityHistories is it supposed behaivor or I miss something? is there any ...
0
votes
2answers
36 views

How to define is object has activities enabled via REST API?

Is it possible to figure out if activities enabled for particular object via REST?
0
votes
1answer
55 views

How to test migrated data in salesforce?

We are performing a data migration in salesforce application and i am going to validate the migrated data (including schema at field, table and database level). I planned to use REST API but SQL ...
-2
votes
1answer
208 views

Upload Salesforce user profile photo via rest

I am entirely new at this. I want to know if it is possible to upload the user record profile picture via rest. I found that the photo url is exposed via the following /services/data/v41.0/connect/...
0
votes
1answer
108 views

Use REST API to create a record in a data extension without primary key

I am trying to figure out if the REST API can be used to create a record in a data extension without a primary key. According to the documentation the following options are available: PUT /hub/v1/...
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
1answer
22 views

how to search File via search rest endpoint?

I'm trying to find a file via /services/data/v41.0/parameterizedSearch endpoint with body like this {"q":"sps","sobjects":[{"name":"File"}]} - it says that INVALID_TYPE, when I use name "Attachment" ...
0
votes
2answers
219 views

What is difference in Web Server and User-Agent OAuth Authentication Flow

I have just started learning Rest API from developer guide. I'm not able to understand the difference in Web Server and User-Agent flow, both seem to be same, the only difference in Web Server is ...
0
votes
1answer
69 views

(Answered) How to insert DataExtension rows (via REST API) by other primary key (not email address)

I have a DataExtension containing a primary key that is not an email address. I'd like to use a RESTful API that allows me to insert several rows into the DataExtension in a single request (https://...
1
vote
1answer
91 views

Issue in receivng Json String in REST API

Wrapper Class: global class ApexDataContainer { @AuraEnabled public List<Purposes>purposes {get;set;} public class Purposes{ @AuraEnabled public ...
1
vote
1answer
231 views

JSON_PARSER_ERROR on PATCH when updating a custom object

I am attempting to update a custom object using the Salesforce REST API as described here, but I consistently receive this 400 response [ { "message": "The HTTP entity body is required, ...
0
votes
1answer
177 views

Get SObject fields through REST for use in select all SOQL query

I am producing a query in Java which gets two fields from an SObject collection in Salesforce, and returns them over a REST call. SELECT Id, Name FROM Lead It is possible for me to manually search ...
2
votes
1answer
95 views

RestResource Annotation - UrlMapping is NOT allowed

As per the Salesforce Article Winter / Spring '18 Apex Compiler Changes it is mentioned that UrlMapping is NOT allowed for @HttpPost UrlMapping and URL strings are NOT allowed for @HttpGet but there ...
0
votes
1answer
761 views

Displaying JSON response data from a wrapper class onto a VF Page

I'm currently working on a small app, to allow to better understand RESTful Webservices and how to consume them. The app connects to a RESTful API, and I need to find a way to display the JSON ...
3
votes
1answer
234 views

APEX Deserializing/Parsing RESTful JSON Webservice Response

I'm trying to get JSON data from a RESTful webservice into SFDC. My attempts have failed as I keep getting the following error: System.JSONException: Malformed JSON: Expected '{' at the beginning ...
0
votes
0answers
58 views

Authentication External website through Salesforce Iframes?

I'm trying to login third party external website from Salesforce IFrames. For that I have developed a page with two buttons Button 1: Accesstoken Button 2 : Login By clicking the "button 1" ...
1
vote
1answer
458 views

How to retrieve a content builder asset by it's legacyId with REST API call?

When I fetch all assets, in assets response JSON there is a JSON object name lagecyData: "legacyData": { "legacyId": XXXXX, "legacyKey": "XXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX", "legacyType": ...
0
votes
1answer
203 views

How to restrict the standard picklist values in Rest web service

below is my json where i am inserting the case record. Status is standard field and the values are (New,Working,closed). but if send the values other than the above values in json ,still its ...
-1
votes
2answers
52 views

In If condition getting error and not going to Else condition

I have below code where i am chechking if recordtype is not 0 and if its blank then go to else and throw an error.but if recordtype is coming null then its trwoing Attempt to de-reference a null ...
2
votes
2answers
785 views

Salesforce integration with external system: Calling REST service API from Salesforce synchronously on record create and update event

We are trying to integrate external system with Salesforce. Requirement is, whenever a record of a Custom object is created or updated in Salesforce, this event should synchronously call out to a ...
1
vote
1answer
168 views

Refer Master Detail or Lookup via external key in POST

I am using this code to populate master detail Terminal__c testTerm = new Terminal__c(); testTerm.Terminal_Name_External__c= 'TEST Terminal'; testTerm.Name = 'TEST Terminal'; testTerm.Port_Code__r =...
0
votes
1answer
16 views

REST API how to define if custom object has tab or not in salesforce [closed]

Is it possible to define if custom object has tab or not in salesforce? thx in advance
2
votes
2answers
302 views

REST sobjects, how get owner.name instead of owner.id

Do you know if it's possible to get owner.name instead of owner.id via services/data/v41.0/sobjects/Entity?
0
votes
1answer
382 views

Expired authorization code

I'm trying to use the REST API with OAuth2 in PHP. The problem is that I followed this tutorial : http://developer.force.com/cookbook/recipe/interact-with-the-forcecom-rest-api-from-php And when I try ...
0
votes
1answer
245 views

Marketing Cloud-Data Extension Update through REST API [closed]

I am trying to make an api call from a Drupal based website to MC to update a data extension,Is there any limitation I should be aware of,like each of the insert calls would count as a single api call ...
1
vote
1answer
21 views

Is is possible to create restful endpoint naming structure?

For instance, let's say you want to serve up contact 1111111's data. I know you can make an endpoint like /contacts?id=1111111 Is it possible to have an endpoint like /contacts/1111111 where the ...
0
votes
1answer
24 views

REST API(sobjects). How to detect which field is system one on record?

Does anybody know how to detect which field is system one with this REST endpoint services/data/v42.0/sobjects/{Entity}/describe? Is there any flag or something like that? or shall I just figure out ...
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 ...
0
votes
1answer
190 views

Using Continuation without Visualforce

I must check url statuses in scheduled job, but their amount is too big (exceeds limit, which is 100), so I tried to use Continuation object, but I'm not really sure if is it possible to use ...
-2
votes
1answer
81 views

External website doesn't login ondemand through iframes?

public class CreateEvent{ public Test__c login; public CreateEvent(ApexPages.StandardSetController controller){ this.login= (Test__c)controller.getRecord(); ...
1
vote
2answers
35 views

How can you tell if user is logged in using REST API

I'm trying to figure out if there's a way to tell if current user is logged in. I see that there's an "isActive" flag = in many of the endpoints - but this is always set to true. Even if I log out. ...