Unable to create, update, delete ticket using Solarwinds WHD API

createticket_json.txt
{"reportDateUtc":"2023-0123T14:15:16Z","room":"","emailClient":true,"emailTech":true,"emailTechGroupLevel":false,"emailGroupManager":false,"emailCc":false,"ccAddressesForTech":"","emailBcc":false,"bccAddresses":"","subject":"service down","detail":"Service alert url down.","assignToCreatingTech":false,"problemtype":{"type":"ProblemType","id":6},"sendEmail":false,"location"{"type":"Location","id":1},"department"{"type":"Department","id":1},"clientReporter"{"type":"Client","id":1},"statustype":{"type":"StatusType","id":1},"prioritytype":{"type":"PriorityType","id":1}}

Output.txt
{"id":1061,"type":"Ticket","bccAddresses":null,"ccAddressesForTech":null,"closeDate":null,"departmentId":null,"lastUpdated":"2023-01-19T14:57:04Z","locationId":2,"priorityTypeId":3,"room":null,"statusTypeId":1,"subject":"EDM-800| error in adjustment by option WITH REMITT> DETAILS","clientReporter":{"id":102,"type":"Client","email":"bo_g204@licindia.com","firstName":"bo_g204","lastName":"licindia","notes":null,"phone":null,"phone2":null,"department":null,"location":{"id":2,"type":"Location","address":null,"city":null,"locationName":"Yogakshema","postalCode":null,"state":null},"room":null,"companyName":null},"clientTech":{"id":1,"type":"Tech","email":"Kumar.Saurabh2@TechMahindra.com","displayName":"Saurabh Kumar"},"department":null,"location":{"id":2,"type":"Location","address":null,"city":null,"locationName":"Yogakshema","postalCode":null,"state":null},"prioritytype":{"id":3,"type":"PriorityType","priorityTypeName":"Critical"},"problemtype":{"id":61,"type":"RequestType","detailDisplayName":"PMJJBY"},"statustype":{"id":1,"type":"StatusType","statusTypeName":"Open"},"techGroupLevel":null,"assets":[],"detail":"Sir\r<br /> adjustment option &#34; with remittance details&#34; is not working properly for our Unit.\r<br /> same file which shows error with this option is successful with option, &#34; without remittance details&#34;\r<br /> \r<br /> screenshots of both options and data file is attached.\r<br /> please check and guide us.\r<br /> \r<br /> Pradyuman Bisht-9410981842","reportDateUtc":"2022-09-06T17:53:28Z","displayDueDate":"2022-09-07T10:00:00Z","displayClient":"bo_g204 licindia","emailClient":true,"emailTech":true,"emailTechGroupLevel":false,"emailGroupManager":false,"emailCc":false,"emailBcc":false,"needsApproval":false,"ticketEditable":true,"techId":1,"levelNumber":null,"clientId":102,"flaggedByTech":false,"isPublic":true,"canEscalate":false,"bookmarkableLink":"https://d1prvrrswda01.licindia.com:8443/helpdesk/WebObjects/Helpdesk.woa/wa/TicketActions/view?ticket=1061","isDeleted":false,"notes":[{"id":17,"type":"TechNote","date":"2023-01-19T14:53:05Z","isSolution":false,"prettyUpdatedString":"1 week ago <strong>Saurabh Kumar<\/strong> said","mobileNoteText":" <a href=\"mailto:bo_g204&#64;licindia.com\" rel=\"nofollow\">bo_g204&#64;licindia.com<\/a> added a comment - 04/Jan/23 3:43 PM<br /> sir <br /> file for deposit no 125744 dt 03-01-2023 is also not uploading with option with remittance details. txt file and screenshot are attached. <br /> <br />  <a href=\"mailto:bo_g204&#64;licindia.com\" rel=\"nofollow\">bo_g204&#64;licindia.com<\/a> added a comment - 27/Dec/22 11:30 AM<br /> sir <br /> in policy no 210900100199 deposit no 125138 dt 21-12-2022 Rs 5768/- batch no 159314 is also facing same issue as above. data file and error screenshot is attached.<br /> Hoping that the issue is sorted out within some time frame because the adjustment should not be delayed only because the Program Developers delayed resolution of problem.<br /> <br />  Akshaya Kumar Sahoo1 added a comment - 23/Dec/22 12:40 PM<br /> Dear Sir,<br /> Good day to you!..<br /> We are working on the permanent fix and we suggest replacing the value without floating point as a work around for the time being.<br /> Your co-operation and patience are appreciated here.<br />  Thanks,<br /> Akshaya<br /> <br />  <a href=\"mailto:bo_g204&#64;licindia.com\" rel=\"nofollow\">bo_g204&#64;licindia.com<\/a> added a comment - 16/Dec/22 12:46 PM<br /> sir<br /> we once again put the issue before you for deposit 124769 dt 12-12-2022 Rs4326. <br />   txt file, (ii) screenshot file 124769 fails with remits details -option method, (iii) screenshot file 124769 success with option -without REMITs DETAILs  is also attached herewith today for your scrutiny.<br /> The option WITH REMITTENCE DETAILS is not working.<br /> Hoping that the issue is sorted out within some time frame because the adjustment should not be delayed only because the Program Developers delayed resolution of problem.<br />  <br /> <br />  <a href=\"mailto:bo_g204&#64;licindia.com\" rel=\"nofollow\">bo_g204&#64;licindia.com<\/a> added a comment - 14/Dec/22 12:59 PM - edited<br /> sir<br /> we are checking as suggested, will inform accordingly<br /> <br />  Tarun Kumar added a comment - 21/Oct/22 7:10 PM<br /> Plz once check for the file which is not adjusted and tell us if any problem comes while doing with adjustment.<br /> <br />  <a href=\"mailto:bo_g204&#64;licindia.com\" rel=\"nofollow\">bo_g204&#64;licindia.com<\/a> added a comment - 20/Oct/22 10:19 AM<br /> sir<br /> the deposit amount is already adjusted by us on 07-09-2022 much before your suggestion on 19-09-2022. <br /> But the real problem is that the system is not taking data in option ,&#34;with remittance details&#34; <br /> You are requested to check &amp; confirm to us whether the option, WITH REMITTANCE  DETAILS, is working for Unit  code -G204, so that the problem does not arise in further cases of adjustments.<br /> <br />  Tarun Kumar added a comment - 19/Sep/22 7:40 PM<br /> Plz correct the deposit amount in the file and then upload and try.<br /> <br /> ","isTechNote":true,"isHidden":false,"attachments":[]}],"ticketCustomFields":[],"enabledStatusTypes":[{"id":1,"type":"StatusType","statusTypeName":"Open"},{"id":2,"type":"StatusType","statusTypeName":"Pending"},{"id":3,"type":"StatusType","statusTypeName":"Closed"},{"id":4,"type":"StatusType","statusTypeName":"Cancelled"},{"id":5,"type":"StatusType","statusTypeName":"Resolved"},{"id":6,"type":"StatusType","statusTypeName":"Reopen"},{"id":7,"type":"StatusType","statusTypeName":"Hold"},{"id":8,"type":"StatusType","statusTypeName":"WIP"},{"id":9,"type":"StatusType","statusTypeName":"Under Progress"}],"attachments":[{"id":63,"type":"TicketAttachment","fileName":"PMJ_NEW_125744.txt","sizeString":"2.87 KB","uploadDateUtc":"2023-01-19T09:26:57Z"},{"id":67,"type":"TicketAttachment","fileName":"PMJ_NEW_125629.txt","sizeString":"8.74 KB","uploadDateUtc":"2023-01-19T09:26:43Z"},{"id":66,"type":"TicketAttachment","fileName":"PMJ_NEW_125138.txt","sizeString":"8.12 KB","uploadDateUtc":"2023-01-19T09:26:29Z"},{"id":61,"type":"TicketAttachment","fileName":"PMJ_NEW_124769.txt","sizeString":"6.27 KB","uploadDateUtc":"2023-01-19T09:26:15Z"},{"id":59,"type":"TicketAttachment","fileName":"PMJ_NEW_120332-1.txt","sizeString":"5.74 KB","uploadDateUtc":"2023-01-19T09:26:01Z"},{"id":60,"type":"TicketAttachment","fileName":"PMJ_NEW_120332.txt","sizeString":"5.74 KB","uploadDateUtc":"2023-01-19T09:25:46Z"},{"id":58,"type":"TicketAttachment","fileName":"125744 error.JPG","sizeString":"101.75 KB","uploadDateUtc":"2023-01-19T09:25:35Z"},{"id":68,"type":"TicketAttachment","fileName":"125138 error.JPG","sizeString":"106.47 KB","uploadDateUtc":"2023-01-19T09:25:08Z"},{"id":64,"type":"TicketAttachment","fileName":"124769 success without REMITs DETAILS.JPG","sizeString":"143.66 KB","uploadDateUtc":"2023-01-19T09:24:57Z"},{"id":62,"type":"TicketAttachment","fileName":"124769 fails with remits details.JPG","sizeString":"110.52 KB","uploadDateUtc":"2023-01-19T09:24:44Z"},{"id":69,"type":"TicketAttachment","fileName":"120332 without remit. details.PNG","sizeString":"116.62 KB","uploadDateUtc":"2023-01-19T09:24:28Z"},{"id":65,"type":"TicketAttachment","fileName":"120332 error with remit. details.PNG","sizeString":"113.02 KB","uploadDateUtc":"2023-01-19T09:24:16Z"}]}

Using below command we are able to capture all the details with respect to ticket ID 1061. Output attached.

curl --noproxy "hostname" -k "https://hostname.com:8443/helpdesk/WebObjects/Helpdesk.woa/ra/Tickets/1061?username=admin&apiKey=value"

When we are trying to create a ticket using API we are getting below error. We are using exactly same API credentials for both operations. Sample createticket.json is attached.

curl --noproxy "hostname" -k -X POST -d @createticket.json https://hostname:8443/helpdesk/WebObjects/Helpdesk.woa/ra/Tickets?username=admin&apiKey=value{"type":"Ticket","id":4,"subject":"Need more memory","statusTypeId":1,"locationId":1,"lastUpdated":"2023-01-23T14:51:11Z"}

Authentication required.

Authentication required.

<!doctype html><html lang="en"><head><title>HTTP Status 400 – Bad Request</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 400 – Bad Request</h1><hr class="line" /><p><b>Type</b> Exception Report</p><p><b>Message</b> Invalid character found in the HTTP protocol [more ]</p><p><b>Description</b> The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).</p><p><b>Exception</b></p><pre>java.lang.IllegalArgumentException: Invalid character found in the HTTP protocol [more ]

        org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:570)

        org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:271)

        org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)

        org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890)

        org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1789)

        org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

        org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)

        org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)

        org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

        java.base&#47;java.lang.Thread.run(Thread.java:829)

</pre><p><b>Note</b> The full stack trace of the root cause is available in the server logs.</p><hr class="line" /><h3>Apache Tomcat</h3></body></html>Authentication required.

Authentication required.

Authentication required.