- What Grafana version and what operating system are you using?
8.5.20, ubuntu 5.4.0 - What are you trying to achieve?
Create a mysql datasource using HTTP API and setup the session timezone. - How are you trying to achieve it?
Generarting a HTTP POST request to the url ‘/api/datasources’ with the needed json data. - What happened?
I tried to setup timezone using the key ‘sessionTimezone’ in the json data. The datasource was created but the timezone wasn’t configured. - What did you expect to happen?
That timezone was configured to ‘+00:00’ when the datasources was created. - Can you copy/paste the configuration(s) that you are having problems with?
This is the json data:
data = {
“name”: usuario,
“type”: “mysql”,
“access”: “direct”,
“url”: “http://localhost:3306”,
“user”: USUARIO_DB,
“database”: nombreDb,
“sessionTimeZone”: “+00:00”,
“secureJsonData”: {
“password”: CLAVE_DB,
},
“orgId”: idOrg
} - Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
No - Did you follow any online instructions? If so, what is the URL?
Data source HTTP API | Grafana documentation