Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


Overview

The following operations allow you to work with Event Monitoring event monitoring in Salesforce. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with list viewsevent monitoring, see Sample configuration

OperationDescription
describeEventMonitoringUse the SObject Describe resource to retrieve Retrieves all metadata for an object, including information about fields, URLs, and child relationships.
queryEventMonitoringDataUse the Query resource to retrieve Retrieves field values from a record. Specify the fields you want to retrieve in the fields parameter and use the GET method of the resource.

Operation details

This section provides further details on the operations related to Event Monitoringevent monitoring.

Anchor
describeEventMonitoring
describeEventMonitoring

Describe the Event Monitoring Log

Retrieving the event monitoring log description

To get retrieve the description of the Event Monitoring Logevent monitoring log, use salesforcerest.describeEventMonitoring and specify the following properties.

Code Block
languagexml
titledescribeEventMonitoring
<salesforcerest.describeEventMonitoring/>
Anchorrequestrequest
Sample request

Following is a sample REST request that can be handled by the describeEventMonitoring operation.

Code Block
languagexml
titleSample Request to describeEventMonitoring
{
  "accessToken":"00D280000017q6q!AQoAQOeXcp7zKo3gUdy6r064_LsJ5bYYrUn_qAZG9TtKFLPfUMRxiato.E162_2XAtCTZLFQTbNk2Rz6Zm_juSakFE_aaBPp",
  "apiUrl":"https://ap2.salesforce.com",
  "clientId": "3MVG9ZL0ppGP5UrBztM9gSLYyUe7VwAVhD9.yQnZX2mmCu_48Uwc._doxrBTgY4jqmOSDhxRAiUBf8gCr2mk7",
  "refreshToken": "5Aep861TSESvWeug_ztpnAk6BGQxRdovMLhHso81iyYKO6hTm45JVxz3FLewCKgI4BbUp19OzGfqG2TdCfqa2ZU",
  "clientSecret": "1187341468789253319",
  "hostName": "https://login.salesforce.com",
  "apiVersion": "v34.0",
  "intervalTime" : "100000",
  "registryPath": "connectors/SalesforceRest"
 }
Related Salesforce REST
Documentation 
documentation 

https://developer.salesforce.com/docs/atlas.en-us.198.0.api_rest.meta/api_rest/dome_event_log_file_describe.htm

Anchor
queryEventMonitoringData
queryEventMonitoringData

Retrieve

Retrieving field values from a record

To Returns retrieve the field values from a record, use salesforcerest.queryEventMonitoringData and specify the following properties.

Code Block
languagexml
titlequeryEventMonitoringData
<salesforcerest.queryEventMonitoringData>
    <queryStringForEventMonitoringData>{$ctx:queryStringForEventMonitoringData}</queryStringForEventMonitoringData>
</salesforcerest.queryEventMonitoringData>
Properties
  • queryStringForEventMonitoringData: The queryString to get the details of the LogThe query string to use to get the field values from the log.
Anchor
request
request
Sample request

Following is a sample REST request that can be handled by the queryEventMonitoringData operation.

Code Block
languagexml
titleSample Request to queryEventMonitoringData
{
  "accessToken":"00D280000017q6q!AQoAQOeXcp7zKo3gUdy6r064_LsJ5bYYrUn_qAZG9TtKFLPfUMRxiato.E162_2XAtCTZLFQTbNk2Rz6Zm_juSakFE_aaBPp",
  "apiUrl":"https://ap2.salesforce.com",
  "clientId": "3MVG9ZL0ppGP5UrBztM9gSLYyUe7VwAVhD9.yQnZX2mmCu_48Uwc._doxrBTgY4jqmOSDhxRAiUBf8gCr2mk7",
  "refreshToken": "5Aep861TSESvWeug_ztpnAk6BGQxRdovMLhHso81iyYKO6hTm45JVxz3FLewCKgI4BbUp19OzGfqG2TdCfqa2ZU",
  "clientSecret": "1187341468789253319",
  "hostName": "https://login.salesforce.com",
  "apiVersion": "v34.0",
  "intervalTime" : "100000",
  "queryStringForEventMonitoringData": "SELECT+Id+,+EventType+,+LogFile+,+LogDate+,+LogFileLength+FROM+EventLogFile+WHERE+LogDate+>+Yesterday+AND+EventType+=+'API'",
  "registryPath": "connectors/SalesforceRest"
 }

Related Salesforce REST
Documentation 
documentation 

https://developer.salesforce.com/docs/atlas.en-us.198.0.api_rest.meta/api_rest/dome_event_log_file_query.htm

Anchor
sample
sample
Sample configuration

Following is a sample proxy service that illustrates how to connect to salesforce Salesforce with the init operation and use the queryEventMonitoringData queryEventMonitoringData operation. The sample request for this proxy can be found in the create sample queryEventMonitoringData sample request.

Code Block
languagexml
titleSample Proxy
<proxy xmlns="http://ws.apache.org/ns/synapse" name="queryEventMonitoringData"
       statistics="disable" trace="disable" transports="https http">
    <target>
        <inSequence>
            <property name="accessToken" expression="json-eval($.accessToken)"/>
            <property name="apiUrl" expression="json-eval($.apiUrl)"/>
            <property name="queryStringForEventMonitoringData"
                      expression="json-eval($.queryStringForEventMonitoringData)"/>
            <property name="clientId" expression="json-eval($.clientId)"/>
            <property name="refreshToken" expression="json-eval($.refreshToken)"/>
            <property name="clientSecret" expression="json-eval($.clientSecret)"/>
            <property name="hostName" expression="json-eval($.hostName)"/>
            <property name="apiVersion" expression="json-eval($.apiVersion)"/>
            <property name="registryPath" expression="json-eval($.registryPath)"/>
			<property name="intervalTime" expression="json-eval($.intervalTime)"/>
            <salesforcerest.init>
                <accessToken>{$ctx:accessToken}</accessToken>
                <apiUrl>{$ctx:apiUrl}</apiUrl>
                <apiVersion>{$ctx:apiVersion}</apiVersion>
                <hostName>{$ctx:hostName}</hostName>
                <clientSecret>{$ctx:clientSecret}</clientSecret>
                <clientId>{$ctx:clientId}</clientId>
                <refreshToken>{$ctx:refreshToken}</refreshToken>
                <registryPath>{$ctx:registryPath}</registryPath>
				<intervalTime>{$ctx:intervalTime}</intervalTime>
            </salesforcerest.init>
            <log category="INFO" level="full" separator=","/>
            <salesforcerest.queryEventMonitoringData>
                <queryStringForEventMonitoringData>{$ctx:queryStringForEventMonitoringData}
                </queryStringForEventMonitoringData>
            </salesforcerest.queryEventMonitoringData>
            <send/>
        </inSequence>
    </target>
</proxy>