how to insert a line break/new line in the description of an incident via a REST API POST

_RV_
Kilo Contributor

Using the REST API Explorer (Post), at the end, I would like a incident.description on 3 lines:

Description=

“Line 1

 Line 2

 Line 3”

contrary to certain speeches, characters ‘\r’ or ‘%0D%0A’ do not generate newlines…

do you know a way to generate these 3 lines of description?

Thank's. Cordialy .RV.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

this worked for me in past: using \n

Request Body: {
"short_description":"test",
"description": "UserA\nCompany"
}

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

this worked for me in past: using \n

Request Body: {
"short_description":"test",
"description": "UserA\nCompany"
}

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Yes! it works... Many thanks Ankur.

Glad to help.

Please mark response helpful as well.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

But Its not working for me
this is the part of response for post rest api
"short_description":"UserA\nCompany"

please help