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
1
vote
1answer
38 views

How to determine when someone has been removed from a campaign (REST API)

Similar to this question, I'd like to be able to fire off a query (from an external application) to determine when someone is removed from a Salesforce Campaign. The question I linked has a good ...
1
vote
0answers
64 views

How to upload a Salesforce File using REST API properly?

GET /services/data/v47.0/sobjects/ContentVersion/0000v00000MFIVgAAP/VersionData from this request I will get binary file content, but how can I use this content to recreate the file properly (using ...
3
votes
1answer
929 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 ...
6
votes
0answers
47 views

Metadata API: any drawback when using REST instead of SOAP?

Is there any drawback on using Metadata API through REST (that became available since Winter'19)? I only see good things such as: Smaller payloads: probably improving performance reducing the network ...
1
vote
1answer
33 views

Querying Salesforce Campaigns for Newly Added Contacts

I'd like to pull all of the contacts who have recently been added to a campaign using HTTP requests (from an external application). My current method is using a GET request with the URL /sobjects/...
2
votes
1answer
460 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, ...
1
vote
2answers
28 views

What is the best way to determine when a campaign has had a new contact added to it?

If I want to use Salesforce's REST API to return campaigns who have recently had members added to them, what is the easiest way to do so? I am trying to do this externally, using authentication ...
1
vote
3answers
10k views

OAuth2 token request failing

My access token request is failing with the following error response in HTTP Response. { error: "invalid_client_id" error_description: "client identifier invalid" } I am trying with the Username-...
0
votes
1answer
381 views

Rest Request Callout

I am new in salesforce and I have this rest request to get the access token of the other org so that I can get the installed packages. My problem is, I get an error in sending the authorization ...
0
votes
1answer
380 views

Salesforce REST JSON Nested Self-Related Objects?

ooks like I need some help here. Salesforce documentation and multiple google searches not gave me an answer. Problem description: I'm trying to insert (POST) nested self-related records using REST ...
0
votes
1answer
20 views

How to get a value from a REST Callout from a Trigger

hope you are all well. I have do have one question : I need to create a custom object that collects data from an external web service. According to a picklist value from this object, I need to set a ...
0
votes
1answer
34 views

Getting error, “You have uncommitted work pending” after invoking rest method via Process builder

I found many resources available on stackexchange regarding this issue. We cannot make a callout after doing any dml. But i do not think i am doing any DML operation in my code. Logical flow of my ...
0
votes
1answer
751 views

Making REST API calls from Salesforce to Marketo [duplicate]

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, ...
1
vote
1answer
768 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
2answers
4k views

ErrorCode 180008 - Unable to queue Triggered Send request. There are no valid subscribers

I'm trying to send an email by ET rest api in Java. I already successfully sent a SMS and got a token in response, but an error is triggered with emails. Here is the JSON I send : { "To": {"...
0
votes
1answer
400 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
1k 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 ...
1
vote
2answers
406 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
854 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
0answers
25 views

REST Mutual Authentication Certificate [duplicate]

I need to setup my rest endpoint to authenticate using Digital Certificates. When doing research about mutual authentication the examples are only using soap. https://help.salesforce.com/articleView?...
0
votes
0answers
32 views

error on trying to insert Opportunity Contact Role

I'm getting this error when trying to create an Opportunity Contact Role via the REST API: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: entity type cannot be inserted: Opportunity Contact Role I suspect ...
0
votes
0answers
16 views

Salesforce Einstein get dataflowjob status REST API

I was able to call a dataflow through REST API with the following: Request: /services/data/v48.0/wave/dataflowjobs Request Body: { "dataflowId": "02K2w0000009xxxxx", "command" : "start" } ...
2
votes
1answer
22 views

API Rest Salesforce :Describe layouts does not return all layouts

I just created a new org, so there are different layout on the Account object: Account Layout Account (Marketing) Layout Account (Sales) Layout Account (Support) Layout But when I retrieve the ...
0
votes
1answer
59 views

System.JSONException: Unexpected character ('a' (code 97)): was expecting double-quote to start field name at [line:1, column:3]

I´m trying to complete a trailhead challenge but when I test the method, it appears the error System.JSONException: Unexpected character ('a' (code 97)): was expecting double-quote to start field ...
1
vote
1answer
29 views

Sharing rules not respected for related queries

I have set my Account to Private. I have Activity (Task) set to Private I have two users - Joe Schmoe and Karen Hoyts. I have created an account Joe's Account. Under that account, i create a task ...
0
votes
0answers
573 views

AMQP protocol from Apex - RabbitMQ

I am trying to connect and send data to RAbbit MQ messaging protocol. At all places it is provided that we should use AMQP protocol and this is something I am not sure how to do from Apex. Has anyone ...
22
votes
3answers
28k views

Issues with connected App - {“error_description”:“authentication failure”,“error”:“invalid_grant”}

I've successfully implemented the oAuth2 authentication process using the Web Server Flow of the REST API between my application and Salesforce, and it's working great when connecting with a Developer ...
0
votes
0answers
24 views

How to Convert Candidate Patient record into Salesforce Account in health Cloud?

I'm creating patient records through apex REST api in Salesforce Health Cloud.Actually Patient records have Account lookup field.How can I convert newly created candidate patient record into Patient ...
0
votes
0answers
31 views

Rest api not returning notes via get service in workbench

I am using workbench get service to get enhanced notes child records for a given account. Even though enhanced note data is present for that record, I am not getting any data back from the service ...
3
votes
1answer
514 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 ...
-1
votes
1answer
30 views

Rest API response to deserialise in to map to compare the data with other object.Value is not comparing and hence campaign data is not updating [closed]

http request : My intention here to compare the resopnse data with campaign object data and then update the campaign Http http = new Http(); HttpRequest httpReq = new HttpRequest(); ...
0
votes
1answer
34 views

Can't create assets outside parent folder via Fuel SDK

I'm trying to create assets using the Marketing Cloud PHP Fuel SDK, and I'm running into a problem where the assets are being created (as in, I can retrieve a list of assets and see the assets I've ...
0
votes
0answers
19 views

I cant able to get more code coverage cant able to parse json deserilalize code [duplicate]

I am inserting multiple invoice and invoice items at using post web service REST API Bulkinsert_InvoiceInvoiceitems class @RestResource(urlMapping='/InsertInvoiceandInvoiceitems/*') global ...
1
vote
1answer
462 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 ...
22
votes
2answers
1k 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
475 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 ...
6
votes
1answer
235 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" ], "...
0
votes
1answer
41 views

REST Api Contracts and Documentation

I'm integrating with an external system, they will be able to send a POST request through REST API and create records of a custom object I've created in my org. I need to send to the client the ...
1
vote
1answer
92 views

Using curl to make a REST API call

I need to call a rest API service in Saleforce from an external client. This application logins in Salesforce with the SOAP standard login service and then has to call some custom services. The ...
0
votes
2answers
44 views

Using Salesforce oauth to make calls to own account/app

We use salesforce in our website. I'm new to it, and still can't find a way to calls REST api to our own account without going long way of visiting oauth login page, granting access etc(oauth flow). ...
0
votes
1answer
506 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
476 views

FATAL_ERROR|System.TypeException: That operation is only allowed from within an active site. Class.System.Site.createPortalUser

This is my code.But am getting an error i.e FATAL_ERROR|System.TypeException: That operation is only allowed from within an active site. Class.System.Site.createPortalUser. Please correct my ...
0
votes
1answer
78 views

Internal Server Error When POST to Marketing Cloud create contact REST API

I am getting an internal server error when trying to save a contact in Marketing Cloud with Rest API. The body of my request is: { "contactKey": "acruz@example.com", "attributeSets": [ ...
-1
votes
2answers
94 views

Empty request body when when using curl

I have a rest service in salesforce which it has to receive different requests. When I test the service sending requests, if I use a REST Client I am able to get the requestbody properly but if I use ...
0
votes
1answer
536 views

Post request returns error 405 on ngrok

I'm using ngrok in order to tunnel localhost and check my REST request from Salesforce. However, when I send POST request I get error 405 - method not allowed. Below there is my code: HttpRequest ...
0
votes
0answers
77 views

Setting up Named Credential for External Rest API with OAuth2.0

I am trying to understand how to set up the Named Credentials & OAuth Provider in Salesforce for calling the External REST API. Before setting this up I tested the call to the REST API through ...
1
vote
1answer
63 views

Calling out via Named Credential - API vs Token endpoint

I created Named Credentials to authorize the api and got the token. Now i want to use the same end point to get the weatherdetail. when i tried to access same named credential then its showing error ...
1
vote
0answers
71 views

REST services getting empty result for User object

We set up a REST service to retrieve data from our org. Everything works great, except for the queries to the User object. When the query returns we get an empty list. This used to work (it was ...
1
vote
1answer
587 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 = ...
1
vote
1answer
696 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 ...

1
2 3 4 5
15