Closed rocky closed 6 years ago
Yes, they work, as docs say, they should be query params, thus with curl
you should do:
curl -X GET \
'https://{{URL}}/analyses?dateTo=2018-09-01T19:46:45.485Z' \
-H 'Authorization: Bearer {{TOKEN}}' \
-H 'Cache-Control: no-cache'
Okay. How is one going to figure this out looking in the openapi doc? https://mythril.ai/docs#section/Authentication
Section name tells is: and if params are in body payload:
Great - thanks. When I make a pass over the openapi docs, I'll add some examples to make this most obvious for dummies like me.
Good point, I think, we should be just a bit more verbose in the method description. E.g. now it says
Lists analyses visible to the user, at most 20 records a time, sorted by submission time from the most recent to the oldest ones. Use
offset
parameter for results pagination.
Updating it to this, will do the trick:
Lists analyses visible to the user, at most 20 records a time, sorted by submission time from the most recent to the oldest ones. Use
offset
query parameter for results pagination. UsedateFrom
anddateTo
query parameters to filter by analysis submission timestamps.
Here's the thing I don't understand about offset. It feels like if this were in a browser you might have show the first so many results and then the next so many results. For the middle results say 21-40 wouldn't you need two numbers?
It always returns up to 20 records. If you specifies offset, you'll get records from offset to offset + 20 (assuming 0-based indices), or less, if there are less records in DB.
dateTo and and dateFrom are described in https://mythril.ai/docs#operation/listAnalyses
I can't get either to filter: