cancel
Showing results for 
Search instead for 
Did you mean: 
jklmnop
Level 7

Using the REST API to create/update rooms/locations/departments and other things.

I've read the documentation (http://www.webhelpdesk.com/api/) and I cannot figure out how to do a few things with the WHD Rest API. Perhaps these things are not possible through the API.

  1. How can I Create/Update Rooms, Locations, and Departments through the API? I've tried following the pattern used to Create/Update Clients and Tickets to no avail. Instead it returns a 201 (created?!) and undefined with the application/json content-type.
  2. How can I use qualifiers with to get back more useful results of Rooms/Locations? For example, I want a list of every room from a specific location and I only have the location name, not the location ID.
  3. How can I update Techs when I update their Client records over the API? Name changes are always cause a mismatch.
  4. Is there any way to see the changes made over the API with a refresh instead of having to logout and log back in? The page caching can be really annoying.

I'm trying to integrate WHD with the system we use to manage our people, locations, departments, etc.. When a user is updated in our system we want to update them in WHD too. Sometimes new rooms aren't in the WHD system. Setting regular text fields was pretty easy, but setting the Rooms/Locations/Departments on a Client update has been incredibly difficult.

Does anyone have any experience with advanced usage of the API? I've been searching Google (and this forum) for help for a few days with no luck.

Tags (3)
0 Kudos
4 Replies
typhoon87
Level 14

Re: Using the REST API to create/update rooms/locations/departments and other things.

I do not have answers to all of your questions but the there are improvements to the REST API that will be included in V12.1 which is in RC2 candidate now. Specifically mentioned were API commands for Assets and Locations Please see the 12.1 announcement here Web Help Desk 12.1 Release Candidate Now Available!

jklmnop
Level 7

Re: Using the REST API to create/update rooms/locations/departments and other things.

Unfortunately, I do not believe this v12.1 will have all of the functionality I'll need. Additionally, I do not know when it will go Gold Master and I cannot use an RC anyway.

In thinking of ways around this issue, I came up with the idea of creating/updating the new Rooms/Departments/Locations/etc. by interfacing directly with the WHD DB schema.

typhoon87, Do you think that doing an INSERT/UPDATE to, say, the ROOM table would have any adverse effects to the system? I've noticed there aren't any triggers on the ROOM table. I just don't know what else the WHD system does when adding a new room through the web UI. Could altering those tables through custom code be a viable solution or would that be really bad?

0 Kudos
Highlighted
typhoon87
Level 14

Re: Using the REST API to create/update rooms/locations/departments and other things.

Hello jklmnop

Ironically at 6am this morning it was announced that 12.1 has gone GA. (Announcing General Availability of Web Help Desk 12.1.0) so hopefully they should upgrade the API doc page very soon and you can see what has been added.

I would probably try to avoid directly touching the DB as just in case something goes haywire. I don't thing there are other triggers when adding a room other than ensuring its in the correct building and there are no duplicates. For some reason the software does not check to see if a room number already exists when its created. I opened a ticket about this a few months back and they tech seemed surprised that there was no error checking or at least a warning.

jklmnop
Level 7

Re: Using the REST API to create/update rooms/locations/departments and other things.

Well, we updated to 12.1 but we're probably going to manually query the WHD tables to get the rooms/department info. While we can't add a new room this way (which sucks), rooms won't change all that often after an initial CSV import. We'll just have to make it work until more features are added to the REST API.

Thanks for your help, typhoon87!

0 Kudos