Consensys / mythx-developer-support

Support resources and bug reporting for Mythril Tool Developers
3 stars 1 forks source link

Does dateFrom and dateTo in /analyses work? #15

Closed rocky closed 6 years ago

rocky commented 6 years ago

dateTo and and dateFrom are described in https://mythril.ai/docs#operation/listAnalyses

I can't get either to filter:

$ curl -i -X GET https://api.mythril.ai/v1/analyses -H "Authorization: Bearer $MYTHRIL_API_KEY" -H 'Content-Type: application/json' -d '{"dateTo": "2018-09-01T19:46:45.485Z"}' 
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json; charset=utf-8
Date: Thu, 13 Sep 2018 19:59:38 GMT
ETag: W/"5140-cTCCUO0jQzwdNh+h6/WxYr72wHg"
Server: nginx/1.12.1
Strict-Transport-Security: max-age=15552000; includeSubDomains
X-Content-Type-Options: nosniff
X-DNS-Prefetch-Control: off
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Content-Length: 20800
Connection: keep-alive

[{"apiVersion":"v1.0.25","error":"An error occurred when running myth.\nOutput: \nError Output: Traceback (most recent call last):\n  File \"/usr/local/bin/myth\", line 9, in <module>\n    mythril.interfaces.cli.main()\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/interfaces/cli.py\", line 206, in main\n    max_depth=args.max_depth, execution_timeout=args.execution_timeout)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/mythril.py\", line 380, in fire_lasers\n    max_depth=max_depth, execution_timeout=execution_timeout)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/analysis/symbolic.py\", line 30, in __init__\n    self.laser.sym_exec(address)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 61, in sym_exec\n    transaction.run(self.open_states, self)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/transaction.py\", line 58, in run\n    evm.exec()\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 71, in exec\n    new_states, op_code = self.execute_state(global_state)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 97, in execute_state\n    new_global_states = Instruction(op_code, self.dynamic_loader).evaluate(global_state)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/instructions.py\", line 69, in evaluate\n    return instruction_mutator(global_state)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/instructions.py\", line 34, in wrapper\n    new_global_states = func(self, global_state_copy)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/instructions.py\", line 77, in push_\n    value = BitVecVal(int(global_state.get_current_instruction()['argument'][2:], 16), 256)\nValueError: invalid literal for int() with base 16: ''\n","mythrilVersion":"v0.18.11","queueTime":19,"runTime":729,"status":"Error","submittedAt":"2018-09-13T19:04:12.933Z","submittedBy":"85484509-a281-4f4e-9cef-08fdd3c6fae2","uuid":"a1aaa0c9-6241-4956-aac8-a0acd4617156"},{"apiVersion":"v1.0.25","mythrilVersion":"v0.18.11","queueTime":0,"runTime":0,"status":"Finished","submittedAt":"2018-09-08T09:57:43.147Z","submittedBy":"85484509-a281-4f4e-9cef-08fdd3c6fae2","uuid":"8f961f72-423f-488b-bf84-1d76a40e7d74"},{"apiVersion":"v1.0.25","mythrilVersion":"v0.18.11","queueTime":0,"runTime":0,"status":"Finished","submittedAt":"2018-09-08T09:57:18.497Z","submittedBy":"85484509-a281-4f4e-9cef-08fdd3c6fae2","uuid":"956e542f-4997-4d30-bb89-fd9cf1ffff66"},{"queueTime":1,"runTime":0,"status":"Finished","submittedAt":"2018-09-13T19:59:38.146Z","submittedBy":"85484509-a281-4f4e-9cef-08fdd3c6fae2","uuid":"4839ba30-4eae-4e3d-87d0-8d3f7d91de7b"},{"error":"An error occurred when running myth.\nOutput: \nError Output: Traceback (most recent call last):\n  File \"/usr/local/bin/myth\", line 9, in <module>\n    mythril.interfaces.cli.main()\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/interfaces/cli.py\", line 206, in main\n    max_depth=args.max_depth, execution_timeout=args.execution_timeout)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/mythril.py\", line 380, in fire_lasers\n    max_depth=max_depth, execution_timeout=execution_timeout)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/analysis/symbolic.py\", line 30, in __init__\n    self.laser.sym_exec(address)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 61, in sym_exec\n    transaction.run(self.open_states, self)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/transaction.py\", line 58, in run\n    evm.exec()\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 71, in exec\n    new_states, op_code = self.execute_state(global_state)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 90, in execute_state\n    op_code = instructions[global_state.mstate.pc]['opcode']\nIndexError: list index out of range\n","queueTime":1,"runTime":0,"status":"Error","submittedAt":"2018-09-13T19:59:38.146Z","submittedBy":"85484509-a281-4f4e-9cef-08fdd3c6fae2","uuid":"550be516-ed05-4d4a-a795-298fdfb180db"},{"error":"An error occurred when running myth.\nOutput: \nError Output: Traceback (most recent call last):\n  File \"/usr/local/bin/myth\", line 9, in <module>\n    mythril.interfaces.cli.main()\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/interfaces/cli.py\", line 206, in main\n    max_depth=args.max_depth, execution_timeout=args.execution_timeout)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/mythril.py\", line 380, in fire_lasers\n    max_depth=max_depth, execution_timeout=execution_timeout)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/analysis/symbolic.py\", line 30, in __init__\n    self.laser.sym_exec(address)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 61, in sym_exec\n    transaction.run(self.open_states, self)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/transaction.py\", line 58, in run\n    evm.exec()\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 71, in exec\n    new_states, op_code = self.execute_state(global_state)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 90, in execute_state\n    op_code = instructions[global_state.mstate.pc]['opcode']\nIndexError: list index out of range\n","queueTime":1,"runTime":0,"status":"Error","submittedAt":"2018-09-13T19:59:38.146Z","submittedBy":"85484509-a281-4f4e-9cef-08fdd3c6fae2","uuid":"c8b214c5-b2c5-485c-b973-ec06ba7557fc"},{"error":"An error occurred when running myth.\nOutput: \nError Output: Traceback (most recent call last):\n  File \"/usr/local/bin/myth\", line 9, in <module>\n    mythril.interfaces.cli.main()\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/interfaces/cli.py\", line 206, in main\n    max_depth=args.max_depth, execution_timeout=args.execution_timeout)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/mythril.py\", line 380, in fire_lasers\n    max_depth=max_depth, execution_timeout=execution_timeout)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/analysis/symbolic.py\", line 30, in __init__\n    self.laser.sym_exec(address)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 61, in sym_exec\n    transaction.run(self.open_states, self)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/transaction.py\", line 58, in run\n    evm.exec()\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 71, in exec\n    new_states, op_code = self.execute_state(global_state)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 90, in execute_state\n    op_code = instructions[global_state.mstate.pc]['opcode']\nIndexError: list index out of range\n","queueTime":1,"runTime":0,"status":"Error","submittedAt":"2018-09-13T19:59:38.146Z","submittedBy":"85484509-a281-4f4e-9cef-08fdd3c6fae2","uuid":"c531bf21-3f81-40d9-938d-eff1f3f19975"},{"error":"An error occurred when running myth.\nOutput: \nError Output: Traceback (most recent call last):\n  File \"/usr/local/bin/myth\", line 9, in <module>\n    mythril.interfaces.cli.main()\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/interfaces/cli.py\", line 206, in main\n    max_depth=args.max_depth, execution_timeout=args.execution_timeout)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/mythril.py\", line 380, in fire_lasers\n    max_depth=max_depth, execution_timeout=execution_timeout)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/analysis/symbolic.py\", line 30, in __init__\n    self.laser.sym_exec(address)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 61, in sym_exec\n    transaction.run(self.open_states, self)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/transaction.py\", line 58, in run\n    evm.exec()\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 71, in exec\n    new_states, op_code = self.execute_state(global_state)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 90, in execute_state\n    op_code = instructions[global_state.mstate.pc]['opcode']\nIndexError: list index out of range\n","queueTime":1,"runTime":0,"status":"Error","submittedAt":"2018-09-13T19:59:38.146Z","submittedBy":"85484509-a281-4f4e-9cef-08fdd3c6fae2","uuid":"98693c17-439c-4647-9637-72f73becedc5"},{"error":"An error occurred when running myth.\nOutput: \nError Output: Traceback (most recent call last):\n  File \"/usr/local/bin/myth\", line 9, in <module>\n    mythril.interfaces.cli.main()\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/interfaces/cli.py\", line 206, in main\n    max_depth=args.max_depth, execution_timeout=args.execution_timeout)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/mythril.py\", line 380, in fire_lasers\n    max_depth=max_depth, execution_timeout=execution_timeout)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/analysis/symbolic.py\", line 30, in __init__\n    self.laser.sym_exec(address)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 61, in sym_exec\n    transaction.run(self.open_states, self)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/transaction.py\", line 58, in run\n    evm.exec()\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 71, in exec\n    new_states, op_code = self.execute_state(global_state)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 90, in execute_state\n    op_code = instructions[global_state.mstate.pc]['opcode']\nIndexError: list index out of range\n","queueTime":1,"runTime":0,"status":"Error","submittedAt":"2018-09-13T19:59:38.146Z","submittedBy":"85484509-a281-4f4e-9cef-08fdd3c6fae2","uuid":"53358641-0a4f-4387-904d-f2914f102500"},{"error":"An error occurred when running myth.\nOutput: \nError Output: Traceback (most recent call last):\n  File \"/usr/local/bin/myth\", line 9, in <module>\n    mythril.interfaces.cli.main()\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/interfaces/cli.py\", line 206, in main\n    max_depth=args.max_depth, execution_timeout=args.execution_timeout)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/mythril.py\", line 380, in fire_lasers\n    max_depth=max_depth, execution_timeout=execution_timeout)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/analysis/symbolic.py\", line 30, in __init__\n    self.laser.sym_exec(address)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 61, in sym_exec\n    transaction.run(self.open_states, self)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/transaction.py\", line 58, in run\n    evm.exec()\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 71, in exec\n    new_states, op_code = self.execute_state(global_state)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 90, in execute_state\n    op_code = instructions[global_state.mstate.pc]['opcode']\nIndexError: list index out of range\n","queueTime":1,"runTime":0,"status":"Error","submittedAt":"2018-09-13T19:59:38.146Z","submittedBy":"85484509-a281-4f4e-9cef-08fdd3c6fae2","uuid":"36546609-af4b-43ed-b404-4ca3c470cd1a"},{"queueTime":1,"runTime":0,"status":"Finished","submittedAt":"2018-09-13T19:59:38.146Z","submittedBy":"85484509-a281-4f4e-9cef-08fdd3c6fae2","uuid":"e32b7727-fece-4246-8241-c0b5e7a4ed7b"},{"queueTime":0,"runTime":0,"status":"Finished","submittedAt":"2018-09-13T19:59:38.147Z","submittedBy":"85484509-a281-4f4e-9cef-08fdd3c6fae2","uuid":"6855f271-d96f-42a9-90bc-b06f2ed216af"},{"error":"An error occurred when running myth.\nOutput: \nError Output: Traceback (most recent call last):\n  File \"/usr/local/bin/myth\", line 9, in <module>\n    mythril.interfaces.cli.main()\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/interfaces/cli.py\", line 206, in main\n    max_depth=args.max_depth, execution_timeout=args.execution_timeout)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/mythril.py\", line 380, in fire_lasers\n    max_depth=max_depth, execution_timeout=execution_timeout)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/analysis/symbolic.py\", line 30, in __init__\n    self.laser.sym_exec(address)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 61, in sym_exec\n    transaction.run(self.open_states, self)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/transaction.py\", line 58, in run\n    evm.exec()\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 71, in exec\n    new_states, op_code = self.execute_state(global_state)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 97, in execute_state\n    new_global_states = Instruction(op_code, self.dynamic_loader).evaluate(global_state)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/instructions.py\", line 69, in evaluate\n    return instruction_mutator(global_state)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/instructions.py\", line 34, in wrapper\n    new_global_states = func(self, global_state_copy)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/instructions.py\", line 868, in return_\n    offset, length = state.stack.pop(), state.stack.pop()\nIndexError: pop from empty list\n","queueTime":0,"runTime":0,"status":"Error","submittedAt":"2018-09-13T19:59:38.147Z","submittedBy":"85484509-a281-4f4e-9cef-08fdd3c6fae2","uuid":"a9c3e088-592c-4036-9c57-18232f10bc56"},{"error":"An error occurred when running myth.\nOutput: \nError Output: Traceback (most recent call last):\n  File \"/usr/local/bin/myth\", line 9, in <module>\n    mythril.interfaces.cli.main()\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/interfaces/cli.py\", line 206, in main\n    max_depth=args.max_depth, execution_timeout=args.execution_timeout)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/mythril.py\", line 380, in fire_lasers\n    max_depth=max_depth, execution_timeout=execution_timeout)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/analysis/symbolic.py\", line 30, in __init__\n    self.laser.sym_exec(address)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 61, in sym_exec\n    transaction.run(self.open_states, self)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/transaction.py\", line 58, in run\n    evm.exec()\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 71, in exec\n    new_states, op_code = self.execute_state(global_state)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 97, in execute_state\n    new_global_states = Instruction(op_code, self.dynamic_loader).evaluate(global_state)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/instructions.py\", line 69, in evaluate\n    return instruction_mutator(global_state)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/instructions.py\", line 34, in wrapper\n    new_global_states = func(self, global_state_copy)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/instructions.py\", line 868, in return_\n    offset, length = state.stack.pop(), state.stack.pop()\nIndexError: pop from empty list\n","queueTime":0,"runTime":0,"status":"Error","submittedAt":"2018-09-13T19:59:38.147Z","submittedBy":"85484509-a281-4f4e-9cef-08fdd3c6fae2","uuid":"4915dae9-c8f1-471b-99a9-c68234672fc5"},{"error":"An error occurred when running myth.\nOutput: \nError Output: Traceback (most recent call last):\n  File \"/usr/local/bin/myth\", line 9, in <module>\n    mythril.interfaces.cli.main()\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/interfaces/cli.py\", line 206, in main\n    max_depth=args.max_depth, execution_timeout=args.execution_timeout)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/mythril.py\", line 380, in fire_lasers\n    max_depth=max_depth, execution_timeout=execution_timeout)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/analysis/symbolic.py\", line 30, in __init__\n    self.laser.sym_exec(address)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 61, in sym_exec\n    transaction.run(self.open_states, self)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/transaction.py\", line 58, in run\n    evm.exec()\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 71, in exec\n    new_states, op_code = self.execute_state(global_state)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 97, in execute_state\n    new_global_states = Instruction(op_code, self.dynamic_loader).evaluate(global_state)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/instructions.py\", line 69, in evaluate\n    return instruction_mutator(global_state)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/instructions.py\", line 34, in wrapper\n    new_global_states = func(self, global_state_copy)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/instructions.py\", line 868, in return_\n    offset, length = state.stack.pop(), state.stack.pop()\nIndexError: pop from empty list\n","queueTime":0,"runTime":0,"status":"Error","submittedAt":"2018-09-13T19:59:38.147Z","submittedBy":"85484509-a281-4f4e-9cef-08fdd3c6fae2","uuid":"cac82816-a248-46ca-8f8d-834e75eee6be"},{"error":"An error occurred when running myth.\nOutput: \nError Output: Traceback (most recent call last):\n  File \"/usr/local/bin/myth\", line 9, in <module>\n    mythril.interfaces.cli.main()\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/interfaces/cli.py\", line 206, in main\n    max_depth=args.max_depth, execution_timeout=args.execution_timeout)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/mythril.py\", line 380, in fire_lasers\n    max_depth=max_depth, execution_timeout=execution_timeout)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/analysis/symbolic.py\", line 30, in __init__\n    self.laser.sym_exec(address)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 61, in sym_exec\n    transaction.run(self.open_states, self)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/transaction.py\", line 58, in run\n    evm.exec()\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 71, in exec\n    new_states, op_code = self.execute_state(global_state)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/svm.py\", line 97, in execute_state\n    new_global_states = Instruction(op_code, self.dynamic_loader).evaluate(global_state)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/instructions.py\", line 69, in evaluate\n    return instruction_mutator(global_state)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/instructions.py\", line 34, in wrapper\n    new_global_states = func(self, global_state_copy)\n  File \"/usr/local/lib/python3.6/dist-packages/mythril/laser/ethereum/instructions.py\", line 868, in return_\n    offset, length = state.stack.pop(), state.stack.pop()\nIndexError: pop from empty list\n","queueTime":0,"runTime":0,"status":"Error","submittedAt":"2018-09-13T19:59:38.147Z","submittedBy":"85484509-a281-4f4e-9cef-08fdd3c6fae2","uuid":"3002a156-71b0-4232-9e8a-c82bc3a796bd"},{"queueTime":0,"runTime":0,"status":"Finished","submittedAt":"2018-09-13T19:59:38.147Z","submittedBy":"85484509-a281-4f4e-9cef-08fdd3c6fae2","uuid":"df946130-a25c-4268-b2d0-e3ccc592f7c0"},{"queueTime":0,"runTime":0,"status":"Finished","submittedAt":"2018-09-13T19:59:38.147Z","submittedBy":"85484509-a281-4f4e-9cef-08fdd3c6fae2","uuid":"af2d3eb6-b538-4ede-bfc7-0f0d58d5c2b6"},{"queueTime":0,"runTime":0,"status":"Finished","submittedAt":"2018-09-13T19:59:38.147Z","submittedBy":"85484509-a281-4f4e-9cef-08fdd3c6fae2","uuid":"ab404a1b-c9e6-4ed9-9c37-06396c20b877"},{"queueTime":0,"runTime":0,"status":"Finished","submittedAt":"2018-09-13T19:59:38.147Z","submittedBy":"85484509-a281-4f4e-9cef-08fdd3c6fae2","uuid":"330b4a56-0408-40a6-9884-8d9ab48d1dd8"}]
birdofpreyru commented 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'
rocky commented 6 years ago

Okay. How is one going to figure this out looking in the openapi doc? https://mythril.ai/docs#section/Authentication

birdofpreyru commented 6 years ago

Section name tells is: image and if params are in body payload: image

rocky commented 6 years ago

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.

birdofpreyru commented 6 years ago

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. Use dateFrom and dateTo query parameters to filter by analysis submission timestamps.

rocky commented 6 years ago

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?

birdofpreyru commented 6 years ago

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.