> For the complete documentation index, see [llms.txt](https://docs.flightwatching.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flightwatching.com/user-manual/designer-user-manual/edit-dashboards/dashboards/dashboard-rules/wilco.geteventsforfwot.md).

# WILCO.getEventsForFwot

await WILCO.getEventsForFwot(reg, lastCount, lastUnit, toDate, filters, callback)

Returns the last events for the given FWOT.

`await WILCO.getEventsForFwot("FW-FAN", 3, 'days', '2002-04-03T02:44:00', {tag: 'ATA36'}, function(fwot, events) { console.log(events); })`

* reg: the FWOT reg
* lastCount: the count of time units you want back in time
* lastUnit: the unit for the time count (years, months, weeks, days, hours, minutes, seconds)
* toDate: the reference date for the search. If null, it is current date
* filters: a map with filters according to [https://SITE.flightwatching.com/fleet/apiv3#events](https://site.flightwatching.com/fleet/apiv3#events) (like tag, sev, showHidden, withDismissed, important...)
* callback: the function to call when request succeeded. the arguments are `callback(reg, eventArray, status)`

eventArray are with the format described [here](https://app.swaggerhub.com/apis/flightwatching/wilco-api/3.0.0#/EventV3IO).

### <br>
