How to "reload datasource" without restarting server

Hi all,

I’m trying to update datasources through the HTTP API.

My request uses modified JSON from the HTTP GET for the datasource (with the modifications I want to make). I always get the following response:

HTTP/1.1 409 Conflict
Date: Tue, 02 Jul 2024 08:50:08 GMT
Server: ********
Cache-Control: no-store
Content-Type: application/json
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-Xss-Protection: 1; mode=block
Content-Length: 107

{
  "message": "Datasource has already been updated by someone else. Please reload and try again",
  "traceID": ""
}

The “message” says to “reload”. I don’t see an API endpoint for this on the Datasources API page (linked above). How can I “reload” through code?

Figured out a workaround:

GET datasource by uid,
DELETE datasource by uid,
then CREATE with the same uid and params that you want from the original GET.

This is probably the same thing as reloading the datasource.