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-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.

1
vote
1answer
234 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 --> { ...
-3
votes
1answer
28 views

SOQL Query -REST API [closed]

I would like to know if it is possible to insert or update records using a SOQL query in the REST API. thanks
1
vote
1answer
31 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
62 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
48 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 ...
1
vote
2answers
115 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 ...
0
votes
1answer
25 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
1answer
54 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
32 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
21 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
0answers
24 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 ...
0
votes
1answer
48 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
2answers
42 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
34 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
1answer
16 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
0
votes
0answers
30 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). ...
2
votes
1answer
65 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'...
0
votes
1answer
113 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
23 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
0answers
23 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
1answer
39 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
26 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
1answer
16 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
58 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
44 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
2answers
24 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 ...
1
vote
2answers
59 views

Deserialize JSON Body into two different Lists of own classes

I'm writing an REST PUT request that takes in an array of Careers and Degrees from the body and converts them to inner classes within the RestResource class. However, when I am attempting to ...
1
vote
0answers
30 views

Rest Api deprecation

When a salesforce rest api version will be deprecated? Is there any validity period for api version? Is there any deprecation process salesforce follows?
1
vote
1answer
166 views

Rest api version v45.0 not working

Rest apis below version v45.0 working fine. But new version v45.0 is not working. Getting error as [ { "errorCode": "NOT_FOUND", "message": "The requested resource does not exist" ...
1
vote
1answer
151 views

Method PATCH is not defined in RFC 2068 and is not supported by the Servlet API

I'm using PATCH /composite/sobjects URI as stated in the REST API Developer Guide. But I'm receiving this error: Method PATCH is not defined in RFC 2068 and is not supported by the Servlet API ...
0
votes
1answer
54 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
0answers
44 views

Getting Bad request for Connected App

I am using Connected app to authorize the access token but I am getting bad request. here is my code. public static void test(){ String clientId = 'REDACTED'; String clientsecret = '...
0
votes
2answers
55 views

Check API REST Salesforce

I have a test class of REST API and I want check this. In workbench it is OK, but now I want check and use with other application. Can I check this class? I have tried with cURL, but I do not get it; ...
1
vote
1answer
148 views

Salesforce Rest API create account

We are using the Salesforce Rest API to integrate our external website with Salesforce Sales Cloud. When a user registers on our website, we create a contact record in Salesforce. The response to ...
0
votes
2answers
123 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
24 views

External Website integration with Salesforce

We have an external website that is integrated with Salesforce via REST API. On the website, when a user registers, a contact record is created and also a welcome email is sent right away. Users ...
0
votes
1answer
58 views

How to Insert or Update Blob Data using Workbench

Bascially I'm trying to execute the example given here for the upload of Blob Data from Workbench. but on executing I'm getting below error: message: Unexpected character ('C' (code 67)): expected a ...
1
vote
1answer
103 views

REST API call via Postman to read Journey [closed]

I am new to API call. I'm attempting to retrieve a journey together with its data from SFMC. Should i use POST or GET request? What URL goes to the request? For header, i have specified the ...
0
votes
1answer
36 views

getting Unexpected parameter encountered during deserialization using REST service

why below REST web service does not properly deserialize the input argument?Please help me out? @RestResource(urlMapping='/HH_Survey/*') global class HH_SurveyController { public ...
0
votes
0answers
18 views

How to retrieve files from an external server

I'm not at all that familiar with web service, but we do have this requirement in which, once a month, we need to retrieve some pdf files from a folder in an external server, and then attach them to ...
1
vote
1answer
55 views

Migration to Content Builder from Classic Content

I mainly use an AMPScript email to create&send emails using Triggered Send. The AMPScript email (script) loads the required information from content html files and values from the Data Extensions ...
2
votes
1answer
60 views

Using queryLocator in the REST API /services/data/v44.0/jobs/ingest

I am doing a report for my Jobs and I need to return a specific Job information using the REST API /services/data/v44.0/jobs/ingest. When I am using the REST API, it is limited to 1000 records. I ...
1
vote
0answers
11 views

Updating Standard Report Type via Rest API on Cases returning error: 'value \“\” is not one of the picklist choices.'

I am looking to update the report type of an existing report via REST API. First I get the report metadata via a GET/describe, then I string-replace just the report type (assuming there is just one ...
0
votes
0answers
23 views

How to create a new report programmatically and set audit fields?

I am looking to create a new report programmatically and set its audit fields (CreatedBy, CreatedDate, LastModifiedBy, LastModifiedDate). I followed this REST API Documentation to create a report ...
1
vote
1answer
70 views

Get Method Syntax to move Data Extension from SFMC via Postman

I am new to API Calls, and Postman API Scripts. I have a Data Extension in Sandbox SFMC, which i want to move to Postman via Postman API call. I already have a script to get the access token from ...
1
vote
3answers
91 views

Increase the callout time limit from 120 seconds to more

I am calling a REST API from my Salesforce instance which generally takes 100-150 seconds to process and return the result. The cumulative apex callout time limit is 120 seconds. Is there any way ...
1
vote
1answer
70 views

Dashboard refresh - 403 Forbidden - Documentation of errors

I have a periodic scheduled job that refreshes a dashboard using this HTTP PUT request: /services/data/v44.0/analytics/dashboards/somedashboardId Mostly, this works reliably but every so often I get ...
5
votes
1answer
42 views

sObject describe metadata showing duplicate picklist value entries

I'm doing some code generation based on the standard org sObject metadata. As part of that process I'm using the DescribeSObjectResult.fields.picklistValues PicklistEntry records to determine which ...
0
votes
3answers
76 views

What's the difference between an HTTP Request Message and a Salesforce Rest Resource and the HttpRequest class?

I am new to HTTP and Salesforce's APIs What is the difference between the salesforce rest resource they talk about in this trailhead module - https://trailhead.salesforce.com/content/learn/modules/...
0
votes
0answers
26 views

Accessing salesforce data using JAVA program - facing an issue

This is my JAVA code: package SFtest; import java.io.IOException; import java.net.*; import org.apache.http.client.methods.HttpPost; import org.apache.http.client....