)]}'
{"specs/train/add_get_scope_state_api_endpoint.rst":[{"author":{"_account_id":30367,"name":"Zachary Kazanski","email":"kazanski.zachary@gmail.com","username":"exit9z"},"change_message_id":"a335696ec0e8cfef04d4a2eed4c292c396223dfd","unresolved":false,"context_lines":[{"line_number":17,"context_line":"Problem Description"},{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"For now, there is no way for admins to know until when a scope\u0027s data has been"},{"line_number":21,"context_line":"processed, except by looking at the ``cloudkitty_storage_states`` SQL table."},{"line_number":22,"context_line":"This is however critical information to have before an invoice/report is"},{"line_number":23,"context_line":"generated, as you have to make sure that the whole period you\u0027re billing for has"}],"source_content_type":"text/x-rst","patch_set":1,"id":"dfbec78f_6dcded64","line":20,"updated":"2019-05-10 19:20:10.000000000","message":"For now, there is no way for admins to know when a scope\u0027s ...","commit_id":"aba17572cb64bc0b24be9e51d7a1910ad0e78646"},{"author":{"_account_id":30367,"name":"Zachary Kazanski","email":"kazanski.zachary@gmail.com","username":"exit9z"},"change_message_id":"a335696ec0e8cfef04d4a2eed4c292c396223dfd","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"For now, there is no way for admins to know until when a scope\u0027s data has been"},{"line_number":21,"context_line":"processed, except by looking at the ``cloudkitty_storage_states`` SQL table."},{"line_number":22,"context_line":"This is however critical information to have before an invoice/report is"},{"line_number":23,"context_line":"generated, as you have to make sure that the whole period you\u0027re billing for has"},{"line_number":24,"context_line":"been processed."},{"line_number":25,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"dfbec78f_ade445e1","line":22,"updated":"2019-05-10 19:20:10.000000000","message":"This is, however, critical ...","commit_id":"aba17572cb64bc0b24be9e51d7a1910ad0e78646"},{"author":{"_account_id":30367,"name":"Zachary Kazanski","email":"kazanski.zachary@gmail.com","username":"exit9z"},"change_message_id":"a335696ec0e8cfef04d4a2eed4c292c396223dfd","unresolved":false,"context_lines":[{"line_number":46,"context_line":"HTTP method."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"A ``GET`` request on this endpoint returns a paginated list of all scopes,"},{"line_number":49,"context_line":"with support for optional filters on the scope, the fetcher, the collector or"},{"line_number":50,"context_line":"the scope_key."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"The method will support the following parameters:"}],"source_content_type":"text/x-rst","patch_set":1,"id":"dfbec78f_2dd8551c","line":49,"updated":"2019-05-10 19:20:10.000000000","message":"Since we can filter on multiple parameters, \u0027and/or\u0027 would be more appropriate here instead of \u0027or\u0027.\n\nthe fetcher, the collector and/or the scope_key.","commit_id":"aba17572cb64bc0b24be9e51d7a1910ad0e78646"},{"author":{"_account_id":30367,"name":"Zachary Kazanski","email":"kazanski.zachary@gmail.com","username":"exit9z"},"change_message_id":"a335696ec0e8cfef04d4a2eed4c292c396223dfd","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"A ``GET`` request on this endpoint returns a paginated list of all scopes,"},{"line_number":49,"context_line":"with support for optional filters on the scope, the fetcher, the collector or"},{"line_number":50,"context_line":"the scope_key."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"The method will support the following parameters:"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"dfbec78f_53ebecda","line":50,"updated":"2019-05-10 19:20:10.000000000","message":"Additionally, under this current implementation you can only filter on one value for collector, fetcher, scope_key, and scope_id.   For example, if I have multiple custom collectors: CollectorX, CollectorY, CollectorZ.  And I want to query on CollectorX and CollectorY.  I would still need to do two API calls.\n\nIt may be useful for some end-users to be able to filter by multiple values for each optional parameter.\n\nIn the actual code implementation you could convert the StateManager\u0027s get_all method arguments to lists and do something like the following:\n\n```\n# ... build query logic ... \n\nif collector:\n    if len(collector) \u003e 1:\n        q \u003d q.filter(self.model.collector.in_(collector))\n    else:\n        q \u003d q.filter(self.model.collector \u003d\u003d collector[0])\n```","commit_id":"aba17572cb64bc0b24be9e51d7a1910ad0e78646"}]}
