Forums

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

How to Create Filter With Project Permission Via REST

Luis Basilio November 1, 2018

Hey fellows,

I need to create more than 50 filters and I'd like to know how can I create them with Project Permission to All User. For now, all these filters gets issues from a unique project.
I already know how to create them, but I don't how to set the permission at the same request.


Create Filter: POST /rest/api/2/filter
{
"name": "Filter - Sample",
"description": "",
"jql": "project = XX AND type = "Story" ORDER BY summary ASC",
"favourite": true

}

 

Edit Filter Permission: POST /rest/api/2/filter/{id}/permission
{
    "id": "https://docs.atlassian.com/jira/REST/schema/share-permission-input#",
    "title": "Share Permission Input",
    "type": "object",
    "properties": {
        "type": {
            "type": "string"
        },
        "projectId": {
            "type": "string"
        },
        "groupname": {
            "type": "string"
        },
        "projectRoleId": {
            "type": "string"
        },
        "userKey": {
            "type": "string"
        },
        "view": {
            "type": "boolean"
        },
        "edit": {
            "type": "boolean"
        }
    },
    "additionalProperties": false,
    "required": [
        "view",
        "edit"
    ]}

 I'd like to use the same request to create with Project Permission. 

1 answer

0 votes
Zaheer Kazi January 17, 2023

Not sure if this is already addressed, but i have a similar situation now, so i will try doing it in three steps, 1) Create the filter 2) Get the filter ID from the response 3) Set the permissions for filter ID received in step 2)

Suggest an answer

Log in or Sign up to answer