> **Warning:** This API is deprecated since Grafana v9.0.0 and will be removed in a future release. Refer to the [new data source update API](#update-an-existing-data-source).
**Required permissions**
See note in the [introduction]({{< ref "#data-source-api" >}}) for an explanation.
> **Note:** Similar to [creating a data source](#create-a-data-source), `password` and `basicAuthPassword` should be defined under `secureJsonData` in order to be stored securely as an encrypted blob in the database. Then, the encrypted fields are listed under `secureJsonFields` section in the response.
## Update an existing data source
`PUT /api/datasources/uid/:uid`
**Required permissions**
See note in the [introduction]({{< ref "#data-source-api" >}}) for an explanation.
> **Note:** Similar to [creating a data source](#create-a-data-source), `password` and `basicAuthPassword` should be defined under `secureJsonData` in order to be stored securely as an encrypted blob in the database. Then, the encrypted fields are listed under `secureJsonFields` section in the response.## Update an existing data source by id
// swagger:route PUT /datasources/{datasource_id} datasources updateDatasource
// swagger:route PUT /datasources/{datasource_id} datasources updateDatasourceByID
//
// Update an existing data source by its sequential ID.
//
// Similar to creating a data source, `password` and `basicAuthPassword` should be defined under
// secureJsonData in order to be stored securely as an encrypted blob in the database. Then, the
// encrypted fields are listed under secureJsonFields section in the response.
//
// If you are running Grafana Enterprise and have Fine-grained access control enabled
// you need to have a permission with action: `datasources:write` and scopes: `datasources:*`, `datasources:id:*` and `datasources:id:1` (single data source).
//
// Please refer to [updated API](#/datasources/updateDatasourceByUID) instead
//
// Deprecated: true
//
// Responses:
// 200: createOrUpdateDatasourceResponse
// 401: unauthorisedError
// 403: forbiddenError
// 500: internalServerError
// swagger:route PUT /datasources/uid/{datasource_uid} datasources updateDatasourceByUID
"description":"Similar to creating a data source, `password` and `basicAuthPassword` should be defined under\nsecureJsonData in order to be stored securely as an encrypted blob in the database. Then, the\nencrypted fields are listed under secureJsonFields section in the response.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:write` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:1` (single data source).",
"description":"If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:delete` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:kLtEtcRGk` (single data source).",
"tags":["datasources"],
@ -4744,10 +4781,11 @@
}
},
"put":{
"description":"Similar to creating a data source, `password` and `basicAuthPassword` should be defined under\nsecureJsonData in order to be stored securely as an encrypted blob in the database. Then, the\nencrypted fields are listed under secureJsonFields section in the response.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:write` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:1` (single data source).",
"description":"Similar to creating a data source, `password` and `basicAuthPassword` should be defined under\nsecureJsonData in order to be stored securely as an encrypted blob in the database. Then, the\nencrypted fields are listed under secureJsonFields section in the response.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:write` and scopes: `datasources:*`, `datasources:id:*` and `datasources:id:1` (single data source).\n\nPlease refer to [updated API](#/datasources/updateDatasourceByUID) instead",
"tags":["datasources"],
"summary":"Update an existing data source.",
"operationId":"updateDatasource",
"summary":"Update an existing data source by its sequential ID.",
"operationId":"updateDatasourceByID",
"deprecated":true,
"parameters":[
{
"type":"string",
@ -7574,11 +7612,12 @@
},
"/reports/render/pdf/{DashboardID}":{
"get":{
"description":"Available to all users and with a valid license.",
"description":"Please refer to [reports enterprise](#/reports/renderReportPDFs) instead. This will be removed in Grafana 10.",
"produces":["application/pdf"],
"tags":["reports","enterprise"],
"summary":"Render report for dashboard.",
"operationId":"renderReportPDF",
"deprecated":true,
"parameters":[
{
"type":"integer",
@ -7604,6 +7643,29 @@
}
}
},
"/reports/render/pdfs":{
"get":{
"description":"Available to all users and with a valid license.",
"produces":["application/pdf"],
"tags":["reports","enterprise"],
"summary":"Render report for multiple dashboards.",
"operationId":"renderReportPDFs",
"responses":{
"200":{
"$ref":"#/responses/contentResponse"
},
"400":{
"$ref":"#/responses/badRequestError"
},
"401":{
"$ref":"#/responses/unauthorisedError"
},
"500":{
"$ref":"#/responses/internalServerError"
}
}
}
},
"/reports/settings":{
"get":{
"description":"Available to org admins only and with a valid or expired license\n\nYou need to have a permission with action `reports.settings:read`x.",
"description":"Similar to creating a data source, `password` and `basicAuthPassword` should be defined under\nsecureJsonData in order to be stored securely as an encrypted blob in the database. Then, the\nencrypted fields are listed under secureJsonFields section in the response.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:write` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:1` (single data source).",
"description":"If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:delete` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:kLtEtcRGk` (single data source).",
"tags":["datasources"],
@ -3806,10 +3843,11 @@
}
},
"put":{
"description":"Similar to creating a data source, `password` and `basicAuthPassword` should be defined under\nsecureJsonData in order to be stored securely as an encrypted blob in the database. Then, the\nencrypted fields are listed under secureJsonFields section in the response.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:write` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:1` (single data source).",
"description":"Similar to creating a data source, `password` and `basicAuthPassword` should be defined under\nsecureJsonData in order to be stored securely as an encrypted blob in the database. Then, the\nencrypted fields are listed under secureJsonFields section in the response.\n\nIf you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:write` and scopes: `datasources:*`, `datasources:id:*` and `datasources:id:1` (single data source).\n\nPlease refer to [updated API](#/datasources/updateDatasourceByUID) instead",
"tags":["datasources"],
"summary":"Update an existing data source.",
"operationId":"updateDatasource",
"summary":"Update an existing data source by its sequential ID.",
"operationId":"updateDatasourceByID",
"deprecated":true,
"parameters":[
{
"type":"string",
@ -6281,11 +6319,12 @@
},
"/reports/render/pdf/{DashboardID}":{
"get":{
"description":"Available to all users and with a valid license.",
"description":"Please refer to [reports enterprise](#/reports/renderReportPDFs) instead. This will be removed in Grafana 10.",
"produces":["application/pdf"],
"tags":["reports","enterprise"],
"summary":"Render report for dashboard.",
"operationId":"renderReportPDF",
"deprecated":true,
"parameters":[
{
"type":"integer",
@ -6311,6 +6350,29 @@
}
}
},
"/reports/render/pdfs":{
"get":{
"description":"Available to all users and with a valid license.",
"produces":["application/pdf"],
"tags":["reports","enterprise"],
"summary":"Render report for multiple dashboards.",
"operationId":"renderReportPDFs",
"responses":{
"200":{
"$ref":"#/responses/contentResponse"
},
"400":{
"$ref":"#/responses/badRequestError"
},
"401":{
"$ref":"#/responses/unauthorisedError"
},
"500":{
"$ref":"#/responses/internalServerError"
}
}
}
},
"/reports/settings":{
"get":{
"description":"Available to org admins only and with a valid or expired license\n\nYou need to have a permission with action `reports.settings:read`x.",