HTTP::REST Error while determine Operation for request URI '/istek'.

Moderator: crythias

Post Reply
oyazar
Znuny newbie
Posts: 3
Joined: 30 Oct 2025, 07:49
Znuny Version: 6.1
Real Name: Omer Yazar
Company: ETA Teknoloji
Location: Istanbul, Turkey

HTTP::REST Error while determine Operation for request URI '/istek'.

Post by oyazar »

Hi Everyone,

I am a new user trying to create a web service for ticket creation. Here's my config:
---
Debugger:
DebugThreshold: debug
TestMode: '0'
Description: ''
FrameworkVersion: 6.1.2
Provider:
Operation:
istek:
Description: istek yarat
IncludeTicketData: '0'
MappingInbound:
Type: Simple
MappingOutbound:
Type: Simple
Type: Ticket::TicketCreate
Transport:
Config:
AdditionalHeaders: ~
KeepAlive: '1'
MaxLength: '10000'
RouteOperationMapping:
istek:
ParserBackend: JSON
RequestMethod:
- POST
Route: istek2
Type: HTTP::REST
RemoteSystem: ''
Requester:
Transport:
Type: ''


I try to post to these URLs: myhostname/otrs/nph-genericinterface.pl/Webservice/servis/istek,
myhostname/otrs/nph-genericinterface.pl/Webservice/servis/istek2

Here's my JSON payload:
{
"UserLogin": "*****",
"Password": ""*****",
"TicketID": 22,
"Ticket": {
"Title": "API Testticket",
"QueueID": 5,
"State": "yeni",
"PriorityID": 3,
"Type": "Unclassified",
"CustomerUser": "oyazar",
"ServiceID": 1
}
}

I keep getting HTTP::REST Error while determine Operation for request URI '/istek' error, what am I doing wrong? I am running Znuny 6.1

Regards,
Omer Yazar
Omer Yazar
OTRS Community Edition
oyazar
Znuny newbie
Posts: 3
Joined: 30 Oct 2025, 07:49
Znuny Version: 6.1
Real Name: Omer Yazar
Company: ETA Teknoloji
Location: Istanbul, Turkey

Re: HTTP::REST Error while determine Operation for request URI '/istek'.

Post by oyazar »

Hi again,

I modified the web service config a little bit and added a trailing "/" to the Route name and eliminated the previouys error. However, I'm now stuck with a payload issue:
When I do:
curl -v -X POST "http://mydomain.com/otrs/nph-genericint ... ket/create" -H "Content-Type: application/json" -d '{
"UserLogin": "*****",
"Password": "*****",
"Ticket": {
"TicketID": 22,"Title": "API Testticket",
"QueueID": 5,
"State": "yeni",
"PriorityID": 3,
"Type": "Unclassified",
"CustomerUser": "oyazar",
"ServiceID": 1
},
"Article": {
"Subject": "API Testticket",
"Body": "This is my first ticket created through an API.",
"ContentType": "text/plain; charset=utf8"
}
}'

I get this error:
{"Error":{"ErrorCode":"TicketCreate.InvalidParameter","ErrorMessage":"TicketCreate: Ticket->ServiceID or Ticket->Service parameter is invalid!"}}

I verified my input against my database and cannot figure out what I miss. Anybody can help?

Thanks in advance
Omer Yazar
OTRS Community Edition
oyazar
Znuny newbie
Posts: 3
Joined: 30 Oct 2025, 07:49
Znuny Version: 6.1
Real Name: Omer Yazar
Company: ETA Teknoloji
Location: Istanbul, Turkey

Re: HTTP::REST Error while determine Operation for request URI '/istek'.

Post by oyazar »

Hi again,

I got it working with this payload:
{
"UserLogin": "*****",
"Password": "*****",
"Ticket": {
"Queue": "Postmaster",
"StateID": "1",
"OwnerID": "1",
"TypeID": "1",
"PriorityID": "3",
"Title": "Test",
"CustomerUser": "oyazar",
"Lock": "unlock"
},
"Article": {
"CommunicationChannel": "Internal",
"SenderType": "agent",
"Subject": "Initial Request",
"Body": "Test Body",
"From": "oyazar@etamuhendislik.com.tr",
"To": "user@znuny.exapmle.com",
"VisibleForCustomer": "0",
"ContentType": "text/plain; charset=utf8"
}
}

Final version of the web service:
---
Debugger:
DebugThreshold: debug
TestMode: '0'
Description: ''
FrameworkVersion: 6.1.2
Provider:
Operation:
istek:
Description: istek yarat
IncludeTicketData: '0'
MappingInbound:
Type: Simple
MappingOutbound:
Type: Simple
Type: Ticket::TicketCreate
Transport:
Config:
AdditionalHeaders: ~
KeepAlive: ''
MaxLength: '10000'
RouteOperationMapping:
istek:
ParserBackend: JSON
RequestMethod:
- POST
Route: /ticket/create
Type: HTTP::REST
RemoteSystem: ''
Requester:
Transport:
Type: ''
Omer Yazar
OTRS Community Edition
Post Reply