Below is the Python code to Create worklog in Jira. You need to install a request library for this.
import requests
from requests.auth import HTTPBasicAuth
import json
url = "https://your jira address here/worklog"
auth = HTTPBasicAuth("username", "jira token mention here")
headers = {
"Accept": "application/json"
}
response = requests.request(
"GET",
url,
headers=headers,
auth=auth
)
print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
Comments
Post a Comment