cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

error while setting up permission for job via api

yash_verma
Visitor

Hi Guys , I am getting below error  when I am trying to setup permission for the job via api. Though I am able to create a job via api. Can anyone help to identify the issue or any one has faced below error

 

{
"error_code": "INVALID_PARAMETER_VALUE",
"message": "Permission type not defined"
}

 

 

json payload

 

{
"access_control_list": [
{
"user_name": "no_email@gmail.com",
"display_name": "no_email",
"all_permissions": [
{
"permission_level": "CAN_MANAGE",
"inherited": false
}
]
}
]
}

1 ACCEPTED SOLUTION

Accepted Solutions

Alberto_Umana
Databricks Employee
Databricks Employee

I see the problem. It is because you are inputting parameters that are not valid ones. The REST API Patch call should look something like the example in the page:

You are inputting values that are shown on the sample response.

Please validate the input parameters indicated on the API.

{
"access_control_list": [
{
"user_name": "string",
"group_name": "string",
"service_principal_name": "string",
"permission_level": "CAN_MANAGE"
}
]
}

View solution in original post

6 REPLIES 6

Alberto_Umana
Databricks Employee
Databricks Employee

Hi @yash_verma,

what is the API you are calling?

The error you're encountering, "INVALID_PARAMETER_VALUE: Permission type not defined," suggests that there is an issue with the JSON payload you are using to set permissions for the job via the API. Specifically, it seems that the API is expecting a defined permission type, but it is not finding one in your request.

Add the Permission Type: Modify your JSON payload to include the "permission_type" field. Here is an example of how you might structure it:

{
"access_control_list": [
{
"user_name": "no_email@gmail.com",
"display_name": "no_email",
"all_permissions": [
{
"permission_level": "CAN_MANAGE",
"inherited": false,
"permission_type": "user" // Add this line
}
]
}
]
}

yash_verma
Visitor

Hi Alberto,

Please refer the below link from databricks and there is no such param name as permission type. Even I have tried to retrieve the another job permission through api and there also no such parameter exists. Not sure  from where this error is coming

Update job permissions | Jobs API | REST API reference | Databricks on AWS

Alberto_Umana
Databricks Employee
Databricks Employee

Thanks for sharing the endpoint.

Could you please send me the API call you are making with body details? based on the error looks like something might be wrong with the call.

yash_verma
Visitor

Please let me know if you require more details. I have put the screenshot of insomnia

yash_verma_0-1733234268419.png

 

 

 

Alberto_Umana
Databricks Employee
Databricks Employee

I see the problem. It is because you are inputting parameters that are not valid ones. The REST API Patch call should look something like the example in the page:

You are inputting values that are shown on the sample response.

Please validate the input parameters indicated on the API.

{
"access_control_list": [
{
"user_name": "string",
"group_name": "string",
"service_principal_name": "string",
"permission_level": "CAN_MANAGE"
}
]
}

yash_verma
Visitor

Thanks Alberto. It worked.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group