How to Retrieve Superset Dashboard Thumbnail Image in Angular Application Using API?

Discussão em 'Angular' iniciado por Mian Awais, Dezembro 11, 2024.

  1. Mian Awais

    Mian Awais Guest

    Hello Stack Overflow community,

    I am working on integrating Superset with my Angular application, and I'm facing a challenge while trying to fetch the thumbnail image of a Superset dashboard. Currently, I'm using the following API endpoint:

    /api/v1/dashboard/{pk}/thumbnail/{digest}/

    I provide the necessary parameters (pk, digest), and upon setting the "force" parameter to false, I receive the following response: {"message":"OK Async"}.

    Here is a snippet of my current Angular code:


    // Angular service code
    this.thumbnailService.getThumbnail(pk, digest).subscribe(
    (response) => {
    // Currently, I'm getting {"message":"OK Async"} in the response.
    // I want to get the actual image instead.
    console.log('Response:', response);
    },
    (error) => {
    console.error('Error fetching thumbnail:', error);
    }
    );



    Thank you in advance for any assistance or insights you can provide!

    However, my goal is to directly obtain the thumbnail image in the response instead of the asynchronous message. I've reviewed the Superset documentation, but I couldn't find a clear solution for this. If anyone has experience with fetching Superset dashboard thumbnail images in an Angular application and can provide guidance on how to obtain the image directly, I would greatly appreciate your help.

    Continue reading...

Compartilhe esta Página