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.

12
votes
2answers
619 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 ...
-4
votes
0answers
20 views

Rest API - Marketing Cloud - How to get a complete information of a Trigger? [on hold]

I need to get complete information of a particular trigger using rest api. I tried this, but get only minimal information. GET: https://www.exacttargetapis.com/messaging/v1/messageDefinitionSends/key:...
4
votes
1answer
65 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
0answers
43 views

Tooling API not retrieving relationship name/label

Querying on Customfield using Tooling API in workbench is returning relationship label "null" even if object has the relationship field(lookup/master-detail). For Example: My Object has 3 relationship ...
1
vote
1answer
510 views

Getting Attachment Id with subquery using rest api in c#

Hey guys i am trying to get attachment Id in a subquery via the rest api in c# here is my query: SELECT Id, Name, First_Name__c, Middle_Name__c, Last_Name__c, (SELECT Id FROM Attachments WHERE Name = ...
0
votes
0answers
86 views

JunctionIdList using REST API

Is it possible to add values to fields of type JunctionIdList using the REST API? Specifically I'm trying to add multiple Contact Id's to the ToIds property on an EmailMessage object; https://...
2
votes
4answers
718 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 ...
0
votes
1answer
513 views

display image in json response in Apex

RestResource(Urlmapping='/v1/test/*') global with sharing class DD_Rest_Test{ @HttpGet global static Response getData() { Response resp; RestRequest req = RestContext....
0
votes
0answers
31 views

How can I disable my existing Apex REST Webservice in production?

I have an existing Apex REST Webservice configured in production for consumption by a partner for Lead creation. However, we are not working with that partner anymore and hence want to disable this ...
0
votes
0answers
8 views

OBJ: Product2 - Scheduling is not enabled for this type: Revenue Schedule Type Via OData

We just enabled revenue scheduling for client as soon as we enable revenue schedule, we no longger able to edit or create product via REST API, and receiving "OBJ: Product2 - Scheduling is not enabled ...
0
votes
2answers
3k views

Error 500 java rest client , but works on postman

I am using the same code mentioned in https://developer.salesforce.com/docs/atlas.en-us.api_streaming.meta/api_streaming/code_sample_auth_oauth.htm It works fine in Chrome extension POSTMAN. I am ...
1
vote
1answer
557 views

Issue inserting Recordtype for object

I am writing a JAVA-application that mainly functions as a CRUD-platform for my employees. On this application, users can manage data from a specific objects. I am using REST-API. Now, here is my ...
0
votes
0answers
12 views

How to authenticate REST API without being redirected to the Login page? [duplicate]

I have a Web application on a remote server that needs to send a JSON object(generated on my user's browser) to be stored on my SF object. The problem is that according to the documentation and a few ...
0
votes
1answer
629 views

Achieving Cookie Dependent REST API session

I am working on a application where hitting a button in Salesforce user interface must redirect you to some third party web application session. Below is some sample code that I use to connect: ...
3
votes
1answer
694 views

Live Agent REST and CORS

I am trying to create a chat client using the SalesForce Live Agent REST API but I am running into an issue with CORS. Does the REST API support JSONP, if so do you have some examples, if not then ...
0
votes
1answer
24 views

How to insert order and orderitems in single rest call in salesforce

How to insert order and orderitems in single rest call in salesforce? Add an Order to an Existing Account https://developer.salesforce.com/docs/atlas.en-us.api_placeorder.meta/api_placeorder/...
0
votes
0answers
7 views

Download ContentNotes linked to entities by others

I have an org with SNotes enabled. I am trying to use REST API to query SNotes on Account. If the current user adds an SNOTE, then a simple SOQL query like so returns it: GET /services/data/v42.0/...
1
vote
1answer
74 views

REST Request - AWS Access Key ID and AWS Secret Access Key [closed]

I am reading this document Authenticating Rest Requests The first paragraph says .. Every non-anonymous request to S3 must contain authentication information to establish the identity of the ...
0
votes
0answers
29 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
710 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
658 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
857 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
429 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
28 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
114 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
43 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
1k 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
47 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
355 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
679 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
493 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
34 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 ...
6
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
36 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
325 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
217 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 ...
1
vote
0answers
38 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
372 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
33 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
42 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
15 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
13 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
17 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
154 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
58 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
23 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
367 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
39 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
363 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 ...