Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Updating Share Permissions using PUT /rest/api/2/filter/{id} does not work

Ido Zak November 13, 2022

Hey,
I am trying to work with the rest API of a JIRA DC for some internal development feature.
I am working with the filter update API (PUT /rest/api/2/filter/{id}) and I succeed to update different fields like name, jql, and description.
However, when I try to update the Share Permissions they are not being updated (and I still get a 200 response). It seems that the syntax is right (as the request fails when I make  syntax changes in the permission part) but the changes does not take effect.
I am following the request schema from https://docs.atlassian.com/software/jira/docs/api/REST/9.2.0/\#api/2/filter-editFilter
.
This is how my request body looks:
{
"name": "myThird",
"description": "desc1 47",
"jql": "text ~ blac",
"sharePermissions": [
{
"type": "group",
"group": {
"name": "jira-administrator"
},
"view": true,
"edit": false
}
]
}

As anyone encountered this? Am I doing something wrong or is there a mistake in the schema?

Thanks,
Ido

2 answers

1 accepted

1 vote
Answer accepted
Ido Zak November 20, 2022

In case anyone is interested in the future, I opened a support case, this is an undocumented limitation that they will fix. You cannot edit share permissions, only delete and add new ones

0 votes
Fabio Racobaldo _Herzum_
Community Champion
November 13, 2022

Hi @Ido Zak ,

welcome to the Atlassian community!

Probably you are using the wrong API. Please try this one https://docs.atlassian.com/software/jira/docs/api/REST/9.3.1/#api/2/filter-addSharePermission

REST URL : YOUR_JIRA_BASE_URL/rest/api/2/filter/{id}/permission

TYPE : POST

PARAMETERS :

[ { "type": "group", "groupname": "jira-administrators", "view": true, "edit": false } ]

Hope this helps,

Fabio

Ido Zak November 13, 2022

Thanks!
I am looking to edit the permissions, not to add. Of course I can delete and add if needed, I was hoping there is a better way to edit.
As the schema of the PUT contains the permissions I was hoping it should work somehow

Like Joseph de Tarlé likes this

Suggest an answer

Log in or Sign up to answer