edit request using rest api
edit request using rest api
Hi all,
I'm not practice about REST API, so I need some help.
I'm trying to edit a request using http post method, but I don't know what I'm doing wrong. I created a simple test html form to do this:
<html>
<head>
<title>test</title>
</head>
<body>
<form name="test" action="http://localhost:8080/sdpapi/request/5" method="post">
<input type="hidden" name="TECHNICIAN_KEY" value="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx">
<input type="hidden" name="OPERATION_NAME" value="EDIT_REQUEST">
<input type="hidden" name="INPUT_DATA" value="<Operation><Details><status>Resolved</status></Details></Operation>">
<input type="submit" name="SEND_DATA" value="SEND DATA">
</form>
</body>
</html>
The login works, but I receive this response:
<operation
name
="
POST
"
>
<result>
<status>
Failed
</status>
<message>
Operation POST is not supported.
</message>
</result>
</operation>
If I sent as a "GET attribute" I receive this response:
<operation
name
="
GET
"
>
<result>
<status>
Success
</status>
<message>
Request updated successfully
</message>
</result>
<details>
.....
</details>
Which is the correct way to edit a request?
Thanks in advance
Topic Participants
ServiceDesk Plus