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-api]

REpresentational State Transfer (REST), or RESTful, web services provide interoperability between computer systems on the Internet. The Salesforce REST API provides a powerful, convenient, and simple Web services API for interacting with Force.com.

3
votes
1answer
404 views

composite/tree/Account, Opportunities and OpportunityContactRoles

I'm trying to create an Account, Contact, Opportunity and then link the Contact to the Opportunity in a single composite/tree api call. Is it possible to link the OpportunityContactRole to the ...
0
votes
2answers
19 views

How to authenticate REST API without going through login page?

I would like to allow end-users that do not have access to Salesforce directly to be able to make orders (a custom object) by submitting a form from a web page. I would have thought making a simple ...
2
votes
0answers
18 views

What does 'scope' mean in the context of a Salesforce report? Where/how is it specified? What are the possible (API) values?

There is a method called getScope() in ReportMetadata Class. Can someone please shed some light on what 'Scope' actually means? Where/how is it specified? What are the possible (API/system-digestible) ...
1
vote
1answer
36 views

Marketing Cloud REST API “Not Authorized” error in Postman

Am doing a POST REST API call out from Postman to insert a record in Data extension. Below are the steps: Step 1: POST --> https://s50.auth.marketingcloudapis.com/v1/requestToken Body --> { ...
0
votes
0answers
16 views

Integrate Salesforce and Google Slides API

I would to like to integrate Salesforce with Google Slides API. But I'm a little bit confused which OAuth 2.0 to use: OAuth 2.0 for service accounts OAuth 2.0 for Client-side Web Applications I ...
1
vote
2answers
24 views

Sharepoint Integration From Apex

We need to upload files to sharepoint and able to view the uploaded files to sharepoint in salesforce. So we cant achieve this in File Connect, where it is not supporting two way synchronisation. So ...
-3
votes
1answer
26 views

SOQL Query -REST API [on hold]

I would like to know if it is possible to insert or update records using a SOQL query in the REST API. thanks
4
votes
1answer
410 views

API calls to backend from Salesforce flow

I'm trying to figure out how to create RESTful API calls to my backend from inside the Salesforce flow - for example i want to retrieve a field from my backend and then make a decision upon that field....
1
vote
1answer
22 views

How to read the error from the response given by Salesforce

I have an api that has a catch method: catch (Exception e) { // Error System.debug('API - ERROR: ' + e.getMessage()); res.responseBody = Blob.valueOf('ERROR: ' + e.getMessage()); res....
1
vote
0answers
24 views

Display a PDF in Salesforce from Blob data

For our project, we need to get a PDF via API from an external private filestore, and display it within a Lightning Component. With the blob that is returned, if I set that to the src of an iFrame, it ...
1
vote
0answers
20 views

ExactTarget REST API - Cloud Pages & Collections

I've successfully used the available REST API in order to create various assets in Marketing Cloud / ExactTarget, like HTML Emails, Templates and Landing Pages. The email assets are visible under the ...
0
votes
1answer
18 views

pad block corrupted apex Crypto

I am facing an issue while decryption of value which is stored in custom setting. When i encrypt and decrypt value at same time then i that error is not thrown, if i get the value from custom setting, ...
0
votes
1answer
20 views

Best way to store a value easily editable by apex

I want to store a text value that I can easily modify using apex. I want to use it to change the behaviour of a visual flow depending of the value in this field. I think about custom metadata type ...
0
votes
2answers
45 views

Redirect following POST method

I have a scenario : A user needs to fill a form and after submitting, it should send the data of the form using POST API to some URL - the user will need to be redirected to this page after the ...
0
votes
1answer
20 views

System.QueryException: value of filter criterion for field 'CreatedDate' must be of type dateTime

Below my code, I want to pass date value as a parameter but I facing an error as below, message: System.QueryException: value of filter criterion for field 'CreatedDate' must be of type dateTime and ...
2
votes
2answers
20 views

See Event Logs of other users

We're currently blasting through our SFDC daily API limits and I wanted to see who is causing it. As per the trailhead I went into the Event Log File viewer they offer (salesforce-elf.herokuapp.com) ...
0
votes
1answer
428 views

How can I get a metadata from APEX RESTful service?

I'm a front-end developer and my knowledge is little bit in Salesforce. I'm developing single-page application in AngularJS to Visual Salesforce and faced a problem with an error: "System....
1
vote
1answer
425 views

Custom APEX Rest API - using other REST response in this response

I'm working on a project building an APEX REST API that would benefit by understanding the page layout for the user/record to decide on the response. It will feed a mobile app, and so I'm trying to ...
0
votes
1answer
29 views

Data Extension synchronous Rest API where there are only primary keys

I have a data extension with 2 fields/attributes. These 2 fields are string types and primary keys. According to documentation the request body for synchronous APIs request should be: https://...
0
votes
0answers
18 views

How to send data which increases after the base64 encoding?

I'm trying to send an attachment through api call, my file size is 4.5mb which increases to more than 6mb after base 64 encoding. and it start throwing error of 6 mb limit which salesforce support for ...
-3
votes
0answers
27 views

how to write the test class for this part of code [duplicate]

@RestResource(urlMapping='/orderCreation/*') global class WebShopOrderCreation { @HttpPost global static void PostData(){ RestRequest req = RestContext.request; RestResponse res = ...
0
votes
2answers
33 views

Searching contacts by Rest API

In my app(outside Salesforce) I want to show search results from Salesforce contacts. The search is based on contact name. While I can do it by using SOQL query using Rest API, I'm worried about ...
0
votes
1answer
28 views

Get Object id using rest api

Is ther any unique id available for object. If yes, How to get a object's unique id ie.object_id using rest api.
0
votes
0answers
20 views

Test method for doGet() [on hold]

@RestResource(urlMapping='/getTL/*') global class WS_GetTLList { @HttpGet global static User doGet() { RestRequest req = RestContext.request; User user=new User(); String ...
0
votes
2answers
440 views

How do I do bulk update to external web via REST api?

I have a REST API callout to our website to update data (eg Account) there from our Salesforce instance. This is all working fine doing 1 Account when it's created or updated as the trigger does the @...
0
votes
1answer
428 views

Proper method to store client ID and client secret while integration

While integrating facebook / Twitter / Other social websites with salesforce, what are the proper method to set the client ID and Client Secret ? I had stored in salesforce. While retrieving it back ...
1
vote
1answer
445 views

refresh token not update access token

I have a trouble between integration with SalesForce and our's service. We are using oauth2 authorization and SalesForce REST API. Our clients authorize successfully for the first time and get the ...
3
votes
2answers
1k views

Unsubscribe from SMS Keyword through API

I am trying to use the FUEL API to unsubscribe a mobile number from a particular keyword on a private shortcode. I would be fine with a global opt out on that private shortcode, as well. I have tried ...
0
votes
1answer
199 views

How to get MobileConnect keywords?

Is there a way to get a list of all MobileConnect Keywords created on Marketing Cloud? I use attributes search REST endoint https://www.exacttargetapis.com/contacts/v1/attributes to MobileConnect ...
0
votes
1answer
437 views

How to download reports from Salesforce using Java Bulk API or Rest

How I can download reports from Salesforce about completed tasks using Java Bulk API or Java REST API? I implemented this code https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/...
0
votes
1answer
9 views

Automation Studio create activities via REST API

I need to create and save an activities with REST API in Automation Studio. How can I do it? many thanks
1
vote
1answer
481 views

RestResource urlMapping routing is conflicting with a similar URL

So we have a number of mapped urls, and up until recently they were working fine. We recently noticed that our requests are inconsistently being routed to the wrong APIs. Example: @restResource(...
1
vote
1answer
435 views

Query Validation Rules associated with an Object using REST API

I need to retrieve all the validation rules associated with a given object, using the REST API. Looking in doc/forums, I've found that I could retrieve validation rules associated with an object ...
0
votes
0answers
24 views

PlatformActionList consuming API calls

I'm having trouble dealing with my API calls limit. I found that the main object that is consuming this API calls is PlatformActionList (I'm not a developer, I'm not even sure if this is an object). ...
0
votes
1answer
19 views

facing error as “This session is not valid for use with the REST API” while integration with PHP platform

I want to create lead record using integration of php platform. I have written rest API for that. The code is working fine when tested on workbench. But now I have integrated salesforce with PHP ...
0
votes
1answer
35 views

Salesforce Unauthenticated REST - HTTP 301

I followed this tutorial, http://www.wadewegner.com/2013/03/creating-anonymous-rest-apis-with-salesforce-com/ , to create a public rest service in a developer sandbox. If I run any of the following: ...
0
votes
0answers
21 views

Bulk API 2.0 Upload for files bigger than 150Mb

I'm trying to use the Bulk API 2.0 to upload big files. I need to know how I have to upload the data in case the file converted to base64 exceeds the 150Mb allowed. After reading the documentation I'...
1
vote
3answers
3k views

Does any one know any idea that how to integrate salesforce with fileNet

I am trying to integrate Filenet with Salesforce, and I need a starting point, can any one tell me where to start? There seems to be no easy to find information online.
0
votes
1answer
20 views

View Logs from API calls made externally

In the developer console, I am only able to view the logs of an API call that I made from within the developer console (tests) or from workbench. But when I make a call from Postman, I do not see any ...
0
votes
1answer
473 views

How to Query for information from Opportunity Trends Report?

I'd like to query Salesforce with an SOQL query that can attain the 'Historical Amount' as of a given date in the same way that we can attain this information from an Opportunity Trends Report. ...
1
vote
1answer
450 views

C# REST API - Get Dependent Picklist Values

Within one of my Salesforce object, I have cascading picklists where the selection of one picklist displays values for the next level picklist. So I have three dependent picklists. What I would like ...
0
votes
0answers
19 views

Can I use @Httppost and @Httpput on the same method

I want to use 1 method regardless of whether the request is sent as a Post or Put (upsert). So, if the request has an Id field populated, it will update the record, if not it will insert. Can I just ...
0
votes
3answers
469 views

params in the rest request is coming as null

I am trying to write a test class for a rest web service @httppost method. Here is my code public static testMethod void testPostRestService () { JsonToLeadDataClass outerJsonObj = new ...
0
votes
1answer
50 views

Reading in XML from webserivce request using HttpRequest

I have seen multiple posts online talking about how to read in XML data from a web request using HttpRequest, but I cannot seem to make it work or find any documentation on it. The closest I have ...
0
votes
1answer
12 views

getting recursion for Salesforce 2 Salesforce Integration using REST API in Case object

I am doing salesforce to salesforce integration between two orgs using REST API. I created REST API classes in two different org that update/insert/delete records. Insert and Delete works fine. But in ...
0
votes
0answers
24 views

How can I use pre-request script in salesforce?

I have a pre-request script and an endpoint which I can use to fetch access token in postman. How can I use the same script in Salesforce to get the access token?
0
votes
0answers
19 views

Retrieving Automation using SOAP API from SFMC

I want to retrieve Automation, together with its activities, from Marketing Cloud using SOAP API. So far, here is what i've done: POST request: https://mccjt21lv-4lgq9nyyffr29q3v31.soap....
0
votes
0answers
30 views

How to Create a List (via APIs) from a Large CSV in Marketing Cloud

I wrote some code to interact with Marketing Cloud's SOAP API to create a List and populate Subscribers by importing a CSV file. The code works fine for CSVs up to a couple of thousand records. I ...
0
votes
1answer
469 views

Wrong instance url while generating the token for OAuth 2.0 authentication

I am a novice in salesforce. I have access to multiple sandbox instances of salesforce. I am trying to do an OAuth2.0 authentication and call some rest api. But when I request for the token, in the ...
0
votes
2answers
20 views

Bulk match contacts based on email

I've a list of email ids and I want to match it against contacts in Salesforce. I'm planning to do use SOQL like - Select Id, Name from Contact where email IN ('a@xyz.com, b@xyz.com') I will be ...