Comments

6 comments

  • Avatar
    Moti Granovsky (Edited )

    Hi Amir,

    Of course there is - the Dashboards API v1.0

    For example, you can retrieve a dashboard by ID:

    http://localhost:8081/api/v1/dashboards/588149043aadeb6c43000012

    Which will return a JSON containing various fields such as datasource (the cube used), filters, and layout.

    The layout is comprised of cells, and alongside the UX properties like the cell's size, you can find the widget ID for each cell. Subsequently, you can find the dashboard's widgets like so:

    http://localhost:8081/api/v1/dashboards/588149043aadeb6c43000012/widgets

    Which will return an array of all widget objects, or a specific widget like so:

    http://localhost:8081/api/v1/dashboards/588149043aadeb6c43000012/widgets/588149603aadeb6c43000015

    Note: when specifying a widget's or dashboard's ID you need the "oid" property and not the "_id" property!

    You can find more information about these APIs in our Online API Reference / V1 / Dashboards

     

     

    0
    Comment actions Permalink
  • Avatar
    Oxana Noa Umansky

    Thank you Moti!

    0
    Comment actions Permalink
  • Avatar
    Amir Kutscher

    Hi Moti

    Thanks for the quick response.

    Will this return the data as well?

    I am interested in retrieving a JSON with the actual data- can this be done?

    Thanks

    Amir

    0
    Comment actions Permalink
  • Avatar
    Moti Granovsky

    Amir, when you say "return the data as well" do you mean the actual data from Elasticube?

    In that case, no. The Dashboard and Widget REST API return metadata - JSON that describes the dashboards and widgets. The Elasticube data is returned in response to each individual widget's query, composed based on that widget's metadata.

    We do not have an API that will return Elasticube data by Widget ID simply because it's not possible - the query depends on interaction with other aspects such as the user's data security permissions, dashboard filters, etc.

    To get started with understanding how our queries work and how you can extract the actual data behind various widgets, I'd recommend taking a look at our JAQL documentation, as well as these forums posts:

    It can also be helpful if you could specify what it is you're trying to accomplish. Good luck!

    0
    Comment actions Permalink
  • Avatar
    Vikas Sharma

    Hi Moti,

    Is there any way that instead of list of widgets by Dashboard id, we get all the widgets and only for those dashboards which are shared with a particular user.

    0
    Comment actions Permalink
  • Avatar
    David Hertzberg

    Hi Vikas,

    You can do that, but not with only one API call.

    You can also do it through queries in the MongoDB. It will be closer to a script than just one query though.

    Best, David.

    0
    Comment actions Permalink

Please sign in to leave a comment.