We recommend reviewing what is submitted before posting, in case your idea has already been submitted by another community member. If it has been submitted, vote for that existing feature request (by clicking the up arrow) to increase its opportunity of being added to Cireson solutions.
For more information around feature requests in the Cireson Community click here.
How to user attribute "userId" needed for API v3 call?
I'm new to to working with the Cireson API and right off the bat I ran into problems. Long story short, I'm building a custom home screen using the V3 API inspired by @Jan_Vidar_Elven in this post. The JS files that make up my front will be hosted in the CustomSpace folder and embedded in an iframe on the front, as explained by this support ticket.
Currently as a proof of concept I'm trying to list the Service Offerings available for the current user, by asking the API for the service catalogs:
api/V3/ServiceCatalog/GetServiceCatalog?userId={userId}&isScooped={boolean}
1. What is the format for the userId? Sending my user (e.g. userId=abc123), or the user with domain (e.g. userId=domain//abc123) or the "me token" (from SQL found here) (e.g. userId=@UserId) all grant "The request is invalid".
2. We use single sing on, so Service Manager should be operating with my domain user. Is there a way to query the API and use that user as context?
3. Is there a way to get data about the current user from the API, I probably need this when creating the actual system for userID, name, email and such.
Best Answer
-
Roland_Kind Partner Advanced IT Monkey ✭✭✭Hi,
the userId can be retrieved from "session.user.Id".
I think the object contains also other useful info.
Hope this helps.
regards
Roland
5
Answers
the userId can be retrieved from "session.user.Id".
I think the object contains also other useful info.
Hope this helps.
regards
Roland