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.

0
votes
1answer
46 views

Issue with REST API in Production

We have a mobile app(Not Salesforce1) where the data is pulled from Salesforce using REST API. The basic functionality of the app is to return GranChild records when any Search Term is entered in ...
2
votes
1answer
23 views

How to update child in Master-Detail relationship with REST API?

I have a Master-Detail relationship with Accounts and Locations. I am able to create the child using upsert, but when I try to update the Account__c field I get (INVALID_FIELD_FOR_INSERT_UPDATE: ...
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 ...
1
vote
1answer
43 views

[Trailhead][Apex Rest Callout] I failed run test because of JSONException

When I studied Apex REST Callouts, I faced with JSONException in Test Callouts section. How can I solve this problem? I made prerequisites(AnimalsCallouts.cls, Static Resource) and made test class(...
0
votes
2answers
31 views

How to get test coverage of org while running validation jobs?

In our CI process, we trigger a job for validation in Jenkins and have an ant target which runs the validation first with checkOnly as true and runs all the tests. build.xml : <target name="...
2
votes
1answer
130 views

Unsubscribe process on external page with update to _Unsubscribe dataview

What I would like to achieve is an email unsubscribe process that is secure, performant and on an external page with the ability to update the internal system table (dataview) _Unsubscribe. How I ...
1
vote
1answer
1k views

Multiple values for same parameter in GET request?

How can i get multiple values for same parameter for below rest request using Rest request method? https://cs40.salesforce.com/services/apexrest/Membership?include=Membership:member&_include=...
4
votes
1answer
756 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 ...
3
votes
2answers
1k views

Create/Update Global Value Set using Tooling API

Can someone tell me how to create and update Global value set using tooling API? No sure what so send in request body.
0
votes
1answer
24 views

Using autonumber field type as externalId to make an upsert & store values in a Map from soql by external id

I know that those questions asked a few times here - but I saw that it little old (Greater than 3 years) and\or it doesn't have the "best answer" so I hope something changed about it. 1) Is there a ...
0
votes
0answers
14 views

Salesforce REST API Call to an External API (IdentityServer3) Login Error

I have a project where I need to connect to an API to get data. I tested the API in postman and I'am able to get data, but when I try to connect from Salesforce I having a problem in authentication. ...
3
votes
1answer
864 views

How create a Live Agent Session by REST API

I read documentation: https://resources.docs.salesforce.com/196/latest/en-us/sfdc/pdf/live_agent_rest.pdf https://piotrczechumski.wordpress.com/2014/06/22/live-agent-rest-api-documentation/ and ...
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 (...
0
votes
2answers
46 views

to access username field using LoginHistory Object

I am trying to access Username field (which is present in User Object) Using LoginHistory Object as follow: SELECT+Username+FROM+LoginHistory but is shows below error: [{"message":"\nSELECT ...
2
votes
1answer
120 views

How to retrieve records from data extension of different business unit using AMPScript REST API call and also how to insert record

I am using this call in AMPScript To retrieve: https://www.exacttargetapis.com/data/v1/customobjectdata/key/[Data extension key]?$filter= Name%20eq%20'Test' To insert: https://www.exacttargetapis.com/...
1
vote
2answers
47 views

REST api - Update email and status subscriber into AllSubscribers

I am studing the api call to insert/update (upsert) one or more subscribers both in a dedicated data extension and AllSubscribers at the same time. I found this api calls: - https://developer....
0
votes
0answers
24 views

Parameters in Rest API Callout url

I have a requirement to pass parameters which acts as filters in the rest API callout from salesforce. The url is https://pmobilet.electra.co.il/odata/Priority/tabula.ini/elecisr/ELC_SMAXPART?$...
0
votes
1answer
32 views

Deploying Metadata with rest resources

As of API 43 there seems to have been some rest resources added to the metadata api. This Documentation Seems to be lacking the ability to tell me how they want me to send the zip package with the ...
-3
votes
4answers
893 views

Apex Callout, how to set body? [closed]

I am struggling to configure body for http request. This is what I have received from integration team. "body": { "mode": "formdata", "formdata": [ { "key": "sourceFile", ...
0
votes
1answer
25 views

Using getRESTAPISessionKey from Lightning Container

Does anyone know how to properly call into RESTApi using LCC.getRESTAPISessionKey()? For example from https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/...
0
votes
1answer
25 views

JSON structure in Salesforce?

How would i store this kind of JSON structure in salesforce? "elementOne": [ { "itemOne":"valueOne", "itemTwo":"valueTw0", "embeddedElementOne":{"embeddedItemOne":"embeddedValueOne"}, ...
0
votes
1answer
33 views

Apex Rest API : Is it possible to support accept parameter with “plain/text”

I am trying to implement a webhook from a 3rd party application (Eventbrite) using a Custom REST API in Salesforce.The issue here is that 3rd party API uses "Accept: text/plain" parameter in their ...
0
votes
1answer
734 views

Implementing Web Server OAuth Authentication Flow

I am trying to implement Web Server Authentication Flow.I have two orgs , source and destination.In destination org I have created connected app and rest resource where I am using post method of rest ...
0
votes
0answers
16 views

Connection from Android mobile sdk to the Einstein Vision Services

i am looking for a way to send Rest-Requests to the Einstein Vision Rest-API via Android. The integrated RestRequest class somehow only supports Requests to the Salesforce Platform and doesn't let me ...
0
votes
1answer
360 views

Webservice @httpPost method authentication

Quick response on this would be helpful. I'm able to send request body from Workbench as source to my org as destination for creation of records. But what i need is how to perform the same operation ...
1
vote
1answer
32 views

Is there a better rest endpoint for downloading file contents?

I'm trying to use https://[domain]/sfc/servlet.shepherd/version/download/ to download files (lightning files not attachments) from salesforce and it works sometimes and I can get it to work in postman ...
-1
votes
2answers
321 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
59 views

How to post a financial force sales invoice

We are working with the Salesforce REST API for interacting with an installed FinancialForce package. This process has been mostly painless right up until we needed to POST an invoice. The apex ...
0
votes
0answers
20 views

generate request to upload file via rest api axway

I a creating an rest api at apex class to post a file upload but each time i am getting an Bad request, i have tried everything but still no breakthrough. Here is my code as using the blob method to ...
1
vote
2answers
62 views

Issue getting Salesforce Data Using REST API

Well, first am all new into the REST API's. I am not getting what I am doing wrong. Below are the steps I am following: Created a Lightning Connected App and got CONSUMER_KEY and SECRET_KEY. Hitting ...
3
votes
3answers
172 views

How do I select Opportunities where Account name LIKE “Vegan Delight”

Given an Account name such as "Vegan Delight" should I get the ID of the Account first? Do I then do: SELECT Id, Name from Opportunity WHERE AccountId='oio23094' or is there a way to look this up ...
0
votes
2answers
790 views

How to connect two sales force org using REST web service?

We are trying to migrate data from one sales force org to other using REST web service. Created REST service in one org trying use that service from other org but getting error "System.HttpResponse[...
1
vote
1answer
26 views

Retrieving enterprise WSDL via SOAP API endpoint?

Is there an endpoint to retrieve the enterprise WSDL file via salesforce (SOAP) API? All I found is the option to retrieve it via standard curl request but I would expect that there is an official ...
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 ...
1
vote
2answers
62 views

Send multiple json message

I try to send multiple message using REST to this url : https://www.exacttargetapis.com/messaging/v1/messageDefinitionSends/key:{key}/send. My json look like this : [ { "From": {}, "To": { ...
0
votes
0answers
19 views

Help me with Test class for REST API POST method . not able to cover this part of code [duplicate]

CallOut Method: public static void callout(String jsonString, String jsonStringWS, List lstId){ //do callout here rest or soap System.debug('jsonString>:'+jsonString); System....
6
votes
1answer
120 views

Is it possible to call REST api from lightning:container

I'm seeing conflicting information: On one hand, the lightning:container docs state that you can use this npm package to get a REST Session Key. On the other hand, the spring 18 release notes say ...
1
vote
2answers
526 views

[{“message”:“limits resource is not enabled”,“errorCode”:“API_DISABLED_FOR_ORG”}]; HTTP Status: 403

I am trying to consume sales force rest api service in my application.At that time,i am getting this exception [{"message":"limits resource is not enabled","errorCode":"API_DISABLED_FOR_ORG"}]; HTTP ...
0
votes
2answers
36 views

Rest API Composite - Error 302

I am using Composite API to get the opportunity record but facing 302 error { "compositeRequest" : [ { "method" : "GET", "url" : "/services/data/v42.0/query/?q=select+id,...
1
vote
1answer
24 views

How to enable read permissions for organization sobject?

I'm trying to use the salesforce standard rest api to access the organization sobject so I can read the name of an organization I'm working with. I make a soql query "SELECT Id,Name FROM Organization ...
0
votes
0answers
26 views

Record Lock Issue for REST endpoint

I have built a REST endpoint, which writes data(Accounts) to Salesforce. Currently, for a single record, there could be multiple (20-30 times) upserts within 1-to-5 seconds. Behind the scenes, it's a ...
0
votes
1answer
26 views

WB REST API POST

I need connect an application with salesforce. This aplication will send data to the system, and salesforce work with them. In this case, in the third application, user choose products. When user ...
3
votes
2answers
86 views

Is there a way to identify all the places a Content Block is used?

I'm trying to identify all the places a Content Block is used. The goal is to be able to reference what will be affected if a Content Block is modified. I've looked a the Asset in the REST API, but I ...
0
votes
0answers
22 views

Associating Knowledge articles with categories using REST API

The SOAP API suggests that articles can be associated with categories using Article Type__DataCategorySelection. I can't find information about using the REST API to do this and I've had no luck using ...
1
vote
1answer
29 views

React Mobile App & Salesforce [closed]

We are building a Mobile App (using React Native) which will allow users (of Persona-A) to login via External Identity Provider. We have another set of users (Persona-B) who login to Salesforce Custom ...
0
votes
1answer
54 views

How to check for duplicates while creating a record via Salesforce API

I have a usecase where users need to create Lead via Salesforce API. The use case is when user tries to create lead, the system checks if the lead or contact already exists with the same information. ...
1
vote
2answers
66 views

API post call returns lots of addition text

https://api.ivr-platform.com/api/token-auth after submission this doesn't return just the json object but the entire webpage with a json object in the text. public without sharing class ...
-1
votes
1answer
20 views

Creating and populating reports through api [closed]

Is it possible to create and populate a report using data that isn't in salesforce already? Like populating a table? Please give an example/source if you can.
3
votes
1answer
388 views

Salesforce opportunity stages

Is that possible to get the stage name, probability and forecast category using SOQL/Apex/APIs ? and I could not find that you can pull that data.
4
votes
0answers
21 views

Calling the UI Api from a community with a custom domain name - getting sun.validator exception [duplicate]

Context: we're using the UI api to get some Record Type dependent picklist values back. This is happening in a community context. In the lower environments (dev, QA) this works without issue. The ...