Display new tickets using soap api in PHP script

Moderator: crythias

Locked
szn0007
Znuny newbie
Posts: 28
Joined: 10 Jul 2016, 08:59
Znuny Version: 3.1.12
Real Name: Sujan Shrestha
Company: Classictech

Display new tickets using soap api in PHP script

Post by szn0007 »

Can anyone tell me how to display all the new tickets similar to otrs dashboard using soap api in php? I tried calling TicketGet() function, but it returns only one ticket result.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Display new tickets using soap api in PHP script

Post by jojo »

you have to run first a TicketSearch and afterwrds the the TicketGet for each found ticket
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
szn0007
Znuny newbie
Posts: 28
Joined: 10 Jul 2016, 08:59
Znuny Version: 3.1.12
Real Name: Sujan Shrestha
Company: Classictech

Re: Display new tickets using soap api in PHP script

Post by szn0007 »

@jojo ok thank you. I will try
szn0007
Znuny newbie
Posts: 28
Joined: 10 Jul 2016, 08:59
Znuny Version: 3.1.12
Real Name: Sujan Shrestha
Company: Classictech

Re: Display new tickets using soap api in PHP script

Post by szn0007 »

@jojo I tried but i am not getting the tickets. i want to display all the new ticket list. Can you please provide me some more help.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Display new tickets using soap api in PHP script

Post by jojo »

please describe what you exactly did, what happened, what result did you expect?
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
szn0007
Znuny newbie
Posts: 28
Joined: 10 Jul 2016, 08:59
Znuny Version: 3.1.12
Real Name: Sujan Shrestha
Company: Classictech

Re: Display new tickets using soap api in PHP script

Post by szn0007 »

@jojo I used TicketSearch first then foreach ticket i used TicketGet to get all the ticket data. But i want to show the New ticket or Open Ticket list just like in dashboard of OTRS.
szn0007
Znuny newbie
Posts: 28
Joined: 10 Jul 2016, 08:59
Znuny Version: 3.1.12
Real Name: Sujan Shrestha
Company: Classictech

Re: Display new tickets using soap api in PHP script

Post by szn0007 »

jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Display new tickets using soap api in PHP script

Post by jojo »

it seems that you are using the old style rpc.pl ant not the Generic Interface via SOAP or REST. What URL are you using, what is your OTRS version?
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
szn0007
Znuny newbie
Posts: 28
Joined: 10 Jul 2016, 08:59
Znuny Version: 3.1.12
Real Name: Sujan Shrestha
Company: Classictech

Re: Display new tickets using soap api in PHP script

Post by szn0007 »

My OTRS Version is 3.1.12. My url is https://otrs.classic.com.np/otrs/rpc.pl . I am really stuck.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Display new tickets using soap api in PHP script

Post by jojo »

quite old and unsupported version, old interface.

The rpc.pl uses the full API (doc.otrs.org), the new interface has another level of abstraction
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
szn0007
Znuny newbie
Posts: 28
Joined: 10 Jul 2016, 08:59
Znuny Version: 3.1.12
Real Name: Sujan Shrestha
Company: Classictech

Re: Display new tickets using soap api in PHP script

Post by szn0007 »

If i update to version 5 . How can i achieve this??
szn0007
Znuny newbie
Posts: 28
Joined: 10 Jul 2016, 08:59
Znuny Version: 3.1.12
Real Name: Sujan Shrestha
Company: Classictech

Re: Display new tickets using soap api in PHP script

Post by szn0007 »

Is there any custom query to display recent tickets?
Locked