Create a user and provide permission to only specific dashboard using api

Hello community,
This topic maybe already has an answer but i can’t find it, I’m trying to create a user and provide access to only specific dashboard. For now I’m able to create user but not succeed to provide access to only specific dashboard. Below line of code I’m using to create user.

curl -XPOST -H "Content-Type: application/json" -d '{
}' http://admin:admin@localhost:3000/api/admin/users

also using python script for the same

import requests
import json

grafana_url = "localhost:3000"
username = "admin"
password = "admin"

base_url = "http://{}:{}@{}".format(username, password, grafana_url)

data = {
  "OrgId": 1


resp = + "/api/admin/users", json=data, verify=False)
data = resp.json()

It will be very helpful to find solution for this.

1 Like

+1, anybody?