[View:/cfs-file/__key/communityserver-discussions-components-files/38/createticket_5F00_json.txt:640:480][View:/cfs-file/__key/communityserver-discussions-components-files/38/Output.txt:640:480]
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/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.