2016-09-09 10 views
2

otrsシステムでチケットを作成しようとしていますが、301:Moved Permanetlyが返されます。私はOTRS 5 Freeを使用しています。汎用インタフェース経由でotrsチケットを作成できません

マイリクエストURI:https://some.domain.com/nph-genericinterface.pl/Webservice/GenericTicketREST/Ticket

とメッセージ本文:

{ 
    "UserLogin": "mbar", 

    "Password": "*****", 

    "Ticket" : 
    { 
    "Title": "raz dwa trzy", 
    "Queue": "Raw", 
    "Lock": "unlock", 
    "Type": "Unclassified", 
    "State": "new", 
    "Priority": "3 normal", 
    "Owner": "mbar", 
    "CustomerUser": "mbar" 
    }, 

    "Article": 
    { 
    "Subject" : "jakiś temat", 
    "Body" : "test test tes test", 
    "ContentType": "text/plain; charset=utf8"  

    } 
} 

は、これは私のサービスの設定です:

--- 
Debugger: 
    DebugThreshold: debug 
    TestMode: '0' 
Description: Ticket Connector REST Sample 
FrameworkVersion: 4.x git 
Provider: 
    Operation: 
    SessionCreate: 
     Description: Creates a Session 
     MappingInbound: {} 
     MappingOutbound: {} 
     Type: Session::SessionCreate 
    TicketCreate: 
     Description: Creates a Ticket 
     MappingInbound: {} 
     MappingOutbound: {} 
     Type: Ticket::TicketCreate 
    TicketGet: 
     Description: Retrieves Ticket data 
     MappingInbound: {} 
     MappingOutbound: {} 
     Type: Ticket::TicketGet 
    TicketSearch: 
     Description: Search for Tickets 
     MappingInbound: {} 
     MappingOutbound: {} 
     Type: Ticket::TicketSearch 
    TicketUpdate: 
     Description: Updates a Ticket 
     MappingInbound: {} 
     MappingOutbound: {} 
     Type: Ticket::TicketUpdate 
    Transport: 
    Config: 
     KeepAlive: '' 
     MaxLength: '100000000' 
     RouteOperationMapping: 
     SessionCreate: 
      RequestMethod: 
      - POST 
      Route: /Session 
     TicketCreate: 
      RequestMethod: 
      - POST 
      Route: /Ticket 
     TicketGet: 
      RequestMethod: 
      - GET 
      Route: /Ticket/:TicketID 
     TicketSearch: 
      RequestMethod: 
      - GET 
      Route: /Ticket 
     TicketUpdate: 
      RequestMethod: 
      - PATCH 
      Route: /Ticket/:TicketID 
    Type: HTTP::REST 
RemoteSystem: '' 
Requester: 
    Transport: 
    Type: '' 

は、あなたは私がこの問題を解決するのに役立つことはできますか?

答えて

1

HTTP 301エラーが発生した場合は、Webサーバーを正しく構成しておらず、サーバーがある場所にリダイレクトしている可能性があります。 OTRSは通常、200 OKまたは500 Internal server errorで応答します。

Apacheログを確認して、そこで何が起こっているのかを確認してください。

私はこのようcurlでチケットを作成することができます:create_ticket.jsonはこのようなものになるだろう

curl "http://example.com/otrs/nph-genericinterface.pl/Webservice/GenericTicketConnectorREST/Ticket?UserLogin=login&Password=sekret" \ 
-H "Content-Type: application/json" \ 
-d @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" 
    } 
} 
関連する問題