0

I use jira-python and Python 2.7. I would like to know if it is possible to share one of my jira filters using this API. I can change its name, query and add it to my favorites list, but how do I share it with other users?

Fredrik
  • 598
  • 1
  • 5
  • 22

1 Answers1

1

This isn't possible right now in the jira python client but it should be doable as there is a REST endpoint for creating a share: https://developer.atlassian.com/cloud/jira/platform/rest/#api-api-2-filter-id-permission-post

curl --request POST \
  --user email@example.com:<api_token> \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '
    {
      "type": "group",
      "groupname": "jira-administrators"
    }' \
  --url 'https://your-domain.atlassian.net/rest/api/2/filter/{id}/permission'

This wouldn't be that hard to implement...you could either create a new top-level method or put it in the update_filter() method (probably by adding kwarg support. Or you can just call the REST method directly.

darksideofthesun
  • 601
  • 2
  • 9
  • 19
  • I will look in to how I managed this at the time and see if your proposed solution works better for me. Just can't do it now... Thanks! – Fredrik Jan 04 '18 at 20:29