suddjian commented on a change in pull request #13523:
URL: https://github.com/apache/superset/pull/13523#discussion_r591919773



##########
File path: superset/dashboards/api.py
##########
@@ -252,6 +253,54 @@ def get(self, id_or_slug: str) -> Response:
         except DashboardNotFoundError:
             return self.response_404()
 
+    @expose("/<id_or_slug>/datasets", methods=["GET"])
+    @protect()
+    @safe
+    @statsd_metrics
+    @event_logger.log_this_with_context(
+        action=lambda self, *args, **kwargs: 
f"{self.__class__.__name__}.get_datasets",
+        log_to_statsd=False,
+    )
+    def get_datasets(self, id_or_slug: str) -> Response:
+        """Gets a dashboard's datasets
+                ---
+                get:
+                  description: >-
+                    Returns a map of a dashboard's datasets, keyed by dataset 
Uid.
+                    Each dataset includes only the information necessary to 
render
+                    the dashboard's charts.
+                  parameters:
+                  - in: path
+                    schema:
+                      type: string
+                    name: id_or_slug
+                    description: Either the id of the dashboard, or its slug
+                  responses:
+                    200:
+                      description: Dashboard dataset definitions
+                      content:
+                        application/json:
+                          schema:
+                            type: object
+                            properties:
+                              result:
+                                type: object

Review comment:
       Done, but please check over my schema for any issues because it's a big 
one




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to