I've created a Bitbucket repository using a Jenkinsfile, with the following code (with private data replaced with {}):
sh "curl -X POST -H \"Authorization: Basic {KEY}=\"
\"https://api.bitbucket.org/2.0/repositories/{project}/{repository_name}\"
-H \"Content-Type: application/json\"
-d '{\"has_wiki\": true, \"is_private\": true, \"project\": {\"key\": \"{key}\"}}'"
This creates a repository with default access rights.
I need to then give a Group Write access to this repository.
I've scoured the internet and I can't find any up to date documentation or examples of how to do this. How do I do this using a shell command?