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
17 views

nforce org.getUrl(url,cb) url pattern?

I have a Node app running on heroku where I am using the nforce lib. I received { Error: Could not find a match for URL error.} while using org.getUrl from nforce library. For the url string, I have ...
0
votes
1answer
29 views

What's the problem with this backslash in SOQL query?

I'm receiving a String query with query params (via URL), and one is mandatory and seven are optional. So if i don't receive a param, shouldn't be included in the query. For instance: My code is: ...
0
votes
0answers
32 views

Create a StandardValueSet via Tooling API

I am currently working on StandardValueSet and I would like to try to insert an entry in the said resource. I looked at the documentation and it sort of lacks the necessary information for me to be ...
0
votes
0answers
40 views

Escaping HTML in JSON in rest callout

I am sending some html content inside json in the body of a REST callout from Salesforce to Dotdigital per their specs which is working well overall. string.escapeHTML4 is handling most of the ...
0
votes
0answers
17 views

how to add Loop conditions in apex test classes? [duplicate]

Could anyone help me how to write a test class for this logic.I'm little confusing here. public with sharing class XMLparserForIds { public String XMLString1 = '<?xml version="1.0" encoding="...
0
votes
0answers
27 views

Apex API Callout [closed]

Whenever a Account is created, the records details need to be sent to an external system using Apex. I searched many articles and got details about HTTPRequest and HTTPResponse which will help to ...
0
votes
1answer
26 views

not able to access the variable values after using the continuation class

private class StateInfo { Account acc {get; set;} StateInfo(Account acc){ this.acc = acc; } Contact cont {get; set;} StateInfo(Account acc, ...
0
votes
1answer
50 views

CLoudingo: SFDC Rest API JSON callout. 400 error returned

The code below is running, i had to pass on the login credentials to Cloudingo because it is/was a stateless REST API call from SFDC to CLoudingo. Have to hardcode the key/password into the SFDC Code. ...
1
vote
0answers
18 views

What API limits are imposed on Knowledge Base REST API?

I would like to know what limitations are there on the Knowledge Base REST API? Would this use the same API limits imposed in a Salesforce org? or does it also use the Site.com limits (number of page ...
0
votes
1answer
47 views

Rest API request on behalf of specific user

I have to retrieve data from Salesforce (using default endpoint for Rest Api SOQL queries) for a specific user. Now for getting Access_token I'm using "grant_type: password" with "System User" who has ...
1
vote
2answers
50 views

HttpResponse[Status=BAD_REQUEST, StatusCode=400]

I'm trying to sending a field value to third part but here the issue is Suppose the filed is Name = "Test Account" here in this case call will be failed but for suppose Field Name is like Name = ...
0
votes
1answer
25 views

Auto Refresh Access Token

I have written this method to get accesstoken when I send Id & password given(Which I havent Hardcoded Below). I am saving my access token in custom setting and want it to expire, call this method ...
1
vote
1answer
58 views

Get the Info of a REST API Sender

Is there a way to get the Sender info in a Rest WebService? for example : Part A - Sender sends this JSON Via POST Request : Http httpProtocol = new Http(); HttpRequest request = new HttpRequest();...
0
votes
0answers
30 views

How to call REST API from Javascript

I have REST end point (like http://18.xx.11.212:8010/KKT/getteledetails) and parameters are in JSON format like { "teledetails" : "AHG45", "StartDate" : "" }. Now I want to call the above REST ...
0
votes
0answers
8 views

Outbound messages removes TextArea Long, for bulk data upload

I built a Outbound Message endpoint, which works like a middleware, and calls other endpoint, which is REST based. When I create/update a single record, it sends all the info specified in the ...
0
votes
2answers
31 views

Can we send Rich text Field's HTML from Service Cloud to any other system Via API

We have a use case where the Users will make text entries in a Rich Text Salesforce Field and will do customization on the input text field with the salesforce provided rich field's capability. We ...
-1
votes
1answer
30 views

How can I use OAUTH on Salesforce Live Agent REST API

We want to use OAUTH - userid/password flow to access salesforce live agent rest API. We have implemented this for other rest api provided by salesforce. However the live agent rest api are wide open ...
1
vote
2answers
54 views

SF Bearer Token behaves differently for different REST API Methods

I'm currently dealing with an authentication issue with two different Salesforce REST API endpoints. We are trying to consume the API from inside a Visualforce page in a Salesforce community. To do ...
3
votes
1answer
42 views

REST API 12MB Limit

I'm receiving a PDF in Base64 from an external web service, the PDF is received in JSON along with some other details. Is there anything I can do to avoid the Heap size being blown when converting the ...
0
votes
2answers
52 views

Marketing Cloud API CORS problem

I would highly appreciate if anyone could help me in handling CORS policy for Salesforce Marketing Cloud API requests… The situation is following: I need to make direct API calls to Marketing Cloud ...
1
vote
1answer
35 views

REST API for metadata components / types?

I have been doing some research and I am unable to find the correct endpoint for fetching Metadata Types & Components. Somehow, in workbench they are able to fetch this information and it can be ...
2
votes
1answer
47 views

Difference between Authorization Code and Access Token [closed]

Can you please explain the difference between authorization code, access token and bearer token? I've been looking for this on Google but didn't clear things for me. From REST API dev guide all I ...
2
votes
2answers
43 views

Which endpoints are supported for OAuth2 token authorization?

Documentation says that for OAuth2 token authorization URL like login.salesforce.com should be used For authorization: https://login.salesforce.com/services/oauth2/authorize For token requests: https:...
0
votes
0answers
30 views

401 Unauthorized Invalid_session_id error while using refresh token

3rd Party app needs to access Salesforce resources without user interaction. I am trying to use OAuth refresh token - Refresh token . I generated an access token and a refresh token using postman and ...
1
vote
1answer
91 views

Apex Rest - Api error handling HTTP status codes

I am trying to handle multiple error codes in my REST service. Can anyone guide me if I am doing this correctly. try { if(Limits.getDmlRows() < Limits.getLimitDmlRows()){ ...
0
votes
1answer
29 views

How can I add “set-cookie” to a RestResponse?

A few years ago, Salesforce disabled debug logs for REST guest calls. The only way to enable generating the logs is to add a cookie to the incoming call. Docs here. The incoming call in my case is ...
0
votes
1answer
34 views

Rest API Salesforce with Certificate

I have a Rest API Service: @HttpPost global static String actualizarAveriaIngenico(String numorden_stu, String numproceso_mant, String estado_averia, String nombre_tecnico, String ...
0
votes
0answers
20 views

Fire event using oauth

Switching from the generic endpoint to tenant endpoint is giving me issues injecting a contact into a journey. If I test the setup in postman everything works fine. Converting the 'old' method to the '...
1
vote
0answers
55 views

Tooling API not retrieving relationship name/label

Querying on Customfield using Tooling API in workbench is returning relationship label "null" even if object has the relationship field(lookup/master-detail). For Example: My Object has 3 relationship ...
1
vote
1answer
39 views

How can I disable my existing Apex REST Webservice in production?

I have an existing Apex REST Webservice configured in production for consumption by a partner for Lead creation. However, we are not working with that partner anymore and hence want to disable this ...
0
votes
0answers
8 views

OBJ: Product2 - Scheduling is not enabled for this type: Revenue Schedule Type Via OData

We just enabled revenue scheduling for client as soon as we enable revenue schedule, we no longger able to edit or create product via REST API, and receiving "OBJ: Product2 - Scheduling is not enabled ...
0
votes
0answers
14 views

How to authenticate REST API without being redirected to the Login page? [duplicate]

I have a Web application on a remote server that needs to send a JSON object(generated on my user's browser) to be stored on my SF object. The problem is that according to the documentation and a few ...
0
votes
1answer
35 views

How to insert order and orderitems in single rest call in salesforce

How to insert order and orderitems in single rest call in salesforce? Add an Order to an Existing Account https://developer.salesforce.com/docs/atlas.en-us.api_placeorder.meta/api_placeorder/...
0
votes
0answers
9 views

Download ContentNotes linked to entities by others

I have an org with SNotes enabled. I am trying to use REST API to query SNotes on Account. If the current user adds an SNOTE, then a simple SOQL query like so returns it: GET /services/data/v42.0/...
1
vote
1answer
92 views

REST Request - AWS Access Key ID and AWS Secret Access Key [closed]

I am reading this document Authenticating Rest Requests The first paragraph says .. Every non-anonymous request to S3 must contain authentication information to establish the identity of the ...
0
votes
0answers
31 views

Performing multiple operations on same record in same transaction [duplicate]

I am trying to do three operation using same record. First Operation: Set ContentDocument isArchived field to false. Second Operation: Grab contentdocument by calling REST API Endpoint. Third ...
0
votes
1answer
49 views

Convert hierarchically structured JSON data into a list of sObjects Contact

My webservice contains hierarchical data so that I cannot transform it into an sObject when making the GET request. Here is an example for Contact, but the phone number is grouped so that I cannot ...
0
votes
1answer
30 views

Restructure hierarchical data in a REST callout

I found contact data as JSON on the web that is not organized as the Contact sObject as the phone number is being stored as hierarchical data: please see https://api.androidhive.info/contacts/ for the ...
0
votes
1answer
45 views

How to Retrieve large data from Salesforce using Rest API?

I have one new requirement where My client wants to retrieve large data set (~80K records) from Salesforce daily. I have created rest web service but it returns only 2k records. for 80k records, do ...
1
vote
1answer
300 views

{“error”:“invalid_grant”,“error_description”:“authentication failure”}

Hi I am trying to connect one salesforce org to another but getting below error in response body while trying to get the access token using the username password flow in oauth. Please suggest what is ...
1
vote
0answers
85 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 ...
1
vote
0answers
42 views

HTTP GET Response with 204 Status Code and blank Body [closed]

I send Callout request to ActiveMq messages queue service to get messages form there and handle it in Salesforce. In the Queue there are 3000 messages. When I send the request from salesforce sometime ...
0
votes
1answer
94 views

How to create Knowledge Article in Salesforce using REST API

In response to the question : Create Salesforce KB article using API I used the curl call that is provided and I run into the below error : [ { "message": "entity type cannot be ...
0
votes
1answer
39 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
0answers
49 views

Python-driven Bulk API 2.0 hardDelete yields “errorMessage”: “InvalidBatch : InvalidBatch : The 'delete' batch must contain only ids”

I am trying to write a bit of python code to permanently delete some records using the Salesforce.com Bulk API v2. Using curl, I have success. I: create an Bulk API 2 hardDelete job PUT the file to ....
0
votes
0answers
68 views

Successful REST API POST returns error

I am working with the SF Commerce Cloud Connector package. We've been struggling to get this set up right. At first, when we made our calls we were getting this error: [ { "errorCode": "...
14
votes
1answer
707 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 ...
0
votes
0answers
21 views

REST call for ApprovaProcess and ApprovalEntryCriteria not working

I posted a question about this some days ago. I'm trying to retrieve ApprovalEntryCriteria for an specific ApprovalProcess via metadata REST call: /services/data/v44.0/metadata/salesforce/types/...
1
vote
1answer
15 views

oauth2 password flow bahaving different between my personal dev site and our corporate sandbox dev site

I'm learning the REST Api in order to write some integration code with our Salesforce implementation. As a first step, I signed up as a Salesforce developer, and did several of the tutorials. I then ...
0
votes
0answers
18 views

Retrieve approval process entry criteria via REST Api

I'm trying to retrieve an Approval Process entry criteria by its API Name. I know you can get the Id querying ProcessDefinition but I need to retrieve entry criteria via REST. I've seen that ...