hi all
I am trying to create an issue in jira via curl in windows cmd. I am getting the following error, {"errorMessages":[],"errors":{"customfield_10015":"Epic Name is required."}}.
Please find below my request, please note that the same parameters are working when I am using the postman tool.
curl -D- -u userid:password -d"{\"fields\":{\"project\":{\"key\": \"TRA\"},\"summary\": \"Rest API1\",\"description\":\"Creating Rest API1 Task\",\"issuetype\":{\"name\": \"Task\"}}}" -H "Content-Type: application/json" -X POST https://jira-base-url/jira/rest/api/2/issue
Where am I going wrong?
In your example you are creating a Task, does the same code works when you are creating an Epic?
Epic Name is required for Epics, therefore you need you need to include the field in your request body.
something like:
curl -D- -u userid:password -d"{\"fields\":{\"project\":{\"key\": \"TRA\"},\"summary\": \"Rest API1\",\"description\":\"Creating Rest API1 Task\",\"customfield_10015\":\"Epic Name\",\"issuetype\":{\"name\": \"Epic\"}}}" -H "Content-Type: application/json" -X POST https://jira-base-url/jira/rest/api/2/issue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.