How to decode data frame from the tsdb API in Grafana 7.5.0

Hello,

I’m trying to create a datasource plugin and trying to integrate tsdb API in the frontend. I’m using Grafana 7.5.X. The response dataframe of tsdb API is encoded. Need help to decode this in frontend which is typescript. Can anyone help related to it.

API response:
{
“results”:{
“A”:{
“refId”:“A”,
“series”:null,
“tables”:null,
“dataframes”:[
“QVJST1cxAAD/////gAEAABAAAAAAAAoADgAMAAsABAAKAAAAFAAAAAAAAAEDAAoADAAAAAgABAAKAAAACAAAAFgAAAACAAAAKAAAAAQAAAAQ////CAAAAAwAAAABAAAAQQAAAAUAAAByZWZJZAAAADD///8IAAAAFAAAAAgAAAByZXNwb25zZQAAAAAEAAAAbmFtZQAAAAACAAAAhAAAAAQAAACW////FAAAADwAAABEAAAAAAAAAkgAAAABAAAABAAAAIT///8IAAAAEAAAAAYAAAB2YWx1ZXMAAAQAAABuYW1lAAAAAAAAAAAIAAwACAAHAAgAAAAAAAABQAAAAAYAAAB2YWx1ZXMAAAAAEgAYABQAAAATAAwAAAAIAAQAEgAAABQAAABEAAAATAAAAAAAAApMAAAAAQAAAAwAAAAIAAwACAAEAAgAAAAIAAAAEAAAAAQAAAB0aW1lAAAAAAQAAABuYW1lAAAAAAAAAAAAAAYACAAGAAYAAAAAAAMABAAAAHRpbWUAAAAAAAAAAP////+4AAAAFAAAAAAAAAAMABYAFAATAAwABAAMAAAAUAAAAAAAAAAUAAAAAAAAAwMACgAYAAwACAAEAAoAAAAUAAAAWAAAAAUAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAAAAAACgAAAAAAAAAAAAAAAAAAAAoAAAAAAAAACgAAAAAAAAAAAAAAAIAAAAFAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAPgGDjOdwL4W+EZ/lCnHvhb4hrV75+e+FvhGRBpb4b4W+EZEGlvhvhb0AQAAAAAAACwBAAAAAAAAWAIAAAAAAABkAAAAAAAAAMgAAAAAAAAAEAAAAAwAFAASAAwACAAEAAwAAAAQAAAALAAAADgAAAAAAAMAAQAAAJABAAAAAAAAwAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAKAAwAAAAIAAQACgAAAAgAAABYAAAAAgAAACgAAAAEAAAAEP///wgAAAAMAAAAAQAAAEEAAAAFAAAAcmVmSWQAAAAw////CAAAABQAAAAIAAAAcmVzcG9uc2UAAAAABAAAAG5hbWUAAAAAAgAAAIQAAAAEAAAAlv///xQAAAA8AAAARAAAAAAAAAJIAAAAAQAAAAQAAACE////CAAAABAAAAAGAAAAdmFsdWVzAAAEAAAAbmFtZQAAAAAAAAAACAAMAAgABwAIAAAAAAAAAUAAAAAGAAAAdmFsdWVzAAAAABIAGAAUAAAAEwAMAAAACAAEABIAAAAUAAAARAAAAEwAAAAAAAAKTAAAAAEAAAAMAAAACAAMAAgABAAIAAAACAAAABAAAAAEAAAAdGltZQAAAAAEAAAAbmFtZQAAAAAAAAAAAAAGAAgABgAGAAAAAAADAAQAAAB0aW1lAAAAAKgBAABBUlJPVzE=”
]
}
}
}

Tried using apache-arrow - npm but when tried using this getting the below error:

Error: Expected to read 1397380689 metadata bytes, but only read 1472.

Please anyone if there is any solution let me know. Stuck at this point.

Thanks

Could you share an example of what you’d like to use the tsdb API for? For most cases, you shouldn’t need to decode the data frames yourself.