- Firstly, configure the data source in Grafana
- Then generate an API key in Grafana and note them down for subsequent API requests
- After that determine the API endpoint to which you want to request
- Then you can build the API query, depending on the data you want
- Using the webread function you can send a request to the API and retrieve data. The request requires the API key as an authorization token, which you can pass in using the weboptions function.
- Grafana API key generation: https://grafana.com/docs/grafana/latest/administration/api-keys/#create-an-api-key
- Grafana API querying a data source: https://grafana.com/docs/grafana/latest/developers/http_api/data_source/#query-a-data-source
- Webread function in MATLAB: https://in.mathworks.com/help/matlab/ref/webread.html