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.

0
votes
0answers
26 views

Performing multiple operations on same record in same transaction [duplicate]

I am trying to do three operation using same record. First Operation: Set ContentDocument isArchived field to false. Second Operation: Grab contentdocument by calling REST API Endpoint. Third ...
1
vote
1answer
708 views

ExactTarget - How to post a record to a data extension that has no primary key?

I have a data extension with the following fields: recordId - number recordKey - text - length: 50 recordValue - text - length: 50 None of the above fields are primary key, because they can occur ...
0
votes
1answer
646 views

Making REST API calls from Salesforce to Marketo

I am new to both making API calls and coding in Apex and feel way over my head. How can I make a call to the Marketo REST API through Salesforce? Is this possible through Apex? For example, ...
2
votes
1answer
832 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 ...
0
votes
1answer
359 views

Error when using REST API to Add Rows to Data Extension

I'm trying to use the REST API to add data to a DE, but I am getting back a validation error when I make the call: Call: HOST: https://www.exacttargetapis.com/data/v1/async/dataextensions/key:...
0
votes
1answer
44 views

Convert hierarchically structured JSON data into a list of sObjects Contact

My webservice contains hierarchical data so that I cannot transform it into an sObject when making the GET request. Here is an example for Contact, but the phone number is grouped so that I cannot ...
0
votes
1answer
26 views

Restructure hierarchical data in a REST callout

I found contact data as JSON on the web that is not organized as the Contact sObject as the phone number is being stored as hierarchical data: please see https://api.androidhive.info/contacts/ for the ...
1
vote
1answer
67 views

{“error”:“invalid_grant”,“error_description”:“authentication failure”}

Hi I am trying to connect one salesforce org to another but getting below error in response body while trying to get the access token using the username password flow in oauth. Please suggest what is ...
0
votes
1answer
41 views

How to Retrieve large data from Salesforce using Rest API?

I have one new requirement where My client wants to retrieve large data set (~80K records) from Salesforce daily. I have created rest web service but it returns only 2k records. for 80k records, do ...
0
votes
2answers
995 views

Salesforce Case integration via REST API call

I have two sales-force org (org 1 and org 2).I am insert a new account in my org 1 now i want that every time a org 1 account created then org 2 will automatically update its account with org 1 data ...
0
votes
0answers
41 views

First REST API Call for the day taking more than 40 seconds

We have exposed a custom rest webservice to perform dml operation on Case. We have a custom metadata where we fetch for a particular record based on the request parameter and populate the values for ...
1
vote
2answers
351 views

Any replacement of chatter API for Download URL e.g. “/services/data/v32.0/chatter/files/06917000000XXXXAAA/content?versionNumber=1”

I want to download the file or ContentDocument using non-chatter REST API. I have explored that we can download any ContentDocument or file by using following kind of chatter REST API (which is ...
0
votes
1answer
673 views

Uploading multiple files using REST API of Chatter.

I am trying to upload multiple files using Chatter REST API. I was previously able to upload a file. Now I have to upload multiple files. I got these file names and parameter names in array, as stated ...
1
vote
2answers
477 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
1answer
25 views

How to create Knowledge Article in Salesforce using REST API

In response to the question : Create Salesforce KB article using API I used the curl call that is provided and I run into the below error : [ { "message": "entity type cannot be ...
5
votes
1answer
3k views

REST API: “INVALID_SESSION_ID” with valid token

I'm having some trouble accessing API endpoints using a valid token that I just got from the OAuth process. I'm passing data as I think I should and am trying to access any endpoint at this point (...
1
vote
0answers
34 views

HTTP GET Response with 204 Status Code and blank Body [closed]

I send Callout request to ActiveMq messages queue service to get messages form there and handle it in Salesforce. In the Queue there are 3000 messages. When I send the request from salesforce sometime ...
-1
votes
2answers
253 views

How To Redirect Url Restapi to salesforce

I am creating a rest Service and its integrated with external system and sending data to external system through lightning component and its working fine while sending the data from Salesforce. while ...
0
votes
1answer
198 views

System.NullPointerException: null argument for JSONGenerator.writeStringField() in POST Method

I have a custom Obj, and try to realize a POST method. But I get an Error: System.NullPointerException: null argument for JSONGenerator.writeStringField() What is wrong here? public static ...
10
votes
1answer
592 views

Apex Framework / library for consuming REST services

To consume REST services there is a lot of boilerplate code needed: Build Apex Objects to model the responses Code to deserialize REST responses to those classes Handling of HTTP requests, responses ...
1
vote
0answers
26 views

Python-driven Bulk API 2.0 hardDelete yields “errorMessage”: “InvalidBatch : InvalidBatch : The 'delete' batch must contain only ids”

I am trying to write a bit of python code to permanently delete some records using the Salesforce.com Bulk API v2. Using curl, I have success. I: create an Bulk API 2 hardDelete job PUT the file to ....
2
votes
1answer
360 views

REST API: How do you clear a Picklist value?

Using the rest API, I want to be able to clear the value of a Picklist item. For example, I have the Account SObject which has an Industry Picklist. Using the Salesforce website, I can set the value ...
0
votes
1answer
29 views

Metadata Rest API for custom objects

Is it possible to create and update custom objects using rest? I seen different questions that suggest it isn't yet available without using a client or SOAP but I need to be able to access it through ...
0
votes
0answers
37 views

Successful REST API POST returns error

I am working with the SF Commerce Cloud Connector package. We've been struggling to get this set up right. At first, when we made our calls we were getting this error: [ { "errorCode": "...
0
votes
0answers
12 views

REST call for ApprovaProcess and ApprovalEntryCriteria not working

I posted a question about this some days ago. I'm trying to retrieve ApprovalEntryCriteria for an specific ApprovalProcess via metadata REST call: /services/data/v44.0/metadata/salesforce/types/...
1
vote
1answer
12 views

oauth2 password flow bahaving different between my personal dev site and our corporate sandbox dev site

I'm learning the REST Api in order to write some integration code with our Salesforce implementation. As a first step, I signed up as a Salesforce developer, and did several of the tutorials. I then ...
0
votes
0answers
11 views

Retrieve approval process entry criteria via REST Api

I'm trying to retrieve an Approval Process entry criteria by its API Name. I know you can get the Id querying ProcessDefinition but I need to retrieve entry criteria via REST. I've seen that ...
1
vote
2answers
146 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
0answers
53 views

How to use ampscript from Marketing Cloud to make a callout to salesforce rest api?

Anyone know how to use ampscript from Marketing Cloud to make a callout to salesforce rest api? The REST API I need to call from ampscript is listed below: /services/data/v45.0/query?q=SELECT ID , (...
0
votes
1answer
20 views

Generate JWToken from salesforce using Consumer Secret

I am trying to connect to an API and based on their requirement, JWToken is required to make a call and the JWToken must be signed using the provided consumer secret. Now, they have a sample code in ...
1
vote
1answer
359 views

User and profile for REST API only

I am developing integration in Salesforce with external application. This app uses my api by OAuth password flow. For this I have created user and profile, restricted access to all tabs etc. Are there ...
0
votes
0answers
30 views

Create dynamic rest api url in apex

I have a requirement where I have 4 fields in which a user will fill phone numbers. On clicking save it will make a Rest API call. The 4 phone numbers have to go in an array in the URL as shown below. ...
2
votes
1answer
343 views

Chatter REST API Limit

Is there any way to increase the Chatter REST API limit of one poll per minute is a hard limit and cannot be increased? We built a connected app using REST from a 3rd party portal application and ...
0
votes
0answers
76 views

Could not get any response using Postman

I have been making a post call to Account from postman but I am unable to create a Account. But I am successfully create a push Topic.
0
votes
2answers
61 views

Call Salesforce API Rest with python

I'm try to call a REST web-service I made on Salesforce from a Python script @RestResource(urlMapping='/test_rest_api') global with sharing class Test_RestAPI { @HttpPost global static void ...
0
votes
1answer
37 views

Salesforce JSON not passing as UTF8 to external REST API

I'm trying to send a JSON to an external API in UTF-8 but the vendor tells me it's coming through as garbage. I've set the following headers: for(JSONObj.workflowRequestTableFields wfField: wr....
2
votes
1answer
2k 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 ...
0
votes
1answer
82 views

Which API to use for DataExtension update in SFMC

What is the best way to update SFMC (dataextension) by external system in automated fashion? We would like to push customer data and order history on daily basis from ERP to SFMC.
1
vote
1answer
387 views

Unable to add photoURL through REST API

I am trying to create an contact through REST API and gave PhotoURL with value as twitter photo url. Now, I got the below response. I am unable to find settings to enable this option. Can anyone ...
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 ...
0
votes
1answer
84 views

REST Integration - JSON Serialization/Deserialization alternative to wrapper class

I am building a REST integration between two Salesforce Environments. One environment will be used to setup and stage Data and when ready the Integration will be able to push data from the src to the ...
0
votes
1answer
26 views

Rest reponse for empty field

If I am querying RestResponse using below query: List<Account> accList = [SELECT Name, AccountNumber FROM Account WHERE LastName = :req.params.get('name')]; For any account with an empty ...
0
votes
1answer
25 views

Which grant type to use when Third party is accessing salesforce [closed]

We have written the code in Salesforce and third party is accessing the data using REST. Currently they are using grant type=password to access Salesforce resources. Since it requires username and ...
1
vote
1answer
33 views

Third party wants to call Salesforce.Can we use named credentials in this case

i have a use case where Some code has been written in salesforce and Third party wants to call it.They are calling using rest like this. https://xxx.com/services/oauth2/token?grant_type=password&...
0
votes
1answer
20 views

Execute SOQL using REST API and possible security implications

I am trying to use REST API Query resource to execute SOQL query. From the documentation I see that query is passed as query parameter in the GET call. This will be used from the external system to ...
1
vote
1answer
24 views

How to build an integration with rest API in apex using XML

Situation I need to build a connection from Salesforce to "post" to a rest api. The recipient has given me XDS schema files of the data to be sent over. My Current Plan Build a sObject to be the ...
0
votes
1answer
430 views

Having Trouble with Force.com REST API oAuth2 Authentication

I am experimenting with Pat_Patterson's "Interact with the Force.com REST API from PHP". I am using PHP Version 5.6.3 , and I already registered my app via Setup->Create->Apps->Connected Apps. I setup ...
1
vote
1answer
48 views

C# Get SessionId returns affinity token empty (“”)

When im doing the GET request to get the affinityToken, its come empty {"key":"b99d9a87-c7db-4f5a-a20d-9419bb2d0ad0!1549978665283!x6db6+hNaLzITCEq9EcjFLyKAjw=","id":"b99d9a87-c7db-4f5a-a20d-...
1
vote
1answer
31 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 ...
0
votes
1answer
95 views

Deserialize json request error - unexpected character

I am getting this error when trying to deserialize an HTTP response - hope you can help: FATAL_ERROR System.JSONException: Unexpected character ('<' (code 60)): expected a valid value (...