componentsjirajira-rest-apibad-requestintellij-http-client

jira REST API create issue including component


I am trying to create issue using Jira REST API including component. I am posting this JSON but I get The remote server returned an error: (400) Bad Request.

Issue is:- Without component there is no error, but when component is there issue created. Any help? JSON:

{
  "fields": {
    "project": {
      "key": "keyGoesHere"
    },
    "assignee": {
      "name": "name.surname"
    },
    "component": {
      "name": "someName"
    },
    "summary": "test2",
    "description": "test2",
    "issuetype": {
      "name": "Task"
    }
  }
}

Solution

  • I found the answer. Just in case someone needs it.

    "components": [{
      "name": "someName"
    }],