Skip to main content

Share a Session with a User

This command sets the access permission (either WATCH, EDIT, RECORD, OWN, or custom permission ID) of the specified session with the specified user.

Authorizations: All

Request

shareSessionWithUser username permissionId sessionId

Parameters

ParameterDescription/Values

username

The unique name specified for the HMP user.

username is case-insensitive.

permissionId

The access permission to assign to this user:

  • WATCH: View this session
  • EDIT: View and edit this session.
  • RECORD: View and record this session.
  • OWN: All capabilities, including deleting this session.
  • <uuid> of admin-defined share permission.

sessionId

The ID of a HMP session.

Result

Success

OK

Error

ErrorDescription
ERROR|010003|Expected 3 parameter(s). 
Got Y parameter(s)
Calling shareSessionWithUser requires 3 parameters.
ERROR|010001|'Y' is not a UUID
The sessionId provided must be a UUID.
ERROR|010001|Permission must be one of: 
WATCH, EDIT, RECORD, OWN
The 'permission' passed in was not one of the expected values.
ERROR|070008|Error searching for a user
An internal error occurred while searching for user 'username'.
ERROR|040004|User not found
The user with UUID 'username' was not found.
ERROR|060001|User has no roles assigned

Make sure a role is assigned to the user or to at least one of the user's groups.

ERROR|040006|Session not found
The session with UUID 'sessionId' was not found.
ERROR|030003|Cannot share
User is not allowed to share to this permission ID. Ex.: User has the WATCH permission, but is trying to share to the OWN level.

Examples

This example uses a default HMP access permission:

shareSessionWithUser viewer EDIT 71edd346-2cf0-4c62-b3d3-9d457b287394 
OK

This example uses a custom access permission.

shareSessionWithUser InfoDev 12b0cc54-9018-42c2-9dfb-3f7707a09829 
71edd346-2cf0-4c62-b3d3-9d457b287394
OK

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.