296 const Defaults = ...;
300 const DefaultSendEncoding =
"gzip";
303 const RequiredOptions = ...;
307 const AsyncDataloadNs =
"http://www.force.com/2009/06/asyncapi/dataload";
310 const JobInfoAttributes = ...;
440 hash<auto>
patch(
string path,
auto body, *reference<hash<auto>> info, *hash<auto> hdr);
487 hash<auto>
doRequest(
string m,
string path,
auto body, *reference<hash<auto>> info, softbool decode_errors = True, *hash<auto> hdr);
536 hash<auto>
doBulkRequest(
string m,
string path,
auto body, *reference<hash<auto>> info, softbool decode_errors = True, *hash<auto> hdr);
582 hash<auto>
bulkGet(
string path,
auto body, *reference<hash<auto>> info, *hash<auto> hdr);
628 hash<auto>
bulkPost(
string path,
auto body, *reference<hash<auto>> info, *hash<auto> hdr);
663 hash<auto>
bulkJobCreate(
string operation,
string object,
string job_content_type, *reference<hash<auto>> info, *hash<auto> hdr);
698 hash<auto>
bulkJobAddBatch(
string jobid, data batch_data,
string job_content_type, *reference<hash<auto>> info, *hash<auto> hdr);
727 hash<auto>
bulkJobClose(
string jobid, *reference<hash<auto>> info, *hash<auto> hdr);
800 bool isAuthTokenError(
int status_code, hash<auto> headers,
bool body_deserialized, *
string body_content_type,
auto body);
924 constructor(
string name,
string description,
string url, hash<auto> attributes = {}, hash<auto> options = {})
1069 gotOAuth2LoginInfo(hash<auto> h);
*hash< auto > getUpdateOptionsAfterLogin(hash< auto > h)
Returns options to update after an OAuth2 login.
constructor(*hash< auto > opts, *softbool do_not_connect)
creates the object with the given options
setOAuth2LoginInfo(hash< auto > h)
Sets options from the OAuth2 login response on the local object.
static string getBulkDate(date d)
returns a date string for use with Salesforce.com Bulk REST API requests
checkLogin(*reference< hash< auto > > info)
Checks if a login is necessary; if so, then the login is performed.
hash< auto > bulkJobAddBatch(string jobid, data batch_data, string job_content_type, *reference< hash< auto > > info, *hash< auto > hdr)
add a batch to a job using the Bulk REST API
login(*reference< hash< auto > > info)
logs in to Salesforce.com with the credentials provided in the constructor()
*hash< auto > getOAuth2AuthHeaders()
Returns headers to use with OAuth2 authorization / token requests.
*string getApi()
returns the Salesforce.com REST API version currently in use
string oauth2_logout_url
Salesforce.com OAuth2 Revoke Token URL.
Definition SalesforceRestClient.qm.dox.h:315
static hash getOptions(*hash< auto > opts)
returns options for the RestClient::constructor()
static string getGmtDate(date d)
returns a date string in GMT for use in Salesforce.com requests
hash< auto > getOAuth2Options()
Return OAuth2 options.
processApis(*list< auto > apis)
Process the API response from Salesforce and set / verify the client's API level.
string api_used
Salesforce.com REST API version currently in use.
Definition SalesforceRestClient.qm.dox.h:324
setVerifyApi()
Sets / verifies the api level and sets the application URL accordingly.
logout(*reference< hash< auto > > info)
logs out of Salesforce.com by revoking the access token
hash< auto > bulkGet(string path, auto body, *reference< hash< auto > > info, *hash< auto > hdr)
sends an HTTP GET request to the REST server using the Salesforce.com Bulk REST API and returns the r...
checkClientOptions(hash< auto > opts)
verifies that the options passed match the configured options
hash< string, hash< auto > > api_hash
hash of APIs retrieved from GET /services/data; keyed by API version string; values: "label",...
Definition SalesforceRestClient.qm.dox.h:333
hash< auto > bulkPost(string path, auto body, *reference< hash< auto > > info, *hash< auto > hdr)
sends an HTTP POST request to the REST server using the Salesforce.com Bulk REST API and returns the ...
hash< auto > doBulkRequest(string m, string path, auto body, *reference< hash< auto > > info, softbool decode_errors=True, *hash< auto > hdr)
sends a Bulk API REST request to the Salesforce.com server using "rawxml" serialization and returns t...
Mutex m()
Mutex for token acquisition.
string api
Salesforce.com REST API version to be used ("auto" = latest version)
Definition SalesforceRestClient.qm.dox.h:321
hash< auto > bulkJobClose(string jobid, *reference< hash< auto > > info, *hash< auto > hdr)
sends a Bulk REST API job close POST request to the server and returns the deserialized result messag...
hash< auto > patch(string path, auto body, *reference< hash< auto > > info, *hash< auto > hdr)
sends an HTTP PATCH request to the Salesforce.com REST server and returns the response; performs an i...
setApi()
Checks the API and sets the final URL.
hash< auto > loginIntern(*reference< hash > info)
performs authentication and authorization with Salesforce.com using the OAuth2 authorization URL
hash< auto > bulkJobCreate(string operation, string object, string job_content_type, *reference< hash< auto > > info, *hash< auto > hdr)
creates a Salesforce.com batch job and returns the job information as a hash
bool isAuthTokenError(int status_code, hash< auto > headers, bool body_deserialized, *string body_content_type, auto body)
Returns True if the response was related to an authorization token error.
hash< auto > doRequest(string m, string path, auto body, *reference< hash< auto > > info, softbool decode_errors=True, *hash< auto > hdr)
sends an HTTP request to the REST server and returns the response; performs an implicit login to Sale...
setHeaders()
Set headers for Salesforce REST communications.
string instance_url
The instance URL.
Definition SalesforceRestClient.qm.dox.h:327
string id_service_url
The identity service URL.
Definition SalesforceRestClient.qm.dox.h:330
*hash< string, hash< auto > > getApis()
Return available APIs as a hash.
class for Salesforce.com REST connections; returns SalesforceRestClient::SalesforceRestClient objects
Definition SalesforceRestClient.qm.dox.h:894
SalesforceRestClient getImpl(bool connect=True, *hash< auto > rtopts)
returns a SalesforceRestClient::SalesforceRestClient object
constructor(hash< auto > config, *hash< auto > attr)
creates the SalesforceRestConnection connection object
const OAuth2Options
Maps Salesforce REST options to standard options.
Definition SalesforceRestClient.qm.dox.h:906
const OAuth2AuthRequestOptions
options required to support the OAuth2 authorization code grant flow
Definition SalesforceRestClient.qm.dox.h:902
constructor(string name, string description, string url, hash< auto > attributes={}, hash< auto > options={})
creates the SalesforceRestConnection connection object
hash< ConnectionSchemeInfo > getConnectionSchemeInfoImpl()
Returns the ConnectionSchemeInfo hash for this object.
string getType()
returns "sfrests"
Qore::AbstractPollOperation startPollConnect(*Logger::LoggerInterface logger)
Called to start a non-blocking polling ping operation on the remote REST server.
hash< auto > getOAuth2Options()
Returns OAuth2 options in a standard format.
const ConnectionScheme
Connection entry info.
Definition SalesforceRestClient.qm.dox.h:898
const OAuth2DifferentOptionMap
Different OAuth2 option map; standard name => extern name.
Definition SalesforceRestClient.qm.dox.h:913
setChildCapabilities()
Sets child data provider capabilities.
DataProvider::AbstractDataProvider getDataProvider(*hash< auto > constructor_options)
returns a data provider object for this connection
*hash< auto > processOAuth2TokenResponseImpl(hash< auto > resp)
Processes OAuth2 login responses and returns updated options.
*hash< auto > getOAuth2AuthHeaders()
Returns headers to use with OAuth2 authorization / token requests.
*string getPingPath()
Returns the ping path from the ping_path option.
bool hasDataProvider()
returns True as this connection returns a data provider with the getDataProvider() method
checkAuthCodeFeature()
Sets the auth code feature if supported.
const OAuth2StandardToSalesforceOptionMap
Maps standard option names to Salesforce REST option names.
Definition SalesforceRestClient.qm.dox.h:910
*string getAppName()
Returns the data provider application name this connection serves, if any.
string getOAuth2OptionName(string opt)
Returns the OAuth2 option name for this connection.
REST ping polling I/O class with OAuth2 authentication.
Definition SalesforceRestClient.qm.dox.h:1049
const SPS_GET_APIS
Get available APIs.
Definition SalesforceRestClient.qm.dox.h:1054
const BulkJobZipCsv
Salesforce.com bulk job "ZIP_CSV" content type.
Definition SalesforceRestClient.qm.dox.h:225
const BulkJobCsv
Definition SalesforceRestClient.qm.dox.h:216
const BulkJobXml
Salesforce.com bulk job "XML" content type.
Definition SalesforceRestClient.qm.dox.h:222
const BulkJobJson
Salesforce.com bulk job "JSON" content type.
Definition SalesforceRestClient.qm.dox.h:219
const BulkJobZipJson
Salesforce.com bulk job "ZIP_JSON" content type.
Definition SalesforceRestClient.qm.dox.h:228
const BulkJobZipXml
Salesforce.com bulk job "ZIP_XML" content type.
Definition SalesforceRestClient.qm.dox.h:231
const BulkJobQuery
Definition SalesforceRestClient.qm.dox.h:186
const BulkJobUpsert
Salesforce.com bulk job "upsert" operation.
Definition SalesforceRestClient.qm.dox.h:195
const BulkJobDelete
Salesforce.com bulk job "delete" operation.
Definition SalesforceRestClient.qm.dox.h:198
const BulkJobInsert
Salesforce.com bulk job "insert" operation.
Definition SalesforceRestClient.qm.dox.h:189
const BulkJobUpdate
Salesforce.com bulk job "update" operation.
Definition SalesforceRestClient.qm.dox.h:192
the SalesforceRestClient namespace contains all the objects in the SalesforceRestClient module
Definition SalesforceRestClient.qm.dox.h:181
const BulkJobContentTypes
a hash of Salesforce.com bulk job content types; keys are Salesforce.com Bulk REST API Job Content Ty...
Definition SalesforceRestClient.qm.dox.h:243
const BulkJobOperations
a hash of Salesforce.com bulk job operations; keys are Salesforce.com Bulk REST API Job Operations
Definition SalesforceRestClient.qm.dox.h:209