如果您收到HTTP 301错误,这很可能意味着您没有正确配置web服务器,服务器会重定向到某个位置。OTRS通常以
200 OK
,或使用
500 Internal server error
.
检查您的apache日志,看看那里发生了什么。
我可以用创建票据
curl
这样地:
curl "http://example.com/otrs/nph-genericinterface.pl/Webservice/GenericTicketConnectorREST/Ticket?UserLogin=login&Password=sekret" \
-H "Content-Type: application/json" \
-d @create_ticket.json
哪里
create_ticket.json
应该是这样的:
{
"Ticket" : {
"Queue" : "Raw",
"Priority" : "3 normal",
"CustomerUser" : "max",
"Title" : "REST Create Test",
"State" : "open",
"Type" : "Unclassified"
},
"Article" : {
"ContentType" : "text/plain; charset=utf8",
"Subject" : "Rest Create Test",
"Body" : "This is only a test"
}
}