Getting an error , {"errorMessages":[],"errors":{"customfield_10015":"Epic Name is required."}}

Sonal Singh July 6, 2020

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?

1 answer

0 votes
Italo Qualisoni [e-Core]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 6, 2020

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

Suggest an answer

Log in or Sign up to answer