Hi ,
Can anyone help me to create otrs 6 api to invoke in php application. I want to use ticket create api in my existing application which is developed in php/Laravel but i dont see any api developed for otrs 6 to create ticket. any help will be highly appreciated .
Thanks,
Vivek.
want to implement ticket create api for otrs 6
-
- Znuny newbie
- Posts: 3
- Joined: 22 Apr 2020, 07:28
- Znuny Version: 6.0
- Real Name: Vivek
- Company: Medbay Pvt Ltd
-
- Administrator
- Posts: 3965
- Joined: 18 Dec 2007, 12:23
- Znuny Version: Znuny and Znuny LTS
- Real Name: Roy Kaldung
- Company: Znuny
- Contact:
Re: want to implement ticket create api for otrs 6
Hi,
Here's an example for OTRS 5 (in 6 the parameter for the article changed a little bit): https://github.com/rkaldung/otrs-gi-rest-php
Not an API but a start.
- Roy
Here's an example for OTRS 5 (in 6 the parameter for the article changed a little bit): https://github.com/rkaldung/otrs-gi-rest-php
Not an API but a start.
- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO
Use a test system - always.
Do you need professional services? Check out https://www.znuny.com/
Do you want to contribute or want to know where it goes ?
Use a test system - always.
Do you need professional services? Check out https://www.znuny.com/
Do you want to contribute or want to know where it goes ?
-
- Znuny newbie
- Posts: 3
- Joined: 22 Apr 2020, 07:28
- Znuny Version: 6.0
- Real Name: Vivek
- Company: Medbay Pvt Ltd
Re: want to implement ticket create api for otrs 6
Getting below error when calling my endpoint:
Unirest\Response Object
(
Unirest\Response Object
(
Code: Select all
=> 500
[raw_body] => HTTP::REST Error while determine Operation for request URI '/Testcreate/Session'.
[body] => HTTP::REST Error while determine Operation for request URI '/Testcreate/Session'.
[headers] => Array
(
[0] => HTTP/1.1 500 Internal Server Error
[Date] => Wed, 22 Apr 2020 12:45:20 GMT
[Content-Type] => text/plain; charset=UTF-8
[Content-Length] => 81
[Connection] => keep-alive
[Set-Cookie] => __cfduid=de351a235a09f9a2a5722f0d3cca146e21587559520; expires=Fri, 22-May-20 12:45:20 GMT; path=/; domain=.letsmd.com; HttpOnly; SameSite=Lax
[CF-Cache-Status] => DYNAMIC
[Expect-CT] => max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
[Server] => cloudflare
[CF-RAY] => 587f70fa3839e27d-NAG
[cf-request-id] => 024384f05e0000e27d3d00e200000001
)
)
-
- Administrator
- Posts: 3965
- Joined: 18 Dec 2007, 12:23
- Znuny Version: Znuny and Znuny LTS
- Real Name: Roy Kaldung
- Company: Znuny
- Contact:
Re: want to implement ticket create api for otrs 6
Hi,
The secret on an internal server error is, that details are in your logfiles...
- Roy
The secret on an internal server error is, that details are in your logfiles...
- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO
Use a test system - always.
Do you need professional services? Check out https://www.znuny.com/
Do you want to contribute or want to know where it goes ?
Use a test system - always.
Do you need professional services? Check out https://www.znuny.com/
Do you want to contribute or want to know where it goes ?
-
- Znuny newbie
- Posts: 3
- Joined: 22 Apr 2020, 07:28
- Znuny Version: 6.0
- Real Name: Vivek
- Company: Medbay Pvt Ltd
Re: want to implement ticket create api for otrs 6
Hi Mr Roy,
I am using admin userid and password for Authentication on /otrs/nph-genericinterface.pl/Webservice/GenericTicketConnectorREST . But getting below error. So do i need to create different user or do some settings for authentication.
Session is being created successfully but for ticket create it is showing below error. Can you help me on this ?
OTRS Version 6.0
Unirest\Response Object
(
I am using admin userid and password for Authentication on /otrs/nph-genericinterface.pl/Webservice/GenericTicketConnectorREST . But getting below error. So do i need to create different user or do some settings for authentication.
Session is being created successfully but for ticket create it is showing below error. Can you help me on this ?
OTRS Version 6.0
Unirest\Response Object
(
Code: Select all
=> 200
[raw_body] => {"Error":{"ErrorMessage":"TicketCreate: User could not be authenticated!","ErrorCode":"TicketCreate.AuthFail"}}
[body] => stdClass Object
(
[Error] => stdClass Object
(
[ErrorMessage] => TicketCreate: User could not be authenticated!
[ErrorCode] => TicketCreate.AuthFail
)
)
[headers] => Array
(
[0] => HTTP/1.1 200 OK
[Date] => Thu, 23 Apr 2020 12:48:31 GMT
[Content-Type] => application/json; charset=UTF-8
[Transfer-Encoding] => chunked
[Connection] => keep-alive
[Set-Cookie] => __cfduid=d7626ecaca87aefbebda62213f06c691a1587646111; expires=Sat, 23-May-20 12:48:31 GMT; path=/; domain=.letsmd.com; HttpOnly; SameSite=Lax
[CF-Cache-Status] => DYNAMIC
[Expect-CT] => max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
[Server] => cloudflare
[CF-RAY] => 5887b3058f33e2e1-NAG
[Content-Encoding] => gzip
[cf-request-id] => 0248ae37740000e2e158b6e200000001
)
)