Hi, I am new to grafana and i would like to develop a plugin to fetch cost related data using AWS cost explorer endpoint api. Requests (Queries) have to be made to this API in json format. How can i build a plugin to do this? Really appreciate your help here.
Thanks.
mudu
March 1, 2021, 9:32pm
2
I would suggest to checkout the simple datasource plugin tutorial.
Iβm also new to grafana, typescript and react, but i made it to fetch from a corona data platform numbers in json format.
Hi Mudu, did you send a json request (query) to fetch the data ?
mudu
March 3, 2021, 4:03pm
4
Yeah I configured a field for the data source for the city and used that option in a params object to get json data
async doRequest(query: MyQuery) {
const { where } = query;
const result = await getBackendSrv().datasourceRequest({
method: βGETβ,
url: someurl as string,
params: {
where: where,
outFields: β*β,
outSR: β4326β,
f: βjsonβ,
},
});
return result;
}
system
Closed
March 3, 2022, 4:04pm
5
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.