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
539 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
1answer
1k views

Status Returned 200 but response body is blank

I'm new to integration. I am going to generate an access token for the third-party application. I tried to build following javascript request in sfdc. But the response body is blank. I need to ...
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
0answers
144 views

Soql does not return record Id in main class. But returns in Test class

Hope you all are doing well. I have a issue when writing test class. I have created a method where I am inserting a objectA record. Once the ObjectA record is inserted, objectB record get ...
0
votes
0answers
94 views

REST API Call to OKTA with filter fail

I'm building an integration with OKTA using APEX. One of the actions I need to call is: get all the users which has updated in the past hour. I'm executing the following code and get an error: 400 ...
0
votes
0answers
78 views

How to consume OAuth 1.0 webservice in salesforce

I have another application which I need to call and they are using OAuth 1.0. now I am calling their system endpoint, I have client id and client secret only. Do I need to generate token also? ...
0
votes
1answer
441 views

Can't update existing record with external ID

I have this script that gets time entries from a time tracking tool and that I'm trying to push into a custom object in Salesforce : Time_Entry__c. After following this help page : https://developer....
0
votes
0answers
27 views

Get list of recent searches with REST API

Is it possible to get list of recent searches? I mean "search salesforce" input box at top.
0
votes
1answer
120 views

How to test migrated data in salesforce?

We are performing a data migration in salesforce application and i am going to validate the migrated data (including schema at field, table and database level). I planned to use REST API but SQL ...
0
votes
1answer
92 views

Is it possible to get list of all files REST API Chatter?

Does anybody know if it's possible to get list of all files in REST API Chatter? There are examples but they are limited to owner only https://developer.salesforce.com/docs/atlas.en-us.chatterapi....
0
votes
1answer
202 views

Issue with Connected-App. Java-Salesforce Rest API

I am getting an issue from my local java application running at http://localhost:8080. When I enter this address inthe browser, I am being redirected to a login.salesforce.com, but I see a blank ...
0
votes
1answer
29 views

how to use req.params.put in test code for testing htttpGet

i have wrapper class like below public class wrapper_class { public class requestWrapper { string userName; string LastName, string Phone; public (Map params) {...
0
votes
1answer
972 views

store custom exception in Event Log object

I am trying to create a EventLog (Custom object) record when ever a exception is caught. It works fine only when the system exception occurs (Like any DML operation. In my case If I call Update ...
0
votes
2answers
67 views

Need help Rest Webservices

I am new to Rest Webservices and need some help. I have a requirement where the external system creates an account and is calling the Rest webservice to send the created account details as a response ...
0
votes
0answers
400 views

APEX Request giving “errorCode” : “JSON_PARSER_ERROR” } ]

I have built a rest service and trying to create a record with a field of currency type.The rest service looks OK when parameter is been passed with some value However when the format of the request ...
0
votes
1answer
16 views

Uploading Leads to SF Professional Edition using REST API

My company has a Professional Edition Salesforce instance. We're capturing leads on our company website. I have written a simple program that uploads sales leads using the REST API. It works fine ...
0
votes
1answer
560 views

Rest API to query for Products and prices

I have been asked to design some new forms that create Orders in Salesforce. To achieve this I call the webservices often using Query. For these new forms that are related to Ordering I had hoped to ...
0
votes
2answers
5k views

salesforce rest api invalid session id error when using access token

I am trying to retrieve data from salesforce using the REST api and CURL in PHP. I perform the authentication request and receive an 'instance_url' and 'access_token' but after performing a query ...
0
votes
0answers
102 views

System fields in JSON request body

I am preparing dynamic JSON request body for the contact object fields using Schema.getGlobalDescribe class, but i am getting all the system fields in the request body like CreatedDate, IsDeleted, ...
0
votes
0answers
406 views

Convert ContentVersion blob to bytestream for OneDrive Upload (MS Graph API)

I'm attempting to upload a file (VersionData from ContentVersion) to OneDrive using the Graph API Resumable Upload Method: https://dev.onedrive.com/items/upload_large_files.htm I'm able to create ...
0
votes
0answers
82 views

Using REST API to recieve JSON

I have a requirement where a client wishes to send JSON to our org. I've not handled this before, is REST API the best way to go? They are going to use "webhooks to create and send a JSON form" to ...
0
votes
0answers
51 views

Salesforce REST API continuous authentication

Is there a simpler way of accessing my companies data through the REST API, and have the web server that fetches that data be indefinitely authenticated? I tried using the web server flow with a ...
0
votes
0answers
325 views

How to solve Limit Exception : Too many query rows 50001

I have a code which retrieves and displays the results in the VF page from REST Web-Service. In one sandbox , it's working fine. But in other sandbox it returns following error: Limit Exception ...
0
votes
2answers
209 views

How do I enable access to my RESTful, public force.com service from C#?

I have a RESTful Apex service that I can browse to and call using my web browser. A problem occurs when I try to call it from C#: An unhandled exception of type 'System.Net.WebException' occurred ...
0
votes
1answer
222 views

How to filter selected checkbox fields from visualforce page?

i have a visualforce page with some fields all fields are check box fields. if i selected some chck box fields and after saved it. my requirement is how to filter in soql query for all selected ...
0
votes
0answers
56 views

REST API - Get details of first matching record

Suppose I send a GET request to the following endpoint: /services/data/v39.0/sobjects/Contact/Email/test@email.com If there is only one contact with that email, the response I get from the API ...
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
0answers
414 views

How to parse special characters from JSON object in JScontroller of lightning component?

Here is the received REST response(body): {"meta":{"request":"/generic/searchResults","status":"SUCCESS","conversationId":"T4j2SVYPrCTTEmomDAYf","responseTime":34,"resultSize":4,"errors":[],"...
0
votes
1answer
697 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....
0
votes
1answer
170 views

How to check callout URL is active or not?

I had created a rest service in salesforce which makes a callout to URL.I need to check whether the URL is active or not. How this can be done in salesforce?
0
votes
1answer
50 views

API Usage Calculation

How is the API Usage/API Request increased? i am updating 8000 records via a batch in which each record need a callout but my API usage shows only 400 API used after completion of batch
0
votes
2answers
338 views

Trying to upload attachment blob to Egnyte REST API

I am having an issue specifically trying to upload an attachment blob to Egnyte using the REST API. Code is below. Any input is appreciated, I am guessing my POST is missing something but I can't see ...
0
votes
1answer
213 views

Preview a Trigger Send without publishing

Is there a way to trigger an email using a landing page? The only way to see the changes to an email that is part of a Trigger Send is by publishing the changes. But I would like to use a landing ...
0
votes
1answer
159 views

Not able to get access token from salesforce

I am getting authorization code and when i am trying to get the access token than it give error like { "error": "unsupported_grant_type" "error_description": "grant type not supported" } This is my ...
0
votes
0answers
536 views

how to give request uri to access http put method without using apex class in workbench and postman

enter image description here Put Method is Not working for any Requests whereas all Methods are Working Good can anyone Please guide me for the Answer
0
votes
1answer
171 views

End Point URL Error in HTTP Class?

I have a 3rd Party Endpoint Url Which I Paste in browser Address bar I can see the XML Data. But the same Endpoint URL , I invoke via Apex Class (Http Call) I will get a Error Message From the System ...
0
votes
1answer
105 views

Regarding Rest Services using Rest Api

@RestResource(urlMapping='/Account13/*') global with sharing class MyRestResource13 { @HttpPost global static string sendAccount(){ RestRequest req = RestContext.request; ...
0
votes
1answer
136 views

PHP Can't Update Picklist with Existing Value

I'm having a very strange problem with PHP (Laravel with Forrest) and updating values. I've got a pick list called Approved_Rejected__c with the following values: New Submitted Approved Rejected ...
0
votes
0answers
529 views

SoapUI - Community User Login Setup

I want to setup some tests using the SoapUI Tool. The first part of my test involves getting a token for a community user. Since the OAuth flow mechanisms are different for a community user, how can ...
0
votes
1answer
94 views

Set lastmodifieddate and/or createddate of a document when uploading with the REST API

I am making a rest call for inserting a document Can someone please suggest how to set the lastmodifieddate and/or createddate of a document when uploading with the REST API
0
votes
0answers
240 views

Trigger does not fire up when trying to update record using third party application

Good day, everyone I have created a trigger in salesforce and I also create a connected app to send data from my wordpress app to my custom object in salesforce. All is working well when I try to ...
0
votes
0answers
40 views

Connect two salesforce Personal Org [duplicate]

Can someone guide me how i can connect two salesforce personal Org using REST Services. Basically I have very little idea about Web Services. But i want to integrate two Org using REST web service. ...
0
votes
1answer
857 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
77 views

Salesforce Integration Rest

I have a requirement where i have to fetch response from Call Back Url in salesforce. I am not sure how to create a Call Back Url and how to execute a class to parse the XML response. Basically I am ...
0
votes
1answer
70 views

Export/Get Auto Response Rules

Is it possible to export auto response rules in some way? Ultimately I want to either export them into Excel or display on a Visualforce page. I've tried looking at the REST explorer on workbench but ...
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 ...
0
votes
0answers
6k views

REST HTTP Response Error : {“error”:“invalid_client”,“error_description”:“invalid client credentials”}

I am trying to achieve a REST based integration between two Salesforce instances (both of them developer editions) Expense created from source instance will be sent to the destination instance via ...
0
votes
1answer
64 views

How can I associate OAuth credentials to a single REST request?

I am currently working on this app where I make a REST request directly to a table on Salesforce. Currently, it works on Workbench just fine, but I don't understand how to use OAuth with it. I made a ...
0
votes
0answers
419 views

Unexpected parameter encountered during deserialization

I am trying to write a REST service which will send SF objects between Orgs. Right now, as a test, I am sending data to the same Org that it is coming from. I wrote a GET request which worked so I ...
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, ...