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.

Filter by
Sorted by
Tagged with
4
votes
1answer
796 views

Returning Oauth token with REST API via PHP arrays when trying to send new contacts

In the salesforce REST API documentation, it tells how the system can give Oauth Tokens (https://code.exacttarget.com/apis-sdks/rest-api/v1/auth/requestToken.html ) But I don't seen any documentation ...
2
votes
0answers
14 views

Journey, tracking subscribers in WAIT state

I have a question about Journeys, can I track subscribers that are in a state of WAIT inside a journey? I tried to track with Data View: Journey Activity but the column JourneyActivityObjectID is ...
0
votes
2answers
30 views

MC REST API for starting Automation

I am looking for REST API to start Automation. I see following endpoint with POST it helps to create Automation. Is there any REST endpoint to start Automation? I do see there are SOAP API available ...
0
votes
1answer
19 views

Deserialization using Apex class generated using JSON2Apex gives null for inner values

I have the following piece of code. @RestResource(urlMapping='/Update') global with sharing class OpportunityUpdate { @HttpPost global static void updateOpportunity() { RestRequest req = ...
0
votes
0answers
34 views

Setting a Scheduled Automation to Active with REST API

I can activate scheduled automations through soap but only if their schedule is not already configured. Does anyone know how to activate a scheduled automation through REST API? I think the "isActive" ...
1
vote
0answers
21 views

Salesforce SAML Assertion flow via REST API for Lightning Out

Context: We want to log a user into a Lightning Out App hosted on an Azure AD System using the SAML Assertion flow. What we have establisched so far: We have a functioning connection for our ...
0
votes
0answers
12 views

OCAPI request length restriction

if I send a PATCH request for a customer resource (.../customers/xyz) with the following data: {"birthday":"11.11.1980","email":"max@mustermann.de","first_name":"Max","last_name":"Mustermann","title":...
0
votes
0answers
11 views

Connect external application with my Salesforce app

We are developing an external application which will connect to a Salesforce app (also being developed by us) for data integration. Now this Salesforce app can be installed by any organization, so I ...
2
votes
2answers
669 views

Slow REST API return for first call of day (30s+)

I asked this question on the SF developer site, but didn't hear back. Hopefully, somebody here has seen this before, and can help me out. We have boiled it down to a few cURL calls for ...
-2
votes
1answer
23 views

Apex Test class for following soql [duplicate]

How do i write test class for the following SQOL SELECT LeaveDate,FullName,Worklocation,Email FROM object WHERE Leavedate = LAST_N_DAYS:30
0
votes
0answers
15 views

How to keep logs of API endpoint consumption by 3rd party or user [closed]

I want to keep track of the date time when my API was called and user who consumed my API endpoint.
0
votes
0answers
10 views

LiveAgent availability check by live_agent_rest_estimated_wait_time Details are below

I need small support on this I currently have Omni Channel implementation. I have developed custom UI for Pre Chat and its working but proceeding further I need two things How can I extract field ...
3
votes
1answer
2k views

LiveAgent Availability Check?

I'm trying to check availability for a LiveAgent deployment/button. Which seems to be quite undocumented. I can GET /rest/System/MultiNoun.jsonp?nouns=Settings&Settings.prefix=Visitor&...
0
votes
0answers
16 views

REST API Callout with Named Credentials not refreshing token?

I am making a call from my org to the REST API of another org to pull in some data from the chatter feed API. I set up a connected app on the org of the API I am using. It is using the OAuth scopes (...
0
votes
0answers
26 views

SetObjectProperty: how to create inline objects

I have the following 'To' object in an API request: "To": { "Address": "email address here", "SubscriberKey": "Subscriber key here", "ContactAttributes": { "...
1
vote
1answer
15 views

No result from EventLogFile for Event Type = ReportExport

I am sure that we are exporting reports but there are no result when I use this query: SELECT Id,EventType,LogDate,LogFileLength,LogFile FROM EventLogFile WHERE EventType ='ReportExport' I also ...
1
vote
2answers
29 views

Methods defined as TestMethod do not support Web service callouts on working test class [closed]

I'm experiencing a wierd thing, I'm made a deployment on a refactoring of code on cases this monday (2019.12.02) and my test classes use the Test.setMock method. It worked so I started doing the same ...
1
vote
0answers
119 views

ERR 596 SERVICE_NOT_AVAILABLE at ETClient()

I have a very basic Installed Package, with an API Integration component... ...and a very simple connection test... public void TestConnection() { ETClient client = new ETClient(); ...
0
votes
1answer
25 views

Unable to identify REST API status code

I am testing a REST service in dev console and I'm getting a status of Found and a status code of 302. However, the body is empty and I know the parameter value returns a record from the system that I'...
2
votes
1answer
49 views

Controlling Journey Builder custom activity exit time based on DE update completion

We have developed a custom activity that returns the date and should populate DE/ This date is used in Wait by attribute activity which follows custom activity. The problem we face is that we receive ...
0
votes
1answer
24 views

RAML connection setup in salesforce [closed]

Can anyone please help me in setting up raml connection in salesforce? We have RAML file shared to us which has details of external system. But we dont know the steps to establish connection using ...
0
votes
1answer
21 views

Pagination REST API, Multiple request, DML End problem

I was share 1 more question before in my profile, and i changed my apex code, My old question. Now i wrote my callout function in batch apex class, My problem is when i want to send second request ...
1
vote
0answers
28 views

SOSL using POST REST /parameterizedSearch API

I got the "/services/data/v46.0/parameterizedSearch" POST API working for a complex SOSL search I want to perform. I am referring to the Salesforce documentation here: https://developer.salesforce....
-2
votes
0answers
22 views

Is there some Trailhead API? [duplicate]

The Endpoint return only html. I want to restore points, badges and trails in Trailhead, but after change web site trailhead, it is no longer possible. public class RESTGetHttpContentCallout { ...
2
votes
1answer
406 views

Strange, slow behavior during ordering w/ REST API

I'm seeing some very bizarre SOQL performance when ordering by Id across several Sobjects. In this, they seem to take a very long time to select even just Ids when asked to sort by Id. Remove the ...
0
votes
0answers
35 views

REST API Create Multiple Records

Create multiple records with reference to the official documentation:Create multiple documentation url But I need to fill the lookup field value, I found the official document again:update ...
3
votes
0answers
26 views

How to merge two records via REST?

Both Apex and SOAP APIs provide a method to merge two records of a mergeable type (e.g., Account, Contact). Is there any way to access this functionality from a REST API? I've checked the docs and ...
1
vote
1answer
32 views

Rest api Read Timed Out for large dataset

I have a rest request (user initiated via a lwc button) to an Azure Function that gets sent a masterId and followerId which contacts are assigned to. The Azure function uses a SOSL query. It will send ...
0
votes
2answers
692 views

C# REST API “PATCH” workaround

Has anyone had any luck getting a PATCH or other method to update an object to work in the REST API in C#? Whenever I try to use patch I get this response StatusCode: 405, ReasonPhrase: 'Method Not ...
0
votes
0answers
32 views

How can i use pagination to in GET Request (REST API)

Firstly i want to update some fields in my products object, I was wrote API in my server for the products informations. In my Json data have a lot of records getting from the MSSQL Server, Thats why i ...
1
vote
1answer
58 views

Using API call in SSJS

I would like to know if we can do an API call Using SSJS. My need is to extract data from a data extension and target an end point using API call. The SSJS is unfortunlly not documented very well. I ...
0
votes
0answers
17 views

API call to Sharepoint from AURA using a system user

I am calling an API service to receive a list from Sharepoint (url) via a component (controller/helper .js) using req.open("GET", url, true); Now I need to always call this service under a specific ...
1
vote
1answer
121 views

How to download a attachment in browser using JSForce?

I am trying to download a Attachment using JSForce library. I am able to get body of attachment and download that file but somehow content of downloaded file is not correct and I am getting a corrupt ...
1
vote
1answer
23 views

SFDX plugin to generate Apex classes from Swagger file is failing to install

I'm trying to install this plugin https://github.com/muenzpraeger/sfdx-plugin , due to some reason it is failing. Please let me know if there is any other way that i can generate classes using swagger ...
1
vote
2answers
247 views

Is a Java SDK like JSforce available?

I am working to integrate my Java application with Salesforce Service Cloud. Searching about it, I saw that there is a very nice JS library, JSforce but I could not find anything similar for Java. ...
0
votes
1answer
379 views

Marketing Cloud - duplicate primary key on event data update

I have set up a Data Extension that contains my custom data for Accounts, with a field 'ContactID' that is set as a primary key and mapped to SubscriberKey. I have then created a Journey Builder Event ...
1
vote
1answer
640 views

How to create JSON string for REST callout from Wrapper class

I have found a lot of different examples of this, but I'm still having troubles accomplishing this. Here is the webservice which is working: //WORKING Webservice in target org @RestResource(...
8
votes
1answer
86 views

Which date format to use with inputs for the Quick Actions REST API? (INVALID_TYPE_ON_FIELD_IN_RECORD)

I'm receiving the error INVALID_TYPE_ON_FIELD_IN_RECORD when invoking a custom sobject quick action to create a record and its payload specifies a Date or DateTime field as an input value. For ...
4
votes
2answers
2k 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 ...
1
vote
1answer
416 views

How to upload an image as a binary file via the Linkedin API v2 with a 'POST' request

I want to know how to make a proper 'POST' request to upload an image as a binary file to Linkedin via their API. This is what they say in their documentation (https://docs.microsoft.com/en-us/...
2
votes
1answer
25 views

ApexREST Websrvice StatusCode with ResponseBody

I am writing a REST Webservice and have the following piece of Code. @RestResource(urlMapping='/UpdateTransaction') global with sharing class OpportunityTransaction { @HttpPost global static ...
1
vote
1answer
64 views

Rest API Method

Does the REST API support querying mobile push demographics? How to retrieve mobile push demographics data for a given contact key ? I searched the documentation https://developer.salesforce.com/...
0
votes
0answers
5 views

Is there a way for a third party widget to access prechatDetails (passed by live agent chasitorInit REST API) later on?

We have a widget which we'd like to embed in a visual force page as an iframe. This widget would like to make a call to Salesforce to retrieve certain preChatDetails that were passed by a separate app ...
0
votes
2answers
620 views

Callout to SAP from Salesforce using REST API

I am trying to pass a json data to an external URL. With a basic knowledge, I have added them to remote site settings. The sample URL is http://xyz-xyz.sap.xx.com:50000/xyz/xyz. I have created an apex ...
0
votes
0answers
21 views

OCAPI and its usage with SFCC

I am really new to the concept of RESTful APIs, OCAPI and there usage with the Commerce Cloud. I have the following questions. Please help me out as I might be really stuck: I am trying to fetch a ...
4
votes
1answer
1k views

API Connection To Sandbox URL

I have a vendor that is trying to establish an API connection to our sandbox. Is this the correct URL for sandbox? https://test.salesforce.com/services/oauth2/token
0
votes
1answer
28 views

Building Salesforce Applications using the Salesforce API

I am creating a salesforce deduping application using python. The issue I am running into is that deduping applications literally take hours to run through large databases. How do others execute ...
0
votes
1answer
33 views

Journey API Entry Source - EventDefinition Key not found - errorcode 10000

I'm trying to fire one journey though API entry source but I get the error { "message": "EventDefinitionKey 'APIEvent-43f63b4f-02f4-62d2-cc88-c433c5dc0a76' not found", "errorcode": 10000, "...
1
vote
1answer
24 views

How to prevent a records from being returned in response to a Web Service call if they have been sent in the previous call?

How to prevent a records from being returned in response to a Web Service call if they have been sent in the previous call? @RestResource(urlMapping='/Demo/*') global class ...
2
votes
1answer
434 views

Error calling a custom Rest API in Salesforce

I am facing a weird issue and was wondering if anyone had faced this error. Here are the details: I have written a Custom Rest Service in my Salesforce Sandbox org named CustomAccountService which ...