getTokensByRangeDate()
getTokensByRangeDate() returns the tokens created between the specified date range.
Syntax
public String[] getTokensByDate(String customData, long long startDate, long long endDate, String table, int columnIdentifier) throws TokenException
Request Parameters
Parameters | Data Types | Descriptions |
---|---|---|
customData | string | Customer-specific data. Note: For My SQL, if the customData parameter is null or empty, then the getTokensByRangeDate() API returns results for all customData values in the token vault. |
startDate | long | The date from which the tokens are required. startDate should be specified in milliseconds since epoch (start of day, Jan 1,1970). |
endDate | long | The date till which the tokens are required. endDate should be specified in milliseconds since epoch. |
table | string | This is the Token Vault name and it must be in CAPITAL LETTERS. |
columnIdentifier | integer | The particular column which is required as a criterion for searching tokens. Valid value can be either creation date or last accessed date. |
Returned Values
A string array of the tokens.
Exception
Throws TokenException if:
The table or date are missing.
A customData element is too long or too short.
Example
getTokensByDate(“customData”, startDate, endDate, dbTable, TokenService.LAST_ACCESS_DATE);
getTokensByDate(“customData”, startDate, endDate, dbTable, TokenService.CREATION_DATE);
Note
Date to millisecond-since-epoch converter: http://www.fileformat.info/tip/java/date2millis.htm