Runs the export associated with the given ID.
Applies to
My APIs > integrator.io API runtime object > exports
Argument
options <Object, required>
Contains the following properties:
_id <String, required>
– the ID of the export to runstartDate <Date>
– start date for delta exports as a Date objectendDate <Date>
– end date for delta exports as a Date objectlistenerData <Array>
– pass data in this structure to an integrator.io application-type webhook listener; if you need to pass a value from your script to the export, instead call exports.runVirtual()
Returns
<Object>
The response object has the following properties:
data <Array>
– the data that was exported; this function returns only the first page of records, to retrieve additional results call exports.runVirtualWithPaging()dataURIs <Array>
– matching URI array; dependent on export configurationerrors <Array>
– any errors returned by the export
Exceptions
This function throws an error if the API call fails for any reason.
Example
listenerData syntax
import { exports } from 'integrator-api'
function main(options) {
const myData = [{
name: 'Celigo customer',
email: 'celigocustomer@celigo.com'
}]
return {
statusCode: 200,
body: {
response: exports.run({_id: '5f4••••••••••••••••••d34', listenerData: myData})
}
}
}
Comments
0 comments
Please sign in to leave a comment.