Creating and granting edit permission for Filters in Team Managed Projects via REST API


Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

Summary

How to create a filter via REST api by granting edit permission to certain roles for Team Managed projects

Environment

Jira Cloud

Solution

This Knowledge Base (KB) article explains the process of creating a test filter for a team managed project and sharing it with the "Administrators" role in Jira. It also provides steps on how to find the Role ID for a team managed project.

Team managed projects in Jira have unique roles compared to company managed projects. Here, we will walk you through the steps to create a test filter for a team managed project called "Test" and share it with the "Administrators" role.


Creating a Test Filter for a Team Managed Project:

1. Create a JSON object containing the necessary information, as shown below:

{
  "jql": "project='Assignee test'",
  "name": "Assignee TEST filter with edit permission",
  "description": "Lists all issues",
  "editPermissions": [
        {
            "type": "projectRole",
            "project": {
                "id": "10010"
            },
            "role": {
                "id": "10020"
            }
        }
    ]
}


2. Replace the project ID and role ID with the appropriate values for your specific project. In this example, the project ID is 10010, and the role ID for "Administrators" is 10020.

To find the role ID for a team managed project, follow these steps:

Enter the following URL format in your browser, replacing `<sitename>` and `<projectkey>` with the appropriate values:

https://<sitename>.atlassian.net/rest/api/3/project/<projectkey>/roledetails?excludeConnectAddons=true

The URL will return the role details, including the role ID for the project.


3. Use any methods like CURL to post the data as mentioned in  




Last modified on Sep 8, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.