[rt-users] REST API for Assets
steve at sbsroc.com
Wed Dec 7 00:34:57 EST 2016
I also need a REST api for assets, so I decided to take a stab at
writing one myself. The files are here:
This is my first contribution to RT. To install and test, place the
files default and links into a new directory:
rm -Rf /opt/rt4/var/mason_data/obj/*; service apache2 reload
I have working asset "show", "new" and updates. It used the same format
RT/4.4.1 200 Ok
Description: The test description is here
Created: 2016-12-06 02:25:17
LastUpdated: 2016-12-07 04:05:57
HeldBy: user1 at example.com, user3 at example.com,
user2 at example.com
Contacts: user1 at example.com, user2 at example.com
Custom fields are working, links work (show only) and updates work
(mostly). I'm currently having trouble with the Contacts and HeldBy
fields not removing entries for users that are no longer on the list
when posted. I get an error from RT::Record::Role::Roles, when it's
clearly listed when I query. Even more odd, the first time I try to
remove a member, it acts without error. It's only on the second attempt
that it shows an error. This suggested that maybe it's removing
*something*, but not all. Appears to be a bug in other PMs.
If this helps someone as-is, then great! If others can contribute, I
Anyone know if our pull request should go against master when we're
Anyone willing to trust the code? LOL
On 2016-12-04 5:38 pm, Bart Bunting wrote:
> I may be able to get our company to contribute something, although I'm
> afraid it wouldn't be too much.
> We are tossing up between updating owr own existing solution or using
> RT to manage assets.
> Given the lack of an API it makes RT integration with our customer
> problematic. This is likely to push us away from RT and to just write
> our own specific implementation.
> If there is a commitment from Bestpractical to get the API implemented
> and funds were the only issue we would consider how we could help.
> Kind regards
> Josh Tackitt <tackittj at reed.edu> writes:
>> Hi Bart,
>> Unfortunately there is no REST API for Assets. I've heard rumors that
>> maybe they're working on it but pretty sure I've not seen anything
>> Is anyone out there interested in combining funds to pay for the
>> development of this much needed feature? I'm sure we could convince
>> BestPractical to roll it into 'core' so that everyone would benefit.
>> On Wed, Nov 23, 2016 at 3:26 PM, Bart Bunting
>> <bart.bunting at ursys.com.au>
>>> Is there a REST API for assets in RT?
>>> I can't find any documentation for it.
>>> Can anyone shed any light on if it exists or is in the works?
>>> Kind regards
>>> Bart Bunting - URSYS
>>> PH: 02 87452811
>>> Mbl: 0409560005
>>> RT 4.4 and RTIR training sessions, and a new workshop day!
>>> * Los Angeles - January 9-11 2017
>> Reed College
>> Computer Hardware Services
>> ETC 114
More information about the rt-users