Sessions methods

The UI Apps SDK enables you to work with the Sessions from the Gtmhub account your UI App is installed in. For example, if you want to get some information about the session an OKR belongs to, like its start/end date, status or workflow configuration, you can use the getCurrentItem helper method in your UI App to find out which item the user is currently browsing and then get the sessions details using the session Id.

NOTE: Before you start using the SDK methods, ensure you have imported and configured the SDK first.

getSession

To get a session use the getSession method and pass the desired session Id. For example:

const sessionId = "some-test-session-id";

sdk
  .getSession(sessionId)
  .then((session) => console.log(session))