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
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.