Attempting to update using JIRA REST and getting a 400 error

I'm trying to replace the text in a multiline text field using the following JSON:

{"fields":{"customfield_10076":"stdquicklookup.pck.1.5 [ISSADEv8]\nstdquicklookup.pck.1.5 [ISSADEv9]"}}

(note - the editor here is making this multi-lined, but it's a single JSON line.)

Usually, I have no issue updating the custom field; in fact, 95% of the time, the code executes fine.  I can't find anything wrong with this JSON, and it doesn't seem to have anything to do with carriage returns, spacing, etc.  I'm using Powershell's Invoke-Restmethod (like I do with countless other API calls), which shouldn't make any difference.

Anybody see something I'm missing?


1 answer

This widget could not be displayed.

Hi Lee,

I tried the exact string that you have provided and it works fine on my side. I am using Insomnia to execute the REST API.

{"fields":{"customfield_10200":"stdquicklookup.pck.1.5 [ISSADEv8]\nstdquicklookup.pck.1.5 [ISSADEv9]"}}

One of the thing that I can see that could cause a problem is [ and ] perhaps, you can try to escape the characters and see if it works. 

I hope that this helps. Cheers!

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in Statuspage

What are your best incident management tips and stories? #HugOps

 👋Community members! Downtime happens. And great incident response takes a village. Teams like Support, Dev, SRE, Ops, IT, and Marketing have to come together to resolve the problem while keep...

70 views 2 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you