We’re rewarding the question askers & reputations are being recalculated! Read more.

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
0
votes
1answer
19 views

Authenticate Calls made to Salesforce webservice [duplicate]

I am using this exact example from trailhead https://trailhead.salesforce.com/en/content/learn/modules/apex_integration_services/apex_integration_webservices @RestResource(urlMapping='/Cases/*') ...
-4
votes
0answers
18 views

How to create a custom Activity in journey builder to export to SFTP [on hold]

I'm very new to SFMC Development. I wanted to design a custom activity which push data file from Jouney builder to External SFTP. How I can achieve this. Can you please help me here. Thanks
1
vote
2answers
22 views

JSON Date field Error

I have the JSON string below that is being sent to a Salesforce Webservice: {"Opportunity": {"Id":"006g000000IiM5z", "Appraisal_Date__c":"2019-11-22"} I serialize the request into a Map and am ...
4
votes
3answers
7k views

What is the maximum number of records I can send per RESTful API call?

There is a maximum batch size for the number of records returned by an API call. Most of the documentation for the API calls reference including a .json file, and some, like the Update a Record page,...
0
votes
1answer
24 views

Not able to view attachment in salesforce, when uploaded through Multipart Rest API

Below is the code which I'm trying to insert attachment through API not sure what is wrong, when I try to open 'Failed to load pdf' error comes or if I send image type file then that also doesn't open ...
1
vote
1answer
34 views

Can using the BULK API to perform SOQL queries save on total number of queries?

This is a pretty hypothetical question. So I apologize if this isn't sufficient information. Let's say I want to query for about 50000 accounts. And I have a very simple select statement that tries ...
0
votes
1answer
13 views

Different QuoteDocument using Connected APP REST API and Workbench / Interaction

I've set up a autolaunched Flow, which creates a PDF based on a Quote Template. My connected APP use this Flow through the REST-API. The output is an empty PDF with a Size of 2 KB. The same Flow, ...
2
votes
1answer
1k views

Exact Target Rest Auth API

I'm trying to call the exact target auth api for the first time. I'm getting a 407 Proxy Authentication Required. Can you please let me know where I'm going wrong. I'm using the following call ...
0
votes
1answer
39 views

how to get more than 2000 records rest api

I am trying to get more than 2,000 records from salesforce using Rest Api. /services/data/v47.0/queryAll/?q=Select+Id,XXXX__c,CompletedDateTime,XXX__c+from+task+WHERE+CreatedDate+>+2019-10-20T00:...
1
vote
2answers
86 views

File content missing error while creating transient document on adobe sign using REST API

I am trying to create transient document in adobe sign using rest api. After lot of research I was able to make the correct multi form request in Salesforce Apex.But now I am getting the file content ...
0
votes
1answer
471 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
0answers
15 views

Metadata Translation API: REST Request URL [duplicate]

I am trying to retrieve the translation for a custom picklist values , using REST I think i need to retrieve CustomObjectTranslation : https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/...
0
votes
0answers
14 views

Status=Unauthorized, Code=401 using Named Credential from Apex

I have a REST Integration between two Salesforce Orgs and have set up a Connected Application in Org A and an auth provider and named credential in Org B. The named credential shows as authenticated -...
2
votes
1answer
604 views

How to create trigger for DatedConversionRate object

We're using multicurrency in our project. DatedConversionRate has been updating every day by external process. The requirenment is to update CurrencyType records with most relevant rates. At the ...
-2
votes
0answers
29 views

Salesforce and Webhooks: REST integration with another serviece

I want to get real-time updates with the Salesforce/another serviece integration through webhooks. When something is updated on the serviece, I have to get it on Salesforce. Without Callouts. What am ...
-2
votes
1answer
35 views

how to write a test class for web service HttpPost

I'm new to development here I'm developing a webservice in rest and I have no idea about how to write a test class for that. Please find the below code of apex class: @RestResource(urlMapping='/...
0
votes
0answers
14 views

Set header and add header in rest Class

I have below class which i need to test it from workbench/postman. I am not sure how should i test it . @RestResource(urlMapping='/CheckAuth/*') global with sharing class example1 { @HttpPost ...
0
votes
0answers
27 views

How to access the REST API with the user with Permission 'Is Single Sign-On Enabled' is enabled

I have created one RestResourc to give the ability to the external system to attach the Report to Asset in Salesforce. Now the problem I am facing is the user which I am using for Authentication ...
1
vote
1answer
549 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
1answer
596 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....
1
vote
3answers
699 views

REST to create multiple objects-JSON Deserializaton failed on token null

I have been trying to create CurrencyType records from APEX and since that doesn't support DML, have been using the REST endpoint and POST method. Everything work fine with single record but with ...
1
vote
1answer
620 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
21 views

Rest Composite Resource

I try to insert a parent record with own child records using an external id (Serial__c field), but I receive this error: "statusCode": "INVALID_FIELD", "message": "Cannot reference a foreign key ...
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 ...
2
votes
1answer
270 views

Create a Report using Salesforce SOAP or REST API

I know about Salesforce Reports and Dashboards REST API. But Report REST API allows only to change (update) an existing report by sending PATCH request with appropriate json body and clone a report ...
3
votes
1answer
808 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 ...
-1
votes
2answers
28 views

Deserialize JSON Response from Rest Query, ERROR: System.JSONException: Malformed JSON: Expected '[' at the beginning of List/Set

Trying to convert some JSON to an Account List, I suspect my error is because the query next stuff coming into the response. How can I convert these results to an account list? HttpRequest ...
2
votes
0answers
23 views

LWC - Retrieving WAVE Dataset information

I'm trying to make a callout to /services/data/v45.0/wave/datasets in a lightning web component. I can successfully make the callout for the running user in apex using UserInfo.getSessionId() but ...
-3
votes
1answer
37 views

Sending status code with response using apex [closed]

I am working on a rest API using http post to get the params and create a record. After creating the record I need to send a response with the details of created record along with a status code and ...
2
votes
1answer
360 views

SOQL over REST: “Truncated”, “Malformed query” depending on which record IDs I ask for

The following query, when run over the REST API, gives me an error: SELECT Id WhatId, WhoId , TaskWhoIds , Subject, ActivityDate, Status, Priority, Owner.Name, ...
0
votes
0answers
14 views

How to delete all rows with certain condition using Marketing Cloud Rest API

I'd like to hit a rest API and delete all rows in a data extension. The data extension doesn't have a primary key, but it has a "condition = x". For instance: condition, value x, 11 x, 22 x, 33 y, 44 ...
0
votes
0answers
25 views

Updating Metadata of Standard Objects

Good day! I bumped into a question from here. I was wondering if there is a counterpart for this when it comes to Salesforce Standard Objects? Upon reading the answer, it suggests a library which ...
1
vote
1answer
725 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 ...
1
vote
1answer
560 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
2answers
48 views

Salesforce Rest API, Issue in getting Params from Rest API

In the below code, If I print the String variable report, I am able to get only half of the string that is 123 characters, while the external person is actually passing me a string that contains ...
1
vote
1answer
48 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 ...
0
votes
1answer
930 views

Calling salesforce REST API from sharepoint

I have a sharepoint app in which I call salesforce REST API. I have obtained access_token successfully from the app, (using username-password flow) but when I try to access some resources such as ...
0
votes
1answer
692 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
944 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
0answers
52 views

Apex callout yields “Ending position out of bounds: -1” error

This is my vf page <apex:page controller="AccountRest"> <apex:sectionHeader title="Accounts" subtitle="List View"/> <apex:pageBlock> <apex:pageBlockTable value=...
1
vote
1answer
60 views

Apex callout with a client certificate

I have written one Rest service which is returning a access token to resend it to endsystem to get the final response but we are getting "Request processing failed; nested exception is java.lang....
1
vote
2answers
379 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 ...
2
votes
2answers
66 views

Calling REST APIs based on a session established via a community login

I'm currently dealing with an authentication issue with two different Salesforce REST API endpoints. We are trying to consume the API from inside a Visualforce page in a Salesforce community. To do ...
1
vote
1answer
143 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 ...
0
votes
0answers
53 views

Create a StandardValueSet via Tooling API

I am currently working on StandardValueSet and I would like to try to insert an entry in the said resource. I looked at the documentation and it sort of lacks the necessary information for me to be ...
0
votes
1answer
25 views

Help debug MobilePush send

I am trying to use Triggered API to send a Push notification. Can anyone help me debug what could be wrong with this simple code? I have the right Client Secret and ID as well as mobilepushlistid. %%[...
1
vote
1answer
33 views

nforce org.getUrl(url,cb) - value of url

I have a Node app running on heroku where I am using the nforce lib. I received { Error: Could not find a match for URL error.} while using org.getUrl from nforce library. For the url string, I have ...
0
votes
1answer
758 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 ...
0
votes
1answer
46 views

What's the problem with this backslash in SOQL query?

I'm receiving a String query with query params (via URL), and one is mandatory and seven are optional. So if i don't receive a param, shouldn't be included in the query. For instance: My code is: ...
6
votes
4answers
887 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 ...