When I am trying to use the bulk rest api to create multiple issues, I am keep getting the following error:
["Unexpected character ('{' (code 123)): was expecting double-quote to start field name
Here is my data file:
{
"issueUpdates":
[
{
"update": {},
{
"fields":
{
"project":
{
"key": "SIT"
},
"issuetype":
{
"name": "Task"
},
"summary": "Authentication error while logging into C1PA-SAPWS-V03",
"description": "Authentication error while logging into C1PA-SAPWS-V03",
"priority":
{
"name": "Priority 1"
},
"customfield_10400": "INC0154144",
"customfield_10804": "ICB-Server Ops",
"customfield_10800": "apps",
"customfield_10801": "capture",
"customfield_10803": "Direct input",
"customfield_10900": "Work in Progress"
}
}
},
{
"update": {},
{
"fields":
{
"project":
{
"key": "SIT"
},
"issuetype":
{
"name": "Task"
},
"summary": "PROJECT -- Move node IL76 to new office space",
"description": "PROJECT -- Move node IL76 to new office space",
"priority":
{
"name": "Priority 2"
},
"customfield_10400": "INC0154145",
"customfield_10804": "ICB-Network",
"customfield_10800": "network",
"customfield_10801": "jutnet",
"customfield_10803": "Direct input",
"customfield_10900": "Pending"
}
}
}
]
}
Hi @Tony Pham,
in general I'd recommend to ask these questions in the developer community.
However comparing your JSON to the one documented in the REST API docs, you have a pair of curly brackets too much. You have to get rid of the curly bracket before "field" - and also the corresponding closing bracket. So your JSON would look like this:
{
"issueUpdates": [
{
"update": {},
"fields": {
"project": {
"key": "SIT"
},
"issuetype": {
"name": "Task"
},
"summary": "Authentication error while logging into C1PA-SAPWS-V03",
"description": "Authentication error while logging into C1PA-SAPWS-V03",
"priority": {
"name": "Priority 1"
},
"customfield_10400": "INC0154144",
"customfield_10804": "ICB-Server Ops",
"customfield_10800": "apps",
"customfield_10801": "capture",
"customfield_10803": "Direct input",
"customfield_10900": "Work in Progress"
}
},
{
"update": {},
"fields": {
"project": {
"key": "SIT"
},
"issuetype": {
"name": "Task"
},
"summary": "PROJECT -- Move node IL76 to new office space",
"description": "PROJECT -- Move node IL76 to new office space",
"priority": {
"name": "Priority 2"
},
"customfield_10400": "INC0154145",
"customfield_10804": "ICB-Network",
"customfield_10800": "network",
"customfield_10801": "jutnet",
"customfield_10803": "Direct input",
"customfield_10900": "Pending"
}
}
]
}
Cheers,
Matthias.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.