i have difficulties implement rest service ticket creation otrs, integrate ticketget , ticketupdate services system, can't integrate ticketcreate service.
yml file:
--- debugger: debugthreshold: debug testmode: '0' description: used me frameworkversion: 4.0.8 provider: operation: ticketcreate: description: ticketcreate mappinginbound: type: simple mappingoutbound: config: keymapdefault: mapto: '' maptype: keep valuemapdefault: mapto: '' maptype: keep type: simple type: ticket::ticketcreate ticketget: description: ticketget mappinginbound: type: simple mappingoutbound: type: simple type: ticket::ticketget ticketupdate: description: ticketupdate mappinginbound: type: simple mappingoutbound: type: simple type: ticket::ticketupdate transport: config: keepalive: '' maxlength: '20000000' routeoperationmapping: ticketcreate: requestmethod: - post route: /ticketcreate ticketget: route: /ticketget/:ticketid ticketupdate: requestmethod: - post route: /ticketupdate/:ticketid type: http::rest remotesystem: '' requester: transport: type: http::rest
request:
{ "userlogin":"web.service", "password":"********", "ticket":{ "title":"title", "queueid":"61", "lockid":"2", "typeid":"1", "serviceid":"", "slaid":"", "stateid":"63", "priorityid":"3", "customeruser":"user@email.com.br" }, "article":{ "articletypeid":"8", "sendertypeid":"1", "from":"user <user@email.com.br>", "subject":"webservice proc linner teste", "body":"teste webservice", "contenttype":"text/plain", "mimetype":"text/plain", "charset":"utf8" } }
return:
{ "error": { "errorcode":"ticketcreate.invalidparameter", "errormessage":"ticketcreate: article->contenttype invalid!" } }
what valid contenttype ?
can me?
ticket , article need objects @ same level. and, pointed out @tondrej, you're passing attributes not exist article. please find minimal data sample below:
{ "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 test" } }
Comments
Post a Comment