Python Code:
import requests
from requests.auth import HTTPBasicAuth
import json
url = "https://<site-url>/jira/rest/agile/1.0/sprint"
auth = HTTPBasicAuth("userid", "Password")
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
}
payload = json.dumps( {
"name": "sprint test",
"startDate": "2019-07-01T15:22:00.000+10:00",
"endDate": "2019-07-12T01:22:00.000+10:00",
"originBoardId": 5,
"goal": "sprint test goal"
} )
response = requests.request(
"POST",
url,
data=payload,
headers=headers,
auth=auth
)
print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
Output:
{
"errorMessages": [
"To start a sprint, you must have the Manage Sprints permission for all of the following projects: <Project Name>"
],
"errors": {}
}
How to resolve this error?