Pass newline to API #5110

Closed
djtecha opened this Issue Dec 2, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@djtecha

djtecha commented Dec 2, 2016

Is there any way to pass a newline to the notes api? I tried '\n', '\n' and all the other fun encoding but the notes tab doesn't respect the newline and just prints those chars.

@laf laf added the API label Jan 29, 2017

laf added a commit to laf/librenms that referenced this issue Feb 7, 2017

@laf laf referenced this issue Feb 7, 2017

Merged

webui: urldecode device notes #5110 #5824

2 of 2 tasks complete

@murrant murrant closed this in #5824 Feb 8, 2017

@djtecha

This comment has been minimized.

Show comment
Hide comment
@djtecha

djtecha Feb 8, 2017

This is still not working correctly with the latest code. I'm running the following endpoint:

/api/v0/devices/test -d {"field": "notes", "data": "warranty: NA \npostgresql: NA\n"}

djtecha commented Feb 8, 2017

This is still not working correctly with the latest code. I'm running the following endpoint:

/api/v0/devices/test -d {"field": "notes", "data": "warranty: NA \npostgresql: NA\n"}

@laf

This comment has been minimized.

Show comment
Hide comment
@laf

laf Feb 8, 2017

Member

you need to urlencode that \n :)

Member

laf commented Feb 8, 2017

you need to urlencode that \n :)

@djtecha

This comment has been minimized.

Show comment
Hide comment
@djtecha

djtecha Feb 9, 2017

haha my bad, totally works. Thanks!

djtecha commented Feb 9, 2017

haha my bad, totally works. Thanks!

@lock

This comment has been minimized.

Show comment
Hide comment
@lock

lock bot May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

lock bot commented May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

@librenms librenms locked as resolved and limited conversation to collaborators May 17, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.