You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I am writing an application which makes many generated API calls, to update Insight fields.
Many values I am updating are multiline strings, like this one:
{
"objectTypeId": 678,
"attributes": [
{
"objectTypeAttributeId": 2759,
"objectAttributeValues": [
{
"value": "C:\Program Files\Microsoft\Exchange Server\V15\Mailbox\address
C:\Windows
C:\
E:\
C:\ExchangeSetupLogs
C:\Windows\SYSVOL\sysvol\ritestkobe.local\SCRIPTS
C:\Windows\SYSVOL\sysvol"
}
]
}
]
}
There are several other requests like this, containing many and more lines.
The problem is, a request containing a value with multiple lines is returning an internal server error.
Is there anyway to post multiline values to Insight objects through the API? If not, I would really appreciate any suggestions to solve this issue.
I suspect the \ in your string are as much a problem as the carriage returns
Try this
{
"objectTypeId": 678,
"attributes": [
{
"objectTypeAttributeId": 2759,
"objectAttributeValues": [
{
"value": "C:\\\\Program Files\\\\Microsoft\\\\Exchange Server\\\\V15\\\\Mailbox\\\\address
C:\\\\Windows
C:\\\\
E:\\\\
C:\\\\ExchangeSetupLogs
C:\\\\Windows\\\\SYSVOL\\\\sysvol\\\\ritestkobe.local\\\\SCRIPTS
C:\\\\Windows\\\\SYSVOL\\\\sysvol"
}
]
}
]
}
If that doesn't quite work, put the string all in one line and separate them with '\\n'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.