Class: role
A set of permissions associated with a subject
Fields for class: role
Field | Type | Qualifier | Description |
---|---|---|---|
is_internal |
bool |
RO/runtime | Indicates whether the role is only to be assigned internally by xapi, or can be used by clients |
name_description |
string |
RO/constructor | what this role is for |
name_label |
string |
RO/constructor | a short user-friendly name for the role |
subroles |
role ref set |
RO/constructor | a list of pointers to other roles or permissions |
uuid |
string |
RO/runtime | Unique identifier/object reference |
RPCs associated with class: role
RPC name: get_all
Overview:
Return a list of all the roles known to the system.
Signature:
role ref set get_all (session ref session_ref)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
Minimum Role: read-only
Return Type: role ref set
references to all objects
RPC name: get_all_records
Overview:
Return a map of role references to role records for all roles known to the system.
Signature:
(role ref -> role record) map get_all_records (session ref session_ref)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
Minimum Role: read-only
Return Type: (role ref -> role record) map
records of all objects
RPC name: get_by_name_label
Overview:
Get all the role instances with the given label.
Signature:
role ref set get_by_name_label (session ref session_ref, string label)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
string |
label |
label of object to return |
Minimum Role: read-only
Return Type: role ref set
references to objects with matching names
RPC name: get_by_permission
Overview:
This call returns a list of roles given a permission
Signature:
role ref set get_by_permission (session ref session_ref, role ref permission)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
role ref |
permission |
a reference to a permission |
Minimum Role: read-only
Return Type: role ref set
a list of references to roles
RPC name: get_by_permission_name_label
Overview:
This call returns a list of roles given a permission name
Signature:
role ref set get_by_permission_name_label (session ref session_ref, string label)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
string |
label |
The short friendly name of the role |
Minimum Role: read-only
Return Type: role ref set
a list of references to roles
RPC name: get_by_uuid
Overview:
Get a reference to the role instance with the specified UUID.
Signature:
role ref get_by_uuid (session ref session_ref, string uuid)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
string |
uuid |
UUID of object to return |
Minimum Role: read-only
Return Type: role ref
reference to the object
RPC name: get_is_internal
Overview:
Get the is_internal field of the given role.
Signature:
bool get_is_internal (session ref session_ref, role ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
role ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: bool
value of the field
RPC name: get_name_description
Overview:
Get the name/description field of the given role.
Signature:
string get_name_description (session ref session_ref, role ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
role ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: string
value of the field
RPC name: get_name_label
Overview:
Get the name/label field of the given role.
Signature:
string get_name_label (session ref session_ref, role ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
role ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: string
value of the field
RPC name: get_permissions
Overview:
This call returns a list of permissions given a role
Signature:
role ref set get_permissions (session ref session_ref, role ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
role ref |
self |
a reference to a role |
Minimum Role: read-only
Return Type: role ref set
a list of permissions
RPC name: get_permissions_name_label
Overview:
This call returns a list of permission names given a role
Signature:
string set get_permissions_name_label (session ref session_ref, role ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
role ref |
self |
a reference to a role |
Minimum Role: read-only
Return Type: string set
a list of permission names
RPC name: get_record
Overview:
Get a record containing the current state of the given role.
Signature:
role record get_record (session ref session_ref, role ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
role ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: role record
all fields from the object
RPC name: get_subroles
Overview:
Get the subroles field of the given role.
Signature:
role ref set get_subroles (session ref session_ref, role ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
role ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: role ref set
value of the field
RPC name: get_uuid
Overview:
Get the uuid field of the given role.
Signature:
string get_uuid (session ref session_ref, role ref self)
<!--NeedCopy-->
Arguments:
Type | Name | Description |
---|---|---|
session ref |
session_ref |
Reference to a valid session |
role ref |
self |
reference to the object |
Minimum Role: read-only
Return Type: string
value of the field
In this article
- Fields for class: role
-
RPCs associated with class: role
- RPC name: get_all
- RPC name: get_all_records
- RPC name: get_by_name_label
- RPC name: get_by_permission
- RPC name: get_by_permission_name_label
- RPC name: get_by_uuid
- RPC name: get_is_internal
- RPC name: get_name_description
- RPC name: get_name_label
- RPC name: get_permissions
- RPC name: get_permissions_name_label
- RPC name: get_record
- RPC name: get_subroles
- RPC name: get_uuid