mikcanf | Posts: 71

Data extracting from OneSpan via api's

0 votes

We are planning to extract OneSpan data via api's to drive reporting.

A) there are some advantages (simplicity) to re-extract all data, every night

B) there are also advantages to incremental extracts, i.e. net new items + changes

Re option (A), is it possible to identify all changes in OneSpan data for an incremental extract?  Are there issues and/or considerations we need to be aware of with this approach? 


Duo_Liang | Posts: 3776

Reply to: Data extracting from OneSpan via api's

0 votes

Hi Mike,

 

If we are talking about the package retrieval API:

GET /api/packages?query={status}&from={from}&to={to}&lastUpdatedStartDate={lastUpdatedStartDate}&lastUpdatedEndDate={lastUpdatedEndDate}

"lastUpdatedStartDate" and "lastUpdatedEndDate" give you the option to do the incremental extracts, that only pulls packages get updated in the past few days 

If you are interested in events like status change, or a signer has signed a signature, these events all updates the package and therefore be returned by this query.

Also, these two parameters refer to a day (not date) in GMT timezone, for example "&lastUpdatedStartDate=2020-08-25&lastUpdatedEndDate=2020-08-26" pulls all packages get updated in these two days:

(1)package update date is also in GMT time

(2)make sure the query time range is longer than the interval you run the reporting script

(3)you can skip the "lastUpdatedEndDate" parameter and the end date will be the current time

 

Another mechanism to monitor the package changes is to set up a callback listener, so that whenever an event of interest get triggered, your registered endpoint will get informed.

 

Duo


Duo_Liang | Posts: 3776

Reply to: Data extracting from OneSpan via api's

0 votes

Sender Retrieval API doesn't provide incremental change enquiry (like senders be created/updated within certain period) and you have to pull the complete list every time and filter by the "created" attribute:

GET /api/account/senders?from=1&to=100

What else might be helpful regarding to Senders is the usage report:
GET /api/reports/usage?from=2020-07-27T00:00:00Z&to=2020-08-27T00:00:00Z

"ID","EMAIL","FIRST NAME","LAST NAME","DRAFT","SENT","COMPLETED","ARCHIVED","DECLINED","OPTED_OUT","EXPIRED","TRASHED"
"ATQOPd60xE4V","[email protected]","liang","duo","0","0","0","0","0","0","1","0"
"QFMVeoTXxsIQ","[email protected]","john","smith","0","0","0","0","0","0","0","0"
"87KikpkoUyk5","[email protected]","Mary","Doe","0","0","0","0","0","0","0","0"

Which tells you which senders have active packages getting updated within this time range.
 

Delegation event report provides incremental query capability:

/api/reports/delegation?from=2020-07-27T00:00:00Z&to=2020-08-27T00:00:00Z

 

Duo

 


mikcanf | Posts: 71

Reply to: Data extracting from OneSpan via api's

0 votes

Thx Duo, very helpful!


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off