New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RESTful API - Specify dates #32
Comments
Sure, have a look here for the available filters and their usage: https://circl.lu/doc/misp/automation/index.html#filtering-event-metadata You can also pass them via the url as parameters but it is advised against since special characters in url parameters can be an issue. Though in your case the dates would work. What you probably want: searchdatefrom (YYYY-MM-DD - using the date field) So if you wanted to use the timestamp (that is the last modification to the event): POST to:
Using the headers:
Body:
Or simply use a GET request and fetch:
|
Oh nice! So, this may be related: sorry for opening so many issues. I did try to do a pull request, but alas, I don't know PHP that well. Does |
Additionally, does the code just convert the timestamp to YYYY-MM-DD? Does it end up dropping the hour and minute fields? |
No worries at all, the more the merrier. They are different fields. Basically, the event has a user-set field called "date" in YYYY-MM-DD format with the precision only being a date. There is the publish timestamp, which is a unix timestamp representing when the event was last published and there is also the timestamp field which is simply the timestamp the event was last edited at. |
Clarification question related to this - when passing to / from dates in yyyy-MM-dd format, how are time zones dealt with - are all date values assumed to be in the standard UTC, or are they interpreted based upon the timezone of the server you're querying? If the later if true, then can you affect this by passing an HTTP header or (undocumented?) query param to denote the target timezone of the from / to dates passed? |
Any update on this? |
This should have been fixed in MISP/MISP@c60cc78 - could you pull and test it? Thanks a lot. |
I believe this is resolved... I'm not hosting my own instance, but using the ops-trust.net one. |
I am using the api endpoint:
and trying to get all the events. The issue I'm having is that this endpoint returns too many events at once. Is there a way to specify start / end in the RESTful api? I saw you could with the
/events/xml/download
endpoint, but I just want to get the json response rather than a file.I've tried:
The text was updated successfully, but these errors were encountered: