REST 'Session' information

When using client DLLs for development of external tools, I could make use of the Session object to get current UserID, EmployeeID, among many other things. In some cases these pieces of information are required as parameters in a method call.

From what I can tell, there is no ‘Session’ when using REST to perform these operations. I have found that I can get the UserID from the ContextHeader in a response, but how would I get at some of the other pieces of info, such as EmployeeID?

Thanks

Ice.Lib.SessionMod is the server equivalent.

NOTE - A huge part of REST is doing things ‘Sessionless’. Meaning the client tells the server what the session is on each call instead of the ‘saga based’ session approach historically used.

I’ll be curious what you need and your scenario. :slight_smile:

2 Likes

Hi Bart,
My need at the moment is setting the EmpId field on a MoveRequestRow as the EmployeeID of the current user. In my current code, I use Session.EmployeeID.

Looks like Ice.Lib.SessionModSvc will get me what I need. GetCurrentValues method specifically. Since it isn’t listed in the api/help list, I didn’t realize it was available.

Thanks very much!

Understood. All the custom methods are there. The OData ones are only supported on ‘Full’ BOs. Our self help search page to swagger was only emitting endpoints with OData AND custom methods so oops on the self help.

Fixed in vNext™