Rails API connector

Moderator: tto

cpuguy83
OTRS newbie
Posts: 11
Joined: 15 Sep 2011, 23:42
OTRS Version?: 3.0.10
Real Name: Brian Goff

Rails API connector

Postby cpuguy83 » 15 Sep 2011, 23:57

I have begun work on a RoR app that maps Rails RESTFul controllers to OTRS/ITSM API via the OTRS json interface.
Relies heavily on ActiveModel and I am trying to make the methods look/feel like you are using full ActiveRecord.

I have modified the supplied json.pl (I believe this is bundled as part of the iPhone package) to add in support for the ITSM modules one-by-one as I have needed.
I have posted this on GitHub.

Still a work heavy in development, however is useable for searching/creating tickets, linking objects (Tickets, CI's, etc), currently working on change management/work order system.

App is currently made to be slipped into an existing rails app or to run as a stand-alone app that communicates with your existing app via json.
I have not created any views.
git://github.com/cpuguy83/rails_otrs.git

Alexander Halle
OTRS superhero
Posts: 296
Joined: 04 Jul 2010, 17:49
OTRS Version?: 3.1.x
Real Name: Alexander Halle
Company: radprax MVZ GmbH
Location: Wuppertal
Contact:

Re: Rails API connector

Postby Alexander Halle » 16 Sep 2011, 08:45

Do you use the iPhone module as JSON interface or which one?

Thnaks for publishing your code!
Alexander Halle
System: OTRS 3.1.x, Ubuntu 10.04.x LTS, MySQL 5.1.x, Apache 2.2.x
OTRS Community Links: User Meetings, Projects

cpuguy83
OTRS newbie
Posts: 11
Joined: 15 Sep 2011, 23:42
OTRS Version?: 3.0.10
Real Name: Brian Goff

Re: Rails API connector

Postby cpuguy83 » 16 Sep 2011, 16:08

I'm not 100% sure, I believe the iPhone module provides that json.pl file in OTRS_ROOT/bin/cgi-bin/json.pl, but again I'm not sure. This is what I'm interfacing with.
I have added new code to this file and will publish it in the lib directory of the rails app for people to access.
It will have to be copied over to your OTRS cgi-bin directory for all the functionality to work (specifically ITSM stuff).

The new items I put in this file are nothing much, just including the paths to the needed perl files and adding Objects that will be accepted.

Alexander Halle
OTRS superhero
Posts: 296
Joined: 04 Jul 2010, 17:49
OTRS Version?: 3.1.x
Real Name: Alexander Halle
Company: radprax MVZ GmbH
Location: Wuppertal
Contact:

Re: Rails API connector

Postby Alexander Halle » 16 Sep 2011, 20:06

Ok, I think it's really the iPhone json.pl.

Please notice that the iPhone module uses JSON only currently, AFAIK future versions will use the new Generic Interface of OTRS 3.1. So it could be that this JSON interface won't be maintained any longer.

I don't want to discourage you, the opposite is true, I just want to make surethat you have all information so that you can plan. The JSON interface isn't officially promoted (too bad, I like it) or documented.

Thanks again for sharing code, this is the goal.

Alexander
Alexander Halle
System: OTRS 3.1.x, Ubuntu 10.04.x LTS, MySQL 5.1.x, Apache 2.2.x
OTRS Community Links: User Meetings, Projects

cpuguy83
OTRS newbie
Posts: 11
Joined: 15 Sep 2011, 23:42
OTRS Version?: 3.0.10
Real Name: Brian Goff

Re: Rails API connector

Postby cpuguy83 » 30 Sep 2011, 15:06

Added support for services, create/update methods for CI's + xml_storage stuff, several other items.

maricej
OTRS newbie
Posts: 1
Joined: 23 Nov 2012, 04:05
OTRS Version?: 3.1.11
Real Name: Marice S. Juguilon
Company: Cloudstaff

Re: Rails API connector

Postby maricej » 23 Nov 2012, 05:12

can you help me regarding this topic?
i can't connect my otrs on my application.

Thank you so much


Return to “Patches / Modules”

Who is online

Users browsing this forum: No registered users and 1 guest