I have changed the body of my request to almost match a GET request I made to an issue already created. (I had to remove a lot of fields from from the response I got from the GET request because the logs instructed me to).
This is what I have left (and is being used as body):
{
"id": "10004",
"self": "https://goncalodev.atlassian.net/rest/api/2/issue/10004",
"key": "TDG-4",
"fields": {
"issuetype": {
"self": "https://goncalodev.atlassian.net/rest/api/2/issuetype/10001",
"id": "10001",
"description": "Functionality or a feature expressed as a user goal.",
"iconUrl": "https://goncalodev.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10315?size=medium",
"name": "Story",
"subtask": false,
"avatarId": 10315,
"hierarchyLevel": 0
},
"project": {
"self": "https://goncalodev.atlassian.net/rest/api/2/project/10000",
"id": "10000",
"key": "TDG",
"name": "TesteDG",
"projectTypeKey": "software",
"simplified": false,
"avatarUrls": {
"48x48": "https://goncalodev.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10413",
"24x24": "https://goncalodev.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10413?size=small",
"16x16": "https://goncalodev.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10413?size=xsmall",
"32x32": "https://goncalodev.atlassian.net/rest/api/2/universal_avatar/view/type/project/avatar/10413?size=medium"
}
},
"priority": {
"self": "https://goncalodev.atlassian.net/rest/api/2/priority/2",
"iconUrl": "https://goncalodev.atlassian.net/images/icons/priorities/high.svg",
"name": "High",
"id": "2"
},
"labels": [],
"assignee": {
"self": "https://goncalodev.atlassian.net/rest/api/2/user?accountId=62fceb401e82e839c25008fc",
"accountId": "62fceb401e82e839c25008fc",
"emailAddress": "goncalo.pereira2@adidas.com",
"avatarUrls": {
"48x48": "https://secure.gravatar.com/avatar/eb6867238200154625cda6a68d890029?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FG-1.png",
"24x24": "https://secure.gravatar.com/avatar/eb6867238200154625cda6a68d890029?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FG-1.png",
"16x16": "https://secure.gravatar.com/avatar/eb6867238200154625cda6a68d890029?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FG-1.png",
"32x32": "https://secure.gravatar.com/avatar/eb6867238200154625cda6a68d890029?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FG-1.png"
},
"displayName": "Goncalo.Pereira2",
"active": true,
"timeZone": "Europe/Lisbon",
"accountType": "atlassian"
},
"components": [],
"description": null,
"attachment": [],
"summary": "If it worked, success!!",
}
}
And the logs are as follows:
INFO 2022-08-29T20:06:18.781Z 14c4a074-e1f5-4a14-b08a-c5fc3f9cc740 Response: 400 Bad Request
INFO 2022-08-29T20:06:18.781Z 14c4a074-e1f5-4a14-b08a-c5fc3f9cc740 {
errorMessages: [
'There was an error parsing JSON. Check that your request body is valid.'
]
}