Below is the Python code to get create a groups in Jira. You need to install a request library for this. Here is the code:
import requests
from requests.auth import HTTPBasicAuth
import json
url = "https://your jira address here/rest/api/3/group"
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
}
payload = json.dumps( {
"name": "QA"
} )
response = requests.request(
"POST",
url,
data=payload,
headers=headers,
auth=auth
)
print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
Comments
Post a Comment