Ballerina API Documentation

Functions of org.wso2.ballerina.connectors.salesforcerest package

function buildBaseUrl(string apiInstance) (string )

Parameters:

Parameter NameData TypeDescription
apiInstancestring

Return Parameters:

Return VariableData TypeDescription
string


Connectors of org.wso2.ballerina.connectors.salesforcerest package

connector ClientConnector (string accessToken, string clientId, string clientSecret, string refreshToken, string apiInstance, string refreshEndpoint)

Salesforcerest client connector

Parameters:

Parameter NameData TypeDescription
accessTokenstringThe accessToken of the salesforce connected app to access the salesforce REST API
clientIdstringThe clientId of the salesforce connected app to access the salesforce REST API
clientSecretstringThe clientSecret of the salesforce connected app to access the salesforce REST API
refreshTokenstringThe refreshToken of the salesforce connected app to access the salesforce REST API
apiInstancestringThe api instance of the organization
refreshEndpointstringaccessToken: The accessToken of the salesforce connected app to access the salesforce REST API

Actions:

action createMultipleRecords(string apiVersion, string sobjectName, json payload)

Create multiple records

Parameters:

Parameter NameData TypeDescription
apiVersionstringThe api version to send request to
sobjectNamestringThe relevant sobject name
payloadjsonjson payload containing record data

Return Parameters:

Return VariableData TypeDescription
Responseresponse message

action createRecord(string apiVersion, string sobjectName, json payload)

Creates new records

Parameters:

Parameter NameData TypeDescription
apiVersionstringThe api version to send request to
sobjectNamestringThe relevant sobject name
payloadjsonjson payload containing record data

Return Parameters:

Return VariableData TypeDescription
Responseresponse message

action delete(string apiVersion, string sobjectName, string deleteId)

Deletes existing record

Parameters:

Parameter NameData TypeDescription
apiVersionstringThe api version to send request to
sobjectNamestringThe relevant sobject name
deleteIdstringapiVersion: The api version to send request to

Return Parameters:

Return VariableData TypeDescription
Responseresponse message

action describeGlobal(string apiVersion)

Lists the available objects and their metadata for your organization???s data

Parameters:

Parameter NameData TypeDescription
apiVersionstringThe api version to send request to

Return Parameters:

Return VariableData TypeDescription
Responseresponse message

action listAvailableApiVersion()

Lists summary information about each REST API version currently available

Parameters:

Parameter NameData TypeDescription

Return Parameters:

Return VariableData TypeDescription
Responseresponse message

action listOrganizationLimits(string apiVersion)

Lists limits information for your organization

Parameters:

Parameter NameData TypeDescription
apiVersionstringThe api version to send request to

Return Parameters:

Return VariableData TypeDescription
Responseresponse message

action listResourcesByApiVersion(string requestingApiVersion)

Lists the resources available for the specified API version

Parameters:

Parameter NameData TypeDescription
requestingApiVersionstringThe api version to get resources

Return Parameters:

Return VariableData TypeDescription
Responseresponse message

action listviewQueryPerformanceFeedback(string apiVersion, string listViewId)

Get feedback on how Salesforce will execute your list view

Parameters:

Parameter NameData TypeDescription
apiVersionstringThe api version to send request to
listViewIdstringThe id of the listview to get the feedback from

Return Parameters:

Return VariableData TypeDescription
Responseresponse message

action query(string apiVersion, string queryString)

Executes the specified SOQL query

Parameters:

Parameter NameData TypeDescription
apiVersionstringThe api version to send request to
queryStringstringThe request SOQL query

Return Parameters:

Return VariableData TypeDescription
Responseresponse message

action queryAll(string apiVersion, string queryString)

QueryAll will return records that have been deleted because of a merge or delete, archived Task and Event records

Parameters:

Parameter NameData TypeDescription
apiVersionstringThe api version to send request to
queryStringstringThe request SOQL query

Return Parameters:

Return VariableData TypeDescription
Responseresponse message

action queryAllMore(string apiVersion, string nextRecordsUrl)

If the queryAll results are too large, retrieve the next batch of results

Parameters:

Parameter NameData TypeDescription
apiVersionstringThe api version to send request to
nextRecordsUrlstringThe url sent with first batch of queryAll results to get the next batch

Return Parameters:

Return VariableData TypeDescription
Responseresponse message

action queryMore(string apiVersion, string nextRecordsUrl)

If the query results are too large, retrieve the next batch of results

Parameters:

Parameter NameData TypeDescription
apiVersionstringThe api version to send request to
nextRecordsUrlstringThe url sent with first batch of query results to get the next batch

Return Parameters:

Return VariableData TypeDescription
Responseresponse message

action queryPerformanceFeedback(string apiVersion, string queryString)

Get feedback on how Salesforce will execute your query

Parameters:

Parameter NameData TypeDescription
apiVersionstringThe api version to send request to
queryStringstringThe request SOQL query

Return Parameters:

Return VariableData TypeDescription
Responseresponse message

action retrieveFieldValues(string apiVersion, string sobjectName, string rowId, string fields)

Retrieve field values from a record

Parameters:

Parameter NameData TypeDescription
apiVersionstringThe api version to send request to
sobjectNamestringThe relevant sobject name
rowIdstringThe row ID of the required record
fieldsstringThe comma separated set of required fields

Return Parameters:

Return VariableData TypeDescription
Responseresponse message

action retrieveFieldValuesFromExternalObject(string apiVersion, string sobjectName, string rowId, string fields)

Retrieve field values from an external record

Parameters:

Parameter NameData TypeDescription
apiVersionstringThe api version to send request to
sobjectNamestringThe relevant sobject name
rowIdstringThe row ID of the required record
fieldsstringThe comma separated set of required fields

Return Parameters:

Return VariableData TypeDescription
Responseresponse message

action retrieveStandardFieldValuesFromExternalObjectWithExternalId(string apiVersion, string sobjectName, string externalId, string fields)

Retrieve field values from an external record with external ID

Parameters:

Parameter NameData TypeDescription
apiVersionstringThe api version to send request to
sobjectNamestringThe relevant sobject name
externalIdstringThe row ID of the required external record
fieldsstringThe comma separated set of required fields

Return Parameters:

Return VariableData TypeDescription
Responseresponse message

action sObjectBasicInfo(string sobjectName, string apiVersion)

Describes the individual metadata for the specified object

Parameters:

Parameter NameData TypeDescription
sobjectNamestringThe relevant sobject name
apiVersionstringThe api version to send request to

Return Parameters:

Return VariableData TypeDescription
Responseresponse message

action sObjectDescribe(string sobjectName, string apiVersion)

Completely describes the individual metadata at all levels for the specified object

Parameters:

Parameter NameData TypeDescription
sobjectNamestringThe relevant sobject name
apiVersionstringThe api version to send request to

Return Parameters:

Return VariableData TypeDescription
Responseresponse message

action sObjectGetDeleted(string apiVersion, string sobjectName, string startTime, string endTime)

Retrieves the list of individual records that have been deleted within the given timespan for the specified object

Parameters:

Parameter NameData TypeDescription
apiVersionstringThe api version to send request to
sobjectNamestringThe relevant sobject name
startTimestringThe start time of the time span
endTimestringThe end time of the time span

Return Parameters:

Return VariableData TypeDescription
Responseresponse message

action sObjectGetUpdated(string apiVersion, string sobjectName, string startTime, string endTime)

Retrieves the list of individual records that have been updated (added or changed) within the given timespan for the specified object

Parameters:

Parameter NameData TypeDescription
apiVersionstringThe api version to send request to
sobjectNamestringThe relevant sobject name
startTimestringThe start time of the time span
endTimestringThe end time of the time span

Return Parameters:

Return VariableData TypeDescription
Responseresponse message

action sObjectPlatformAction(string apiVersion)

Query for actions displayed in the UI, given a user, a context, device format, and a record ID

Parameters:

Parameter NameData TypeDescription
apiVersionstringThe api version to send request to

Return Parameters:

Return VariableData TypeDescription
Responseresponse message

action sObjectRows(string apiVersion, string sobjectName, string rowId)

Accesses records based on the specified object ID

Parameters:

Parameter NameData TypeDescription
apiVersionstringThe api version to send request to
sobjectNamestringThe relevant sobject name
rowIdstringapiVersion: The api version to send request to

Return Parameters:

Return VariableData TypeDescription
Responseresponse message

action sObjectRowsByExternalId(string apiVersion, string sobjectName, string fieldId, string fieldValue)

Creates new records or updates existing records (upserts records) based on the value of a specified external ID field

Parameters:

Parameter NameData TypeDescription
apiVersionstringThe api version to send request to
sobjectNamestringThe relevant sobject name
fieldIdstringThe external field id
fieldValuestringThe external field value

Return Parameters:

Return VariableData TypeDescription
Responseresponse message

action update(string apiVersion, string sobjectName, string recordId, json payload)

Updates an existing record

Parameters:

Parameter NameData TypeDescription
apiVersionstringThe api version to send request to
sobjectNamestringThe relevant sobject name
recordIdstringapiVersion: The api version to send request to
payloadjsonjson payload containing record data

Return Parameters:

Return VariableData TypeDescription
Responseresponse message

action upsert(string apiVersion, string sobject, string externalField, string fieldValueId, json payload)

If record exists, update it else inserts it

Parameters:

Parameter NameData TypeDescription
apiVersionstringThe api version to send request to
sobjectstringapiVersion: The api version to send request to
externalFieldstringThe external field id
fieldValueIdstringThe external field value
payloadjsonjson payload containing record data

Return Parameters:

Return VariableData TypeDescription
Responseresponse message


Menu

  • Functions
    • buildBaseUrl(string apiInstance) (string )
  • Connectors
    • ClientConnector (string accessToken, string clientId, string clientSecret, string refreshToken, string apiInstance, string refreshEndpoint)
      • createMultipleRecords(string sobjectName, json payload)
      • createRecord(string sobjectName, json payload)
      • delete(string sobjectName, string deleteId)
      • describeGlobal()
      • listAvailableApiVersion()
      • listOrganizationLimits()
      • listResourcesByApiVersion()
      • listviewQueryPerformanceFeedback(string listViewId)
      • query(string queryString)
      • queryAll(string queryString)
      • queryAllMore(string nextRecordsUrl)
      • queryMore(string nextRecordsUrl)
      • queryPerformanceFeedback(string queryString)
      • retrieveFieldValues(string sobjectName, string rowId, string fields)
      • retrieveFieldValuesFromExternalObject(string sobjectName, string rowId, string fields)
      • retrieveStandardFieldValuesFromExternalObjectWithExternalId(string sobjectName, string externalId, string fields)
      • sObjectBasicInfo(string apiVersion)
      • sObjectDescribe(string apiVersion)
      • sObjectGetDeleted(string sobjectName, string startTime, string endTime)
      • sObjectGetUpdated(string sobjectName, string startTime, string endTime)
      • sObjectPlatformAction()
      • sObjectRows(string sobjectName, string rowId)
      • sObjectRowsByExternalId(string sobjectName, string fieldId, string fieldValue)
      • update(string sobjectName, string recordId, json payload)
      • upsert(string sobject, string externalField, string fieldValueId, json payload)

Copyright 2017 Ballerina API Documentation