0

I would like to create clusters in databricks workspace and give 'Can Manage' permissions to some users. How could I do this with REST API or some other script?

This is how I create clusters in python (can be done the same with cURL):

  response = requests.post(
  'https://%s/api/2.0/clusters/create' % (DOMAIN),
  headers={'Authorization': b"Basic " + base64.standard_b64encode(b"token:" + TOKEN)},
    json={            
        "cluster_name": "my-cluster",
        "num_workers": 2,
        "spark_version": "5.3.x-scala2.11",
        "node_type_id": "Standard_D3_v2",
        'spark_env_vars': {
            'PYSPARK_PYTHON': '/databricks/python3/bin/python3',
        }
    }
)

Is there possibility to add 'Can Manage' permission to users with a script?

Mirit
  • 33
  • 3
  • 9

1 Answers1

0

The REST API does not support applying permissions to jobs (https://docs.azuredatabricks.net/api/latest/jobs.html). I have raised this with Databricks before and been told "it's coming" - but that was quite a while ago.

Right now only the creator and administrators will have permission on it.

simon_dmorias
  • 2,343
  • 3
  • 19
  • 33
  • Yes, I've just had the same answer for cluster permissions. This can be done only in manual way. However, other users with 'Can Manage' permissions can manage clusters too: https://docs.databricks.com/administration-guide/admin-settings/cluster-acl.html#configure-cluster-level-permissions – Mirit Jul 25 '19 at 12:27