public class RestRequest
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
RestRequest.RestEndpoint
Enumeration for all REST API endpoints.
|
static class |
RestRequest.RestMethod
Enumeration for all HTTP methods.
|
static class |
RestRequest.SObjectTree
Helper class for getRequestForSObjectTree.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALL_OR_NONE |
static java.lang.String |
ATTRIBUTES |
static java.lang.String |
BATCH_REQUESTS |
static java.lang.String |
BATCH_SIZE_OPTION |
static java.lang.String |
BODY |
static java.lang.String |
COMPOSITE_REQUEST |
static int |
DEFAULT_BATCH_SIZE |
static java.lang.String |
HALT_ON_ERROR |
static java.text.DateFormat |
HTTP_DATE_FORMAT
HTTP date format
|
static java.lang.String |
HTTP_HEADERS |
static java.lang.String |
IF_UNMODIFIED_SINCE |
static java.text.DateFormat |
ISO8601_DATE_FORMAT
Salesforce timestamp format.
|
static int |
MAX_BATCH_SIZE |
static int |
MAX_COLLECTION_RETRIEVE_SIZE |
static MediaType |
MEDIA_TYPE_JSON
application/json media type
|
static java.lang.String |
METHOD |
static int |
MIN_BATCH_SIZE |
static java.lang.String |
RECORDS
Misc keys appearing in requests
|
static java.lang.String |
REFERENCE_ID |
static java.lang.String |
RICH_INPUT |
static java.lang.String |
SERVICES_DATA |
static java.lang.String |
SERVICES_OAUTH2 |
static java.lang.String |
SFORCE_QUERY_OPTIONS |
static java.lang.String |
TYPE |
static java.lang.String |
URL |
static java.lang.String |
UTF_8
utf_8 charset
|
Constructor and Description |
---|
RestRequest(RestRequest.RestMethod method,
RestRequest.RestEndpoint endpoint,
java.lang.String path,
JSONObject requestBodyAsJson,
java.util.Map<java.lang.String,java.lang.String> additionalHttpHeaders)
Generic constructor for arbitrary requests.
|
RestRequest(RestRequest.RestMethod method,
RestRequest.RestEndpoint endpoint,
java.lang.String path,
RequestBody requestBody,
java.util.Map<java.lang.String,java.lang.String> additionalHttpHeaders)
Generic constructor for arbitrary requests.
|
RestRequest(RestRequest.RestMethod method,
java.lang.String path)
Generic constructor for arbitrary requests without a body.
|
RestRequest(RestRequest.RestMethod method,
java.lang.String path,
JSONObject requestBodyAsJson)
Generic constructor for arbitrary requests.
|
RestRequest(RestRequest.RestMethod method,
java.lang.String path,
JSONObject requestBodyAsJson,
java.util.Map<java.lang.String,java.lang.String> additionalHttpHeaders)
Generic constructor for arbitrary requests.
|
RestRequest(RestRequest.RestMethod method,
java.lang.String path,
java.util.Map<java.lang.String,java.lang.String> additionalHttpHeaders)
Generic constructor for arbitrary requests without a body.
|
RestRequest(RestRequest.RestMethod method,
java.lang.String path,
RequestBody requestBody)
Generic constructor for arbitrary requests.
|
RestRequest(RestRequest.RestMethod method,
java.lang.String path,
RequestBody requestBody,
java.util.Map<java.lang.String,java.lang.String> additionalHttpHeaders)
Generic constructor for arbitrary requests.
|
Modifier and Type | Method and Description |
---|---|
protected JSONObject |
asJSON() |
java.util.Map<java.lang.String,java.lang.String> |
getAdditionalHttpHeaders() |
static BatchRequest |
getBatchRequest(java.lang.String apiVersion,
boolean haltOnError,
java.util.List<RestRequest> requests)
Batch request
|
static RestRequest |
getCheapRequest(java.lang.String apiVersion)
Cheap request to re-hydrate access token
|
static CompositeRequest |
getCompositeRequest(java.lang.String apiVersion,
boolean allOrNone,
java.util.LinkedHashMap<java.lang.String,RestRequest> refIdToRequests)
Composite request
|
RestRequest.RestEndpoint |
getEndpoint() |
RestRequest.RestMethod |
getMethod() |
java.lang.String |
getPath() |
RequestBody |
getRequestBody() |
JSONObject |
getRequestBodyAsJson() |
static RestRequest |
getRequestForCollectionCreate(java.lang.String apiVersion,
boolean allOrNone,
JSONArray records)
Request for creating multiple records with fewer round trips
|
static RestRequest |
getRequestForCollectionDelete(java.lang.String apiVersion,
boolean allOrNone,
java.util.List<java.lang.String> objectIds)
Request for deleting multiple records with fewer round trips
|
static RestRequest |
getRequestForCollectionRetrieve(java.lang.String apiVersion,
java.lang.String objectType,
java.util.List<java.lang.String> objectIds,
java.util.List<java.lang.String> fieldList)
Request for retrieving multiple records with fewer round trips
|
static RestRequest |
getRequestForCollectionUpdate(java.lang.String apiVersion,
boolean allOrNone,
JSONArray records)
Request for updating multiple records with fewer round trips
|
static RestRequest |
getRequestForCollectionUpsert(java.lang.String apiVersion,
boolean allOrNone,
java.lang.String objectType,
java.lang.String externalIdField,
JSONArray records)
Request for upserting multiple records with fewer round trips
|
static RestRequest |
getRequestForCreate(java.lang.String apiVersion,
java.lang.String objectType,
java.util.Map<java.lang.String,java.lang.Object> fields)
Request to create a record.
|
static RestRequest |
getRequestForDelete(java.lang.String apiVersion,
java.lang.String objectType,
java.lang.String objectId)
Request to delete a record.
|
static RestRequest |
getRequestForDescribe(java.lang.String apiVersion,
java.lang.String objectType)
Request to completely describe the individual metadata at all levels for the specified object.
|
static RestRequest |
getRequestForDescribeGlobal(java.lang.String apiVersion)
Request to list the available objects and their metadata for your organization's data.
|
static RestRequest |
getRequestForLimits(java.lang.String apiVersion)
Request for getting information about limits in your org
|
static RestRequest |
getRequestForMetadata(java.lang.String apiVersion,
java.lang.String objectType)
Request to describe the individual metadata for the specified object.
|
static RestRequest |
getRequestForNotification(java.lang.String apiVersion,
java.lang.String notificationId)
Request to get a notification.
|
static RestRequest |
getRequestForNotifications(java.lang.String apiVersion,
java.lang.Integer size,
java.util.Date before,
java.util.Date after)
Request for getting notifications.
|
static RestRequest |
getRequestForNotificationsStatus(java.lang.String apiVersion)
Request to get status of notifications for the user.
|
static RestRequest |
getRequestForNotificationsUpdate(java.lang.String apiVersion,
java.util.List<java.lang.String> notificationIds,
java.util.Date before,
java.lang.Boolean read,
java.lang.Boolean seen)
Request for updating notifications.
|
static RestRequest |
getRequestForNotificationUpdate(java.lang.String apiVersion,
java.lang.String notificationId,
java.lang.Boolean read,
java.lang.Boolean seen)
Request for updating a notification.
|
static RestRequest |
getRequestForObjectLayout(java.lang.String apiVersion,
java.lang.String objectAPIName,
java.lang.String formFactor,
java.lang.String layoutType,
java.lang.String mode,
java.lang.String recordTypeId)
Request to get object layout data.
|
static RestRequest |
getRequestForPrimingRecords(java.lang.String apiVersion,
java.lang.String relayToken,
java.lang.Long changedAfterTime)
Request for getting list of record related to offline briefcase
|
static RestRequest |
getRequestForQuery(java.lang.String apiVersion,
java.lang.String q)
Request to execute the specified SOQL query.
|
static RestRequest |
getRequestForQuery(java.lang.String apiVersion,
java.lang.String q,
int batchSize)
Request to execute the specified SOQL query.
|
static RestRequest |
getRequestForQueryAll(java.lang.String apiVersion,
java.lang.String q)
Request to execute the specified SOQL query which includes deleted records because of a merge or delete in the result set.
|
static RestRequest |
getRequestForResources(java.lang.String apiVersion)
Request to list available resources for the specified API version, including resource name and URI.
|
static RestRequest |
getRequestForRetrieve(java.lang.String apiVersion,
java.lang.String objectType,
java.lang.String objectId,
java.util.List<java.lang.String> fieldList)
Request to retrieve a record by object ID.
|
static RestRequest |
getRequestForSearch(java.lang.String apiVersion,
java.lang.String q)
Request to execute the specified SOSL search.
|
static RestRequest |
getRequestForSearchResultLayout(java.lang.String apiVersion,
java.util.List<java.lang.String> objectList)
Request to get search result layouts
|
static RestRequest |
getRequestForSearchScopeAndOrder(java.lang.String apiVersion)
Request to get search scope and order.
|
static RestRequest |
getRequestForSingleAccess(java.lang.String redirectUri)
Request to generate URL to bridge into UI sessions (a front door URL)
Applications should use that API instead of building front door URLs directly
|
static RestRequest |
getRequestForSObjectTree(java.lang.String apiVersion,
java.lang.String objectType,
java.util.List<RestRequest.SObjectTree> objectTrees)
Request to create one or more sObject trees with root records of the specified type.
|
static RestRequest |
getRequestForUpdate(java.lang.String apiVersion,
java.lang.String objectType,
java.lang.String objectId,
java.util.Map<java.lang.String,java.lang.Object> fields)
Request to update a record.
|
static RestRequest |
getRequestForUpdate(java.lang.String apiVersion,
java.lang.String objectType,
java.lang.String objectId,
java.util.Map<java.lang.String,java.lang.Object> fields,
java.util.Date ifUnmodifiedSinceDate)
Request to update a record.
|
static RestRequest |
getRequestForUpsert(java.lang.String apiVersion,
java.lang.String objectType,
java.lang.String externalIdField,
java.lang.String externalId,
java.util.Map<java.lang.String,java.lang.Object> fields)
Request to upsert (update or insert) a record.
|
static RestRequest |
getRequestForUserInfo()
Request to get information about the user making the request.
|
static RestRequest |
getRequestForVersions()
Request to get summary information about each Salesforce.com version currently available.
|
java.lang.String |
toString() |
public static final MediaType MEDIA_TYPE_JSON
public static final java.lang.String UTF_8
public static final java.lang.String RECORDS
public static final java.lang.String METHOD
public static final java.lang.String URL
public static final java.lang.String BODY
public static final java.lang.String HTTP_HEADERS
public static final java.lang.String COMPOSITE_REQUEST
public static final java.lang.String BATCH_REQUESTS
public static final java.lang.String ALL_OR_NONE
public static final java.lang.String HALT_ON_ERROR
public static final java.lang.String RICH_INPUT
public static final java.lang.String SERVICES_DATA
public static final java.lang.String SERVICES_OAUTH2
public static final java.lang.String REFERENCE_ID
public static final java.lang.String TYPE
public static final java.lang.String ATTRIBUTES
public static final java.lang.String IF_UNMODIFIED_SINCE
public static final java.lang.String SFORCE_QUERY_OPTIONS
public static final java.lang.String BATCH_SIZE_OPTION
public static final int MIN_BATCH_SIZE
public static final int MAX_BATCH_SIZE
public static final int DEFAULT_BATCH_SIZE
public static final int MAX_COLLECTION_RETRIEVE_SIZE
public static final java.text.DateFormat HTTP_DATE_FORMAT
public static final java.text.DateFormat ISO8601_DATE_FORMAT
public RestRequest(RestRequest.RestMethod method, java.lang.String path)
method
- HTTP method used in the request (GET/POST/DELETE etc).path
- URI path. This is automatically resolved against the user's current instance host.public RestRequest(RestRequest.RestMethod method, java.lang.String path, java.util.Map<java.lang.String,java.lang.String> additionalHttpHeaders)
method
- HTTP method used for the request (GET/POST/DELETE etc).path
- URI path. This will automatically be resolved against the user's current instance host.additionalHttpHeaders
- Additional headers.public RestRequest(RestRequest.RestMethod method, java.lang.String path, RequestBody requestBody)
method
- HTTP method used for the request (GET/POST/DELETE etc).path
- URI path. This will automatically be resolved against the user's current instance host.requestBody
- Request body, if one exists. Can be null.
Note: Do not use this constructor if requestBody is not null and you want to build a batch or composite request.public RestRequest(RestRequest.RestMethod method, java.lang.String path, JSONObject requestBodyAsJson)
method
- HTTP method used for the request (GET/POST/DELETE etc).path
- URI path. This will automatically be resolved against the user's current instance host.requestBodyAsJson
- Request body as JSON, if one exists. Can be null.
Note: Use this constructor if requestBody is not null and you want to build a batch or composite request.public RestRequest(RestRequest.RestMethod method, java.lang.String path, RequestBody requestBody, java.util.Map<java.lang.String,java.lang.String> additionalHttpHeaders)
method
- HTTP method used for the request (GET/POST/DELETE etc).path
- URI path. This will automatically be resolved against the user's current instance host.requestBody
- Request body, if one exists. Can be null.additionalHttpHeaders
- Additional headers.
Note: Do not use this constructor if requestBody is not null and you want to build a batch or composite request.public RestRequest(RestRequest.RestMethod method, java.lang.String path, JSONObject requestBodyAsJson, java.util.Map<java.lang.String,java.lang.String> additionalHttpHeaders)
method
- HTTP method used for the request (GET/POST/DELETE etc).path
- URI path. This will automatically be resolved against the user's current instance host.requestBodyAsJson
- Request body as JSON, if one exists. Can be null.additionalHttpHeaders
- Additional headers.
Note: Use this constructor if requestBody is not null and you want to build a batch or composite request.public RestRequest(RestRequest.RestMethod method, RestRequest.RestEndpoint endpoint, java.lang.String path, RequestBody requestBody, java.util.Map<java.lang.String,java.lang.String> additionalHttpHeaders)
method
- HTTP method used for the request (GET/POST/DELETE etc).endpoint
- The endpoint associated with the request.path
- URI path. This will be resolved against the user's current
Rest endpoint, as specified by the endpoint parameter.requestBody
- Request body, if one exists. Can be null.additionalHttpHeaders
- Additional headers.public RestRequest(RestRequest.RestMethod method, RestRequest.RestEndpoint endpoint, java.lang.String path, JSONObject requestBodyAsJson, java.util.Map<java.lang.String,java.lang.String> additionalHttpHeaders)
method
- HTTP method used for the request (GET/POST/DELETE etc).endpoint
- The endpoint associated with the request.path
- URI path. This will be resolved against the user's current
Rest endpoint, as specified by the endpoint parameter.requestBodyAsJson
- Request body as JSON, if one exists. Can be null.additionalHttpHeaders
- Additional headers.public RestRequest.RestMethod getMethod()
public RestRequest.RestEndpoint getEndpoint()
public java.lang.String getPath()
public RequestBody getRequestBody()
public JSONObject getRequestBodyAsJson()
public java.util.Map<java.lang.String,java.lang.String> getAdditionalHttpHeaders()
public static RestRequest getRequestForUserInfo()
public static RestRequest getRequestForSingleAccess(java.lang.String redirectUri) throws java.io.UnsupportedEncodingException
redirectUri
- A relative path that points to where the user is redirected when their new session begins.java.io.UnsupportedEncodingException
public static RestRequest getRequestForVersions()
public static RestRequest getRequestForResources(java.lang.String apiVersion)
apiVersion
- Salesforce API version.public static RestRequest getRequestForDescribeGlobal(java.lang.String apiVersion)
apiVersion
- Salesforce API version.public static RestRequest getRequestForMetadata(java.lang.String apiVersion, java.lang.String objectType)
apiVersion
- Salesforce API version.objectType
- Type of object for which the caller is requesting object metadata.public static RestRequest getRequestForDescribe(java.lang.String apiVersion, java.lang.String objectType)
apiVersion
- Salesforce API version.objectType
- Type of object for which the caller is requesting the metadata description.public static RestRequest getRequestForCreate(java.lang.String apiVersion, java.lang.String objectType, java.util.Map<java.lang.String,java.lang.Object> fields)
apiVersion
- Salesforce API version.objectType
- Type of record to be created.fields
- Map of the new record's fields and their values. Can be null.public static RestRequest getRequestForRetrieve(java.lang.String apiVersion, java.lang.String objectType, java.lang.String objectId, java.util.List<java.lang.String> fieldList) throws java.io.UnsupportedEncodingException
apiVersion
- Salesforce API version.objectType
- Type of the requested record.objectId
- Salesforce ID of the requested record.fieldList
- List of requested field names.java.io.UnsupportedEncodingException
public static RestRequest getRequestForUpdate(java.lang.String apiVersion, java.lang.String objectType, java.lang.String objectId, java.util.Map<java.lang.String,java.lang.Object> fields)
apiVersion
- Salesforce API version.objectType
- Type of the record.objectId
- Salesforce ID of the record.fields
- Map of the fields to be updated and their new values.public static RestRequest getRequestForUpdate(java.lang.String apiVersion, java.lang.String objectType, java.lang.String objectId, java.util.Map<java.lang.String,java.lang.Object> fields, java.util.Date ifUnmodifiedSinceDate)
apiVersion
- Salesforce API version.objectType
- Type of the record.objectId
- Salesforce ID of the record.fields
- Map of the fields to be updated and their new values. Can be null.ifUnmodifiedSinceDate
- Fulfill the request only if the record has not been modified since the given date.public static RestRequest getRequestForUpsert(java.lang.String apiVersion, java.lang.String objectType, java.lang.String externalIdField, java.lang.String externalId, java.util.Map<java.lang.String,java.lang.Object> fields)
apiVersion
- Salesforce API version.objectType
- Type of the record.externalIdField
- Name of ID field in source data.externalId
- ID of source data record. Can be an empty string.fields
- Map of the fields to be upserted and their new values. Can be null.public static RestRequest getRequestForDelete(java.lang.String apiVersion, java.lang.String objectType, java.lang.String objectId)
apiVersion
- Salesforce API version.objectType
- Type of the record.objectId
- Salesforce ID of the record.public static RestRequest getRequestForSearch(java.lang.String apiVersion, java.lang.String q) throws java.io.UnsupportedEncodingException
apiVersion
- Salesforce API version.q
- SOSL search string.java.io.UnsupportedEncodingException
public static RestRequest getRequestForQuery(java.lang.String apiVersion, java.lang.String q) throws java.io.UnsupportedEncodingException
apiVersion
- Salesforce API version.q
- SOQL query string.java.io.UnsupportedEncodingException
public static RestRequest getRequestForQuery(java.lang.String apiVersion, java.lang.String q, int batchSize) throws java.io.UnsupportedEncodingException
apiVersion
- Salesforce API version.q
- SOQL query string.batchSize
- Batch size: number between 200 and 2000 (default).java.io.UnsupportedEncodingException
public static RestRequest getRequestForQueryAll(java.lang.String apiVersion, java.lang.String q) throws java.io.UnsupportedEncodingException
apiVersion
- Salesforce API version.q
- SOQL query string.java.io.UnsupportedEncodingException
public static RestRequest getRequestForSearchScopeAndOrder(java.lang.String apiVersion)
apiVersion
- Salesforce API version.public static RestRequest getRequestForSearchResultLayout(java.lang.String apiVersion, java.util.List<java.lang.String> objectList) throws java.io.UnsupportedEncodingException
apiVersion
- Salesforce API version.objectList
- List of objects whose search result layouts are being requested.java.io.UnsupportedEncodingException
public static RestRequest getRequestForObjectLayout(java.lang.String apiVersion, java.lang.String objectAPIName, java.lang.String formFactor, java.lang.String layoutType, java.lang.String mode, java.lang.String recordTypeId)
apiVersion
- Salesforce API version.objectAPIName
- Object API name.formFactor
- Form factor. Could be "Large", "Medium" or "Small". Default value is "Large".layoutType
- Layout type. Could be "Compact" or "Full". Default value is "Full".mode
- Mode. Could be "Create", "Edit" or "View". Default value is "View".recordTypeId
- Record type ID. Default will be used if not supplied.public static CompositeRequest getCompositeRequest(java.lang.String apiVersion, boolean allOrNone, java.util.LinkedHashMap<java.lang.String,RestRequest> refIdToRequests) throws JSONException
apiVersion
- Salesforce API version.allOrNone
- Indicates whether the request will accept partially complete results.refIdToRequests
- Linked map of reference IDs to RestRequest objects. The requests will be played in order in which they were added.JSONException
public java.lang.String toString()
toString
in class java.lang.Object
protected JSONObject asJSON() throws JSONException
JSONException
public static BatchRequest getBatchRequest(java.lang.String apiVersion, boolean haltOnError, java.util.List<RestRequest> requests) throws JSONException
apiVersion
- Salesforce API version.haltOnError
- Indicates whether to stop processing the batch if an error occurs.requests
- List of RestRequest objects.JSONException
public static RestRequest getRequestForSObjectTree(java.lang.String apiVersion, java.lang.String objectType, java.util.List<RestRequest.SObjectTree> objectTrees) throws JSONException
apiVersion
- Salesforce API version.objectType
- Type of object requested.objectTrees
- List of {link #SObjectTree} objects.JSONException
public static RestRequest getRequestForNotificationsStatus(java.lang.String apiVersion)
apiVersion
- Salesforce API version.public static RestRequest getRequestForNotification(java.lang.String apiVersion, java.lang.String notificationId)
apiVersion
- Salesforce API version.notificationId
- ID of notification.public static RestRequest getRequestForNotificationUpdate(java.lang.String apiVersion, java.lang.String notificationId, java.lang.Boolean read, java.lang.Boolean seen)
apiVersion
- Salesforce API version.notificationId
- ID of notification.read
- Marks notification as read (true) or unread (false). If null, field won't be updated.
Required if `seen` not provided.seen
- Marks notification as seen (true) or unseen (false). If null, field won't be updated.
Required if `read` not provided.public static RestRequest getRequestForNotifications(java.lang.String apiVersion, java.lang.Integer size, java.util.Date before, java.util.Date after)
apiVersion
- Salesforce API version.size
- Number of notifications to get.before
- Get notifications occurring before the provided date. Shouldn't be used with `after`.after
- Get notifications occurring after the provided date. Shouldn't be used with `before`.public static RestRequest getRequestForNotificationsUpdate(java.lang.String apiVersion, java.util.List<java.lang.String> notificationIds, java.util.Date before, java.lang.Boolean read, java.lang.Boolean seen)
apiVersion
- Salesforce API version.notificationIds
- IDs of notifications to get. Shouldn't be used with `before`.before
- Get notifications before the provided date. Shouldn't be used with `notificationIds`.read
- Marks notifications as read (true) or unread (false). If null, field won't be updated.
Required if `seen` not provided.seen
- Marks notifications as seen (true) or unseen (false). If null, field won't be updated.
Required if `read` not provided.public static RestRequest getRequestForPrimingRecords(java.lang.String apiVersion, java.lang.String relayToken, java.lang.Long changedAfterTime) throws java.io.UnsupportedEncodingException
apiVersion
- Salesforce API version.relayToken
- Relay token (to get next page of results) - or nullchangedAfterTime
- To only get ids of records that changed after given time - or nulljava.io.UnsupportedEncodingException
public static RestRequest getRequestForCollectionCreate(java.lang.String apiVersion, boolean allOrNone, JSONArray records) throws JSONException
apiVersion
- Salesforce API version.allOrNone
- Indicates whether to roll back the entire request when the creation of any object fails (true) or to continue with the independent creation of other objects in the request.records
- A list of sObjects.JSONException
public static RestRequest getRequestForCollectionRetrieve(java.lang.String apiVersion, java.lang.String objectType, java.util.List<java.lang.String> objectIds, java.util.List<java.lang.String> fieldList) throws java.io.UnsupportedEncodingException, JSONException
apiVersion
- Salesforce API version.objectType
- Type of the requested record.objectIds
- List of Salesforce IDs of the requested records.fieldList
- List of requested field names.java.io.UnsupportedEncodingException
JSONException
public static RestRequest getRequestForCollectionUpdate(java.lang.String apiVersion, boolean allOrNone, JSONArray records) throws JSONException
apiVersion
- Salesforce API version.allOrNone
- Indicates whether to roll back the entire request when the update of any object fails (true) or to continue with the independent update of other objects in the request.records
- A list of sObjects.JSONException
public static RestRequest getRequestForCollectionUpsert(java.lang.String apiVersion, boolean allOrNone, java.lang.String objectType, java.lang.String externalIdField, JSONArray records) throws JSONException
apiVersion
- Salesforce API version.allOrNone
- Indicates whether to roll back the entire request when the upsert of any object fails (true) or to continue with the independent upsert of other objects in the request.objectType
- Type of the requested record.externalIdField
- Name of ID field in source data.records
- A list of sObjects.JSONException
public static RestRequest getRequestForCollectionDelete(java.lang.String apiVersion, boolean allOrNone, java.util.List<java.lang.String> objectIds) throws java.io.UnsupportedEncodingException
apiVersion
- Salesforce API version.allOrNone
- Indicates whether to roll back the entire request when the delete of any object fails (true) or to continue with the independent delete of other objects in the request.objectIds
- List of Salesforce IDs of the records to delete.java.io.UnsupportedEncodingException
public static RestRequest getRequestForLimits(java.lang.String apiVersion)
apiVersion
- Salesforce API version.public static RestRequest getCheapRequest(java.lang.String apiVersion)
apiVersion
-