[API]Posting resolution with line breaks
Hello
I have a script that sets the resolution in my requests, works but I don't get any linebreaks
This is the JSON that is sent. It has the \n and it works fine when I create a ticket but the resolution just get one line.
- {
- "operation": {
- "details": {
- "resolution": {
- "resolutiontext": "\r\nNamn: Joe Smith\r\nAnvändarnamn: JoSm\r\nLösenord: Donforgettochangeit \r\nE-mail: joe.smith@foo.foob"
-
- }
- }
- }
- }
This is the script
- $inputDataRE = @{operation=@{details=@{resolution=@{
- resolutiontext="
- Namn: $Firstname $Lastname
- Användarnamn: $samAccountName
- Lösenord: $Password
- E-mail: $email";
- }}}}|ConvertTo-Json -Depth 5
- $postParams = @{TECHNICIAN_KEY=$($APIKey);data=$($inputDataRE);format=$($formatJSON)}
- Invoke-RestMethod -Uri $URI -Body $postParams -Method POST -TimeoutSec 10
Your Version
: 10.5 Build 10526
Latest Version
: 10.5 Build 10530
Database
: postgres
New to ADSelfService Plus?