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
Parameter | Description/Values |
---|---|
username | The unique name specified for the HMP user.
|
permissionId | The access permission to assign to this user:
|
sessionId | The ID of a HMP session. |
Result
Success
OK |
Error
Error | Description |
---|---|
ERROR|010003|Expected 3 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: | 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 OK |