Zeilenumbruch bei setHostNotes

Antworten
islam
Beiträge: 103
Registriert: 19 Okt 2011, 12:08

Zeilenumbruch bei setHostNotes

Beitrag von islam »

Hallo,

ich versuche mittels opsi-admin und opsiservicecall einen Zeilenumbruch in die Client Notizen einzufügen, was leider nicht klappt:

Code: Alles auswählen

opsi-admin -d method setHostNotes "host.fqdn" "AnyDesk ID: \n 1234"
leider bekomme ich damit keine neue Zeile, sondern ein escaptes "\n" in dem Feld

Das gleiche habe ich über opsiservicecall probiert:

Code: Alles auswählen

[opsiservicecall_setHostNotes]
"method":"setHostNotes"
"params":[
"%HostID%"
"AnyDesk ID: \n 1234"
]
Error: retrieveJSONObject --- opsi service problem ----> unexpected Result from webservice in retrieveJSONObject, number of lines: 0-> retrieveJSONObject:1: Stream read error
Error: JSON connection not established
Benutzeravatar
SisterOfMercy
Beiträge: 1523
Registriert: 22 Jun 2012, 19:18

Re: Zeilenumbruch bei setHostNotes

Beitrag von SisterOfMercy »

Is there a way to request the host notes with opsi-admin? Set a note with multiple lines in configed and see what the JSON would look like?
Have you also tried it with \r? Just guessing here.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
islam
Beiträge: 103
Registriert: 19 Okt 2011, 12:08

Re: Zeilenumbruch bei setHostNotes

Beitrag von islam »

Thanks for your Reply.
SisterOfMercy hat geschrieben:Is there a way to request the host notes with opsi-admin? Set a note with multiple lines in configed and see what the JSON would look like?
already tried

Code: Alles auswählen

opsi-admin -d method host_getObjects [] '{"id":"host.fqdn"}' | grep "notes"
is gives for new lines. But when entered as set command it gets escaped and becomes when requested again
Have you also tried it with \r? Just guessing here.
yes, tried. also didn't work

Thanks
Antworten