Datasources API and X-Grafana-Org-Id


I’m trying to create a datasource within an organisation, while authenticated as a server admin.

I can successfully create a datsource using the ‘/api/datasources’ using CURL or Postman, but I’m unable to specify a target Org in these HTTP API calls.

I understand the Auth Token determines the Org context based on the user’s org, but that adds an inconvenient scripting step.
Is there no way for an admin account to programmatically assign datasources to Orgs?

Does the “X-Grafana-Org-Id” header not work with the /api/datasources endpoint?

It looks like the way go about it is User HTTP API | Grafana documentation.