From 5ca97d165c7543508c17a1ee97db28e22f37ca3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Thu, 12 Apr 2018 10:43:17 +0200 Subject: [PATCH] new: Add event_timestamp to REST search Fix #220 --- pymisp/api.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pymisp/api.py b/pymisp/api.py index f2532c6..0adda79 100644 --- a/pymisp/api.py +++ b/pymisp/api.py @@ -1069,6 +1069,7 @@ class PyMISP(object): :param published: return only published events :param to_ids: return only the attributes with the to_ids flag set :param deleted: also return the deleted attributes + :param event_timestamp: the timestamp of the last modification of the event (attributes controller only)). Can be a list (from->to) :param async_callback: The function to run when results are returned """ query = {} @@ -1122,6 +1123,8 @@ class PyMISP(object): query['searchall'] = kwargs.pop('searchall', None) query['metadata'] = kwargs.pop('metadata', None) query['published'] = kwargs.pop('published', None) + if controller == 'attributes': + query['event_timestamp'] = kwargs.pop('event_timestamp', None) # Cleanup query = {k: v for k, v in query.items() if v is not None}