The Sessions API is useful for performance and repeatability.
Create a Session
The path for this request is:/api/session?realmName=REALM_NAME
where the query parameter realmName takes as its value the name of a realm to authenticate against.
In order to see this object within the Managed Fusion UI, it must be associated with an app. To do this, create the object using the
/apps
endpoint.Input
Parameter | Description |
---|---|
username Required | The username to use in authentication. |
password Required | The password to use in authentication. |
Output
The output will include a cookie ID in the HTTP response header. This can be saved to a file and re-used with subsequent REST API requests.Examples
Create a session against an LDAP server and store it in a file named ‘cookies’: REQUESTIn this case, we got a response because we set
curl
to include the HTTP in the output. Otherwise, we would not know for sure the session was created.View Session Details
To view session details, including the current user record, all roles directly assigned to that user, and all roles inherited from the realm by that user, use the following path for the request:/api/session
Examples
REQUESTEnd a Session
The path for this request is:/api/session
Examples
Sessions can be ended automatically in the Fusion UI by clicking Account Settings