How to find the serviceDeskId in the agent view


I’m currently adding a web-item in the left menu in the agent view of JSD and a web-panel to display content when the menu item is clicked. To populate the content of web-panel content I need the serviceDeskId to make a request to our addon server. Therefore I’m wondering if there is any easy way to get the serviceDeskId from the agent view?

There aren’t any global service desk context params that I’m aware of (I can be wrong here though).

The easiest way is to pass in the context variable in the web-item. Then in either the javascript for the front end of the web-panel page or in the backend that generates the panel, call the service desk api and get all of the service desks and then find the one that matches the has more details about this.

It’s a bit clunky though.


1 Like

Thanks! That solved it for me. I also discovered (in the documentation) that you can actually call /rest/servicedeskapi/servicedesk/{projectKey} to avoid fetching the entire list of service desks.

1 Like

There aren’t any global service desk context params that I’m aware of

Actually, there’s 3:
servicedesk.req* uestId

  • servicedesk.requestTypeId
  • servicedesk.serviceDeskId

If they’re not available in the agent view, it’s a bug. Of course they’d only be available in the context of a JSD project/issue.

It would be awesome if those could be available globally though. :slight_smile:

hey @daniel sorry for the slow reply, but - what do you mean? Where do these 3 context params no work specifically ?