We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Use can't download dataset before saving query
Because the query results url contains the query id, before saving the user can't download the dataset. 

We need to allow addressing query results without query id.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `redash/handlers/api.py`
Content:
```
1 from flask_restful import Api
2 from werkzeug.wrappers import Response
3 from flask import make_response
4 
5 from redash.utils import json_dumps
6 from redash.handlers.base import org_scoped_rule
7 from redash.handlers.permissions import ObjectPermissionsListResource, CheckPermissionResource
8 from redash.handlers.alerts import AlertResource, AlertListResource, AlertSubscriptionListResource, AlertSubscriptionResource
9 from redash.handlers.dashboards import DashboardListResource, RecentDashboardsResource, DashboardResource, DashboardShareResource, PublicDashboardResource 
10 from redash.handlers.data_sources import DataSourceTypeListResource, DataSourceListResource, DataSourceSchemaResource, DataSourceResource, DataSourcePauseResource, DataSourceTestResource
11 from redash.handlers.events import EventResource
12 from redash.handlers.queries import QueryForkResource, QueryRefreshResource, QueryListResource, QueryRecentResource, QuerySearchResource, QueryResource, MyQueriesResource
13 from redash.handlers.query_results import QueryResultListResource, QueryResultResource, JobResource
14 from redash.handlers.users import UserResource, UserListResource, UserInviteResource, UserResetPasswordResource
15 from redash.handlers.visualizations import VisualizationListResource
16 from redash.handlers.visualizations import VisualizationResource
17 from redash.handlers.widgets import WidgetResource, WidgetListResource
18 from redash.handlers.groups import GroupListResource, GroupResource, GroupMemberListResource, GroupMemberResource, \
19     GroupDataSourceListResource, GroupDataSourceResource
20 from redash.handlers.destinations import DestinationTypeListResource, DestinationResource, DestinationListResource
21 from redash.handlers.query_snippets import QuerySnippetListResource, QuerySnippetResource
22 
23 
24 class ApiExt(Api):
25     def add_org_resource(self, resource, *urls, **kwargs):
26         urls = [org_scoped_rule(url) for url in urls]
27         return self.add_resource(resource, *urls, **kwargs)
28 
29 api = ApiExt()
30 
31 
32 @api.representation('application/json')
33 def json_representation(data, code, headers=None):
34     # Flask-Restful checks only for flask.Response but flask-login uses werkzeug.wrappers.Response
35     if isinstance(data, Response):
36         return data
37     resp = make_response(json_dumps(data), code)
38     resp.headers.extend(headers or {})
39     return resp
40 
41 
42 api.add_org_resource(AlertResource, '/api/alerts/<alert_id>', endpoint='alert')
43 api.add_org_resource(AlertSubscriptionListResource, '/api/alerts/<alert_id>/subscriptions', endpoint='alert_subscriptions')
44 api.add_org_resource(AlertSubscriptionResource, '/api/alerts/<alert_id>/subscriptions/<subscriber_id>', endpoint='alert_subscription')
45 api.add_org_resource(AlertListResource, '/api/alerts', endpoint='alerts')
46 
47 api.add_org_resource(DashboardListResource, '/api/dashboards', endpoint='dashboards')
48 api.add_org_resource(RecentDashboardsResource, '/api/dashboards/recent', endpoint='recent_dashboards')
49 api.add_org_resource(DashboardResource, '/api/dashboards/<dashboard_slug>', endpoint='dashboard')
50 api.add_org_resource(PublicDashboardResource, '/api/dashboards/public/<token>', endpoint='public_dashboard')
51 api.add_org_resource(DashboardShareResource, '/api/dashboards/<dashboard_id>/share', endpoint='dashboard_share')
52 
53 api.add_org_resource(DataSourceTypeListResource, '/api/data_sources/types', endpoint='data_source_types')
54 api.add_org_resource(DataSourceListResource, '/api/data_sources', endpoint='data_sources')
55 api.add_org_resource(DataSourceSchemaResource, '/api/data_sources/<data_source_id>/schema')
56 api.add_org_resource(DataSourcePauseResource, '/api/data_sources/<data_source_id>/pause')
57 api.add_org_resource(DataSourceTestResource, '/api/data_sources/<data_source_id>/test')
58 api.add_org_resource(DataSourceResource, '/api/data_sources/<data_source_id>', endpoint='data_source')
59 
60 api.add_org_resource(GroupListResource, '/api/groups', endpoint='groups')
61 api.add_org_resource(GroupResource, '/api/groups/<group_id>', endpoint='group')
62 api.add_org_resource(GroupMemberListResource, '/api/groups/<group_id>/members', endpoint='group_members')
63 api.add_org_resource(GroupMemberResource, '/api/groups/<group_id>/members/<user_id>', endpoint='group_member')
64 api.add_org_resource(GroupDataSourceListResource, '/api/groups/<group_id>/data_sources', endpoint='group_data_sources')
65 api.add_org_resource(GroupDataSourceResource, '/api/groups/<group_id>/data_sources/<data_source_id>', endpoint='group_data_source')
66 
67 api.add_org_resource(EventResource, '/api/events', endpoint='events')
68 
69 api.add_org_resource(QuerySearchResource, '/api/queries/search', endpoint='queries_search')
70 api.add_org_resource(QueryRecentResource, '/api/queries/recent', endpoint='recent_queries')
71 api.add_org_resource(QueryListResource, '/api/queries', endpoint='queries')
72 api.add_org_resource(MyQueriesResource, '/api/queries/my', endpoint='my_queries')
73 api.add_org_resource(QueryRefreshResource, '/api/queries/<query_id>/refresh', endpoint='query_refresh')
74 api.add_org_resource(QueryResource, '/api/queries/<query_id>', endpoint='query')
75 api.add_org_resource(QueryForkResource, '/api/queries/<query_id>/fork', endpoint='query_fork')
76 
77 api.add_org_resource(ObjectPermissionsListResource, '/api/<object_type>/<object_id>/acl', endpoint='object_permissions')
78 api.add_org_resource(CheckPermissionResource, '/api/<object_type>/<object_id>/acl/<access_type>', endpoint='check_permissions')
79 
80 api.add_org_resource(QueryResultListResource, '/api/query_results', endpoint='query_results')
81 api.add_org_resource(QueryResultResource,
82                      '/api/query_results/<query_result_id>',
83                      '/api/queries/<query_id>/results.<filetype>',
84                      '/api/queries/<query_id>/results/<query_result_id>.<filetype>',
85                      endpoint='query_result')
86 api.add_org_resource(JobResource, '/api/jobs/<job_id>', endpoint='job')
87 
88 api.add_org_resource(UserListResource, '/api/users', endpoint='users')
89 api.add_org_resource(UserResource, '/api/users/<user_id>', endpoint='user')
90 api.add_org_resource(UserInviteResource, '/api/users/<user_id>/invite', endpoint='user_invite')
91 api.add_org_resource(UserResetPasswordResource, '/api/users/<user_id>/reset_password', endpoint='user_reset_password')
92 
93 api.add_org_resource(VisualizationListResource, '/api/visualizations', endpoint='visualizations')
94 api.add_org_resource(VisualizationResource, '/api/visualizations/<visualization_id>', endpoint='visualization')
95 
96 api.add_org_resource(WidgetListResource, '/api/widgets', endpoint='widgets')
97 api.add_org_resource(WidgetResource, '/api/widgets/<int:widget_id>', endpoint='widget')
98 
99 api.add_org_resource(DestinationTypeListResource, '/api/destinations/types', endpoint='destination_types')
100 api.add_org_resource(DestinationResource, '/api/destinations/<destination_id>', endpoint='destination')
101 api.add_org_resource(DestinationListResource, '/api/destinations', endpoint='destinations')
102 
103 api.add_org_resource(QuerySnippetResource, '/api/query_snippets/<snippet_id>', endpoint='query_snippet')
104 api.add_org_resource(QuerySnippetListResource, '/api/query_snippets', endpoint='query_snippets')
105
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/redash/handlers/api.py b/redash/handlers/api.py
--- a/redash/handlers/api.py
+++ b/redash/handlers/api.py
@@ -79,6 +79,7 @@
 
 api.add_org_resource(QueryResultListResource, '/api/query_results', endpoint='query_results')
 api.add_org_resource(QueryResultResource,
+                     '/api/query_results/<query_result_id>.<filetype>',
                      '/api/query_results/<query_result_id>',
                      '/api/queries/<query_id>/results.<filetype>',
                      '/api/queries/<query_id>/results/<query_result_id>.<filetype>',

{"golden_diff": "diff --git a/redash/handlers/api.py b/redash/handlers/api.py\n--- a/redash/handlers/api.py\n+++ b/redash/handlers/api.py\n@@ -79,6 +79,7 @@\n \n api.add_org_resource(QueryResultListResource, '/api/query_results', endpoint='query_results')\n api.add_org_resource(QueryResultResource,\n+                     '/api/query_results/<query_result_id>.<filetype>',\n                      '/api/query_results/<query_result_id>',\n                      '/api/queries/<query_id>/results.<filetype>',\n                      '/api/queries/<query_id>/results/<query_result_id>.<filetype>',\n", "issue": "Use can't download dataset before saving query\nBecause the query results url contains the query id, before saving the user can't download the dataset. \n\nWe need to allow addressing query results without query id.\n\n", "before_files": [{"content": "from flask_restful import Api\nfrom werkzeug.wrappers import Response\nfrom flask import make_response\n\nfrom redash.utils import json_dumps\nfrom redash.handlers.base import org_scoped_rule\nfrom redash.handlers.permissions import ObjectPermissionsListResource, CheckPermissionResource\nfrom redash.handlers.alerts import AlertResource, AlertListResource, AlertSubscriptionListResource, AlertSubscriptionResource\nfrom redash.handlers.dashboards import DashboardListResource, RecentDashboardsResource, DashboardResource, DashboardShareResource, PublicDashboardResource \nfrom redash.handlers.data_sources import DataSourceTypeListResource, DataSourceListResource, DataSourceSchemaResource, DataSourceResource, DataSourcePauseResource, DataSourceTestResource\nfrom redash.handlers.events import EventResource\nfrom redash.handlers.queries import QueryForkResource, QueryRefreshResource, QueryListResource, QueryRecentResource, QuerySearchResource, QueryResource, MyQueriesResource\nfrom redash.handlers.query_results import QueryResultListResource, QueryResultResource, JobResource\nfrom redash.handlers.users import UserResource, UserListResource, UserInviteResource, UserResetPasswordResource\nfrom redash.handlers.visualizations import VisualizationListResource\nfrom redash.handlers.visualizations import VisualizationResource\nfrom redash.handlers.widgets import WidgetResource, WidgetListResource\nfrom redash.handlers.groups import GroupListResource, GroupResource, GroupMemberListResource, GroupMemberResource, \\\n    GroupDataSourceListResource, GroupDataSourceResource\nfrom redash.handlers.destinations import DestinationTypeListResource, DestinationResource, DestinationListResource\nfrom redash.handlers.query_snippets import QuerySnippetListResource, QuerySnippetResource\n\n\nclass ApiExt(Api):\n    def add_org_resource(self, resource, *urls, **kwargs):\n        urls = [org_scoped_rule(url) for url in urls]\n        return self.add_resource(resource, *urls, **kwargs)\n\napi = ApiExt()\n\n\n@api.representation('application/json')\ndef json_representation(data, code, headers=None):\n    # Flask-Restful checks only for flask.Response but flask-login uses werkzeug.wrappers.Response\n    if isinstance(data, Response):\n        return data\n    resp = make_response(json_dumps(data), code)\n    resp.headers.extend(headers or {})\n    return resp\n\n\napi.add_org_resource(AlertResource, '/api/alerts/<alert_id>', endpoint='alert')\napi.add_org_resource(AlertSubscriptionListResource, '/api/alerts/<alert_id>/subscriptions', endpoint='alert_subscriptions')\napi.add_org_resource(AlertSubscriptionResource, '/api/alerts/<alert_id>/subscriptions/<subscriber_id>', endpoint='alert_subscription')\napi.add_org_resource(AlertListResource, '/api/alerts', endpoint='alerts')\n\napi.add_org_resource(DashboardListResource, '/api/dashboards', endpoint='dashboards')\napi.add_org_resource(RecentDashboardsResource, '/api/dashboards/recent', endpoint='recent_dashboards')\napi.add_org_resource(DashboardResource, '/api/dashboards/<dashboard_slug>', endpoint='dashboard')\napi.add_org_resource(PublicDashboardResource, '/api/dashboards/public/<token>', endpoint='public_dashboard')\napi.add_org_resource(DashboardShareResource, '/api/dashboards/<dashboard_id>/share', endpoint='dashboard_share')\n\napi.add_org_resource(DataSourceTypeListResource, '/api/data_sources/types', endpoint='data_source_types')\napi.add_org_resource(DataSourceListResource, '/api/data_sources', endpoint='data_sources')\napi.add_org_resource(DataSourceSchemaResource, '/api/data_sources/<data_source_id>/schema')\napi.add_org_resource(DataSourcePauseResource, '/api/data_sources/<data_source_id>/pause')\napi.add_org_resource(DataSourceTestResource, '/api/data_sources/<data_source_id>/test')\napi.add_org_resource(DataSourceResource, '/api/data_sources/<data_source_id>', endpoint='data_source')\n\napi.add_org_resource(GroupListResource, '/api/groups', endpoint='groups')\napi.add_org_resource(GroupResource, '/api/groups/<group_id>', endpoint='group')\napi.add_org_resource(GroupMemberListResource, '/api/groups/<group_id>/members', endpoint='group_members')\napi.add_org_resource(GroupMemberResource, '/api/groups/<group_id>/members/<user_id>', endpoint='group_member')\napi.add_org_resource(GroupDataSourceListResource, '/api/groups/<group_id>/data_sources', endpoint='group_data_sources')\napi.add_org_resource(GroupDataSourceResource, '/api/groups/<group_id>/data_sources/<data_source_id>', endpoint='group_data_source')\n\napi.add_org_resource(EventResource, '/api/events', endpoint='events')\n\napi.add_org_resource(QuerySearchResource, '/api/queries/search', endpoint='queries_search')\napi.add_org_resource(QueryRecentResource, '/api/queries/recent', endpoint='recent_queries')\napi.add_org_resource(QueryListResource, '/api/queries', endpoint='queries')\napi.add_org_resource(MyQueriesResource, '/api/queries/my', endpoint='my_queries')\napi.add_org_resource(QueryRefreshResource, '/api/queries/<query_id>/refresh', endpoint='query_refresh')\napi.add_org_resource(QueryResource, '/api/queries/<query_id>', endpoint='query')\napi.add_org_resource(QueryForkResource, '/api/queries/<query_id>/fork', endpoint='query_fork')\n\napi.add_org_resource(ObjectPermissionsListResource, '/api/<object_type>/<object_id>/acl', endpoint='object_permissions')\napi.add_org_resource(CheckPermissionResource, '/api/<object_type>/<object_id>/acl/<access_type>', endpoint='check_permissions')\n\napi.add_org_resource(QueryResultListResource, '/api/query_results', endpoint='query_results')\napi.add_org_resource(QueryResultResource,\n                     '/api/query_results/<query_result_id>',\n                     '/api/queries/<query_id>/results.<filetype>',\n                     '/api/queries/<query_id>/results/<query_result_id>.<filetype>',\n                     endpoint='query_result')\napi.add_org_resource(JobResource, '/api/jobs/<job_id>', endpoint='job')\n\napi.add_org_resource(UserListResource, '/api/users', endpoint='users')\napi.add_org_resource(UserResource, '/api/users/<user_id>', endpoint='user')\napi.add_org_resource(UserInviteResource, '/api/users/<user_id>/invite', endpoint='user_invite')\napi.add_org_resource(UserResetPasswordResource, '/api/users/<user_id>/reset_password', endpoint='user_reset_password')\n\napi.add_org_resource(VisualizationListResource, '/api/visualizations', endpoint='visualizations')\napi.add_org_resource(VisualizationResource, '/api/visualizations/<visualization_id>', endpoint='visualization')\n\napi.add_org_resource(WidgetListResource, '/api/widgets', endpoint='widgets')\napi.add_org_resource(WidgetResource, '/api/widgets/<int:widget_id>', endpoint='widget')\n\napi.add_org_resource(DestinationTypeListResource, '/api/destinations/types', endpoint='destination_types')\napi.add_org_resource(DestinationResource, '/api/destinations/<destination_id>', endpoint='destination')\napi.add_org_resource(DestinationListResource, '/api/destinations', endpoint='destinations')\n\napi.add_org_resource(QuerySnippetResource, '/api/query_snippets/<snippet_id>', endpoint='query_snippet')\napi.add_org_resource(QuerySnippetListResource, '/api/query_snippets', endpoint='query_snippets')\n", "path": "redash/handlers/api.py"}], "after_files": [{"content": "from flask_restful import Api\nfrom werkzeug.wrappers import Response\nfrom flask import make_response\n\nfrom redash.utils import json_dumps\nfrom redash.handlers.base import org_scoped_rule\nfrom redash.handlers.permissions import ObjectPermissionsListResource, CheckPermissionResource\nfrom redash.handlers.alerts import AlertResource, AlertListResource, AlertSubscriptionListResource, AlertSubscriptionResource\nfrom redash.handlers.dashboards import DashboardListResource, RecentDashboardsResource, DashboardResource, DashboardShareResource, PublicDashboardResource \nfrom redash.handlers.data_sources import DataSourceTypeListResource, DataSourceListResource, DataSourceSchemaResource, DataSourceResource, DataSourcePauseResource, DataSourceTestResource\nfrom redash.handlers.events import EventResource\nfrom redash.handlers.queries import QueryForkResource, QueryRefreshResource, QueryListResource, QueryRecentResource, QuerySearchResource, QueryResource, MyQueriesResource\nfrom redash.handlers.query_results import QueryResultListResource, QueryResultResource, JobResource\nfrom redash.handlers.users import UserResource, UserListResource, UserInviteResource, UserResetPasswordResource\nfrom redash.handlers.visualizations import VisualizationListResource\nfrom redash.handlers.visualizations import VisualizationResource\nfrom redash.handlers.widgets import WidgetResource, WidgetListResource\nfrom redash.handlers.groups import GroupListResource, GroupResource, GroupMemberListResource, GroupMemberResource, \\\n    GroupDataSourceListResource, GroupDataSourceResource\nfrom redash.handlers.destinations import DestinationTypeListResource, DestinationResource, DestinationListResource\nfrom redash.handlers.query_snippets import QuerySnippetListResource, QuerySnippetResource\n\n\nclass ApiExt(Api):\n    def add_org_resource(self, resource, *urls, **kwargs):\n        urls = [org_scoped_rule(url) for url in urls]\n        return self.add_resource(resource, *urls, **kwargs)\n\napi = ApiExt()\n\n\n@api.representation('application/json')\ndef json_representation(data, code, headers=None):\n    # Flask-Restful checks only for flask.Response but flask-login uses werkzeug.wrappers.Response\n    if isinstance(data, Response):\n        return data\n    resp = make_response(json_dumps(data), code)\n    resp.headers.extend(headers or {})\n    return resp\n\n\napi.add_org_resource(AlertResource, '/api/alerts/<alert_id>', endpoint='alert')\napi.add_org_resource(AlertSubscriptionListResource, '/api/alerts/<alert_id>/subscriptions', endpoint='alert_subscriptions')\napi.add_org_resource(AlertSubscriptionResource, '/api/alerts/<alert_id>/subscriptions/<subscriber_id>', endpoint='alert_subscription')\napi.add_org_resource(AlertListResource, '/api/alerts', endpoint='alerts')\n\napi.add_org_resource(DashboardListResource, '/api/dashboards', endpoint='dashboards')\napi.add_org_resource(RecentDashboardsResource, '/api/dashboards/recent', endpoint='recent_dashboards')\napi.add_org_resource(DashboardResource, '/api/dashboards/<dashboard_slug>', endpoint='dashboard')\napi.add_org_resource(PublicDashboardResource, '/api/dashboards/public/<token>', endpoint='public_dashboard')\napi.add_org_resource(DashboardShareResource, '/api/dashboards/<dashboard_id>/share', endpoint='dashboard_share')\n\napi.add_org_resource(DataSourceTypeListResource, '/api/data_sources/types', endpoint='data_source_types')\napi.add_org_resource(DataSourceListResource, '/api/data_sources', endpoint='data_sources')\napi.add_org_resource(DataSourceSchemaResource, '/api/data_sources/<data_source_id>/schema')\napi.add_org_resource(DataSourcePauseResource, '/api/data_sources/<data_source_id>/pause')\napi.add_org_resource(DataSourceTestResource, '/api/data_sources/<data_source_id>/test')\napi.add_org_resource(DataSourceResource, '/api/data_sources/<data_source_id>', endpoint='data_source')\n\napi.add_org_resource(GroupListResource, '/api/groups', endpoint='groups')\napi.add_org_resource(GroupResource, '/api/groups/<group_id>', endpoint='group')\napi.add_org_resource(GroupMemberListResource, '/api/groups/<group_id>/members', endpoint='group_members')\napi.add_org_resource(GroupMemberResource, '/api/groups/<group_id>/members/<user_id>', endpoint='group_member')\napi.add_org_resource(GroupDataSourceListResource, '/api/groups/<group_id>/data_sources', endpoint='group_data_sources')\napi.add_org_resource(GroupDataSourceResource, '/api/groups/<group_id>/data_sources/<data_source_id>', endpoint='group_data_source')\n\napi.add_org_resource(EventResource, '/api/events', endpoint='events')\n\napi.add_org_resource(QuerySearchResource, '/api/queries/search', endpoint='queries_search')\napi.add_org_resource(QueryRecentResource, '/api/queries/recent', endpoint='recent_queries')\napi.add_org_resource(QueryListResource, '/api/queries', endpoint='queries')\napi.add_org_resource(MyQueriesResource, '/api/queries/my', endpoint='my_queries')\napi.add_org_resource(QueryRefreshResource, '/api/queries/<query_id>/refresh', endpoint='query_refresh')\napi.add_org_resource(QueryResource, '/api/queries/<query_id>', endpoint='query')\napi.add_org_resource(QueryForkResource, '/api/queries/<query_id>/fork', endpoint='query_fork')\n\napi.add_org_resource(ObjectPermissionsListResource, '/api/<object_type>/<object_id>/acl', endpoint='object_permissions')\napi.add_org_resource(CheckPermissionResource, '/api/<object_type>/<object_id>/acl/<access_type>', endpoint='check_permissions')\n\napi.add_org_resource(QueryResultListResource, '/api/query_results', endpoint='query_results')\napi.add_org_resource(QueryResultResource,\n                     '/api/query_results/<query_result_id>.<filetype>',\n                     '/api/query_results/<query_result_id>',\n                     '/api/queries/<query_id>/results.<filetype>',\n                     '/api/queries/<query_id>/results/<query_result_id>.<filetype>',\n                     endpoint='query_result')\napi.add_org_resource(JobResource, '/api/jobs/<job_id>', endpoint='job')\n\napi.add_org_resource(UserListResource, '/api/users', endpoint='users')\napi.add_org_resource(UserResource, '/api/users/<user_id>', endpoint='user')\napi.add_org_resource(UserInviteResource, '/api/users/<user_id>/invite', endpoint='user_invite')\napi.add_org_resource(UserResetPasswordResource, '/api/users/<user_id>/reset_password', endpoint='user_reset_password')\n\napi.add_org_resource(VisualizationListResource, '/api/visualizations', endpoint='visualizations')\napi.add_org_resource(VisualizationResource, '/api/visualizations/<visualization_id>', endpoint='visualization')\n\napi.add_org_resource(WidgetListResource, '/api/widgets', endpoint='widgets')\napi.add_org_resource(WidgetResource, '/api/widgets/<int:widget_id>', endpoint='widget')\n\napi.add_org_resource(DestinationTypeListResource, '/api/destinations/types', endpoint='destination_types')\napi.add_org_resource(DestinationResource, '/api/destinations/<destination_id>', endpoint='destination')\napi.add_org_resource(DestinationListResource, '/api/destinations', endpoint='destinations')\n\napi.add_org_resource(QuerySnippetResource, '/api/query_snippets/<snippet_id>', endpoint='query_snippet')\napi.add_org_resource(QuerySnippetListResource, '/api/query_snippets', endpoint='query_snippets')\n", "path": "redash/handlers/api.py"}]}