Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Having trouble creating multiple issues using rest api call (bulk)

Tony Pham
Contributor
March 26, 2019

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"
}
}
}
]
}

1 answer

1 accepted

2 votes
Answer accepted
Matthias Gaiser _K15t_
Community Champion
March 27, 2019

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.

Tony Pham
Contributor
March 27, 2019

Thanks Matthias, it is working now...

Like Matthias Gaiser _K15t_ likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events