Package enomalism2 :: Package modules :: Package usercontrol :: Module rest
[hide private]

Module rest

REST controllers for Enomalism users and groups.


Requires:

Status: Stable

Functions [hide private]
Dictionary
rest_user(self, *args, **kw)
Create a new user.
Dictionary
rest_user_list(self, *args, **kw)
Return a list of Enomalism users.
Dictionary
rest_user_UUID(self, *args, **kw)
Retrieves or updates a user.
Dictionary
rest_group(self, *args, **kw)
Create a new group.
Dictionary
rest_group_list(self, *args, **kw)
Return a list of Enomalism groups.
Dictionary
rest_group_UUID(self, *args, **kw)
Retrieves or updates a group.
Function Details [hide private]

rest_user(self, *args, **kw)

 

Create a new user.

URL Format:

   /rest/user/
Parameters:
  • self (enomalism2.REST.rest) - The method class.
  • user_name (String) - The user_name attribute.
  • password (String) - The password attribute.
  • display_name (String) - The display_name attribute.
  • email (String) - The email attribute.
  • data (String) - The data attribute.
Returns: Dictionary
A dictionary containing the result of the action.
Decorators:
  • @register_extension("user", allowed_methods= ['PUT'])
Raises:
  • None - No exceptions are raised by this method.

Status: Stable

rest_user_list(self, *args, **kw)

 

Return a list of Enomalism users.

URL Format:

   /rest/user/list/
Parameters:
Returns: Dictionary
A dictionary containing a list of users.
Decorators:
  • @register_extension("user/list", allowed_methods= ['GET'])
Raises:
  • None - No exceptions are raised by this method.

Status: Stable

rest_user_UUID(self, *args, **kw)

 

Retrieves or updates a user. If the current user does not have read permission on the usercontrol.rest module, a HTTP exception is raised. Similarily, if the current user is performing a delete action and does not have delete permission, the same exception is raised.

URL Format:

   /rest/user/<UUID>/
Parameters:
Returns: Dictionary
A dictionary containing the result of the action.
Decorators:
  • @register_extension("user/*", allowed_methods= ['POST', 'GET', 'DELETE'])

rest_group(self, *args, **kw)

 

Create a new group.

URL Format:

   /rest/group/
Parameters:
  • self (enomalism2.REST.rest) - The method class.
  • display_name (String) - The display_name attribute.
  • group_name (String) - The group_name attribute.
Returns: Dictionary
A dictionary containing the result of the action.
Decorators:
  • @register_extension("group", allowed_methods= ['PUT'])
Raises:
  • None - No exceptions are raised by this method.

Status: Stable

rest_group_list(self, *args, **kw)

 

Return a list of Enomalism groups. If the current user does not have read permission on the usercontrol.rest module, a HTTP exception is raised.

URL Format:

   /rest/group/list/
Parameters:
Returns: Dictionary
A dictionary containing all Enomalism groups.
Decorators:
  • @register_extension("group/list", allowed_methods= ['GET'])
Raises:
  • cherrypy.HTTPError - Raised when permission is denied.

rest_group_UUID(self, *args, **kw)

 

Retrieves or updates a group. If the current user does not have read permission on the usercontrol.rest module, a HTTP exception is raised. Similarily, if the current user is performing a delete action and does not have delete permission, the same exception is raised.

URL Format:

   /rest/group/<UUID>/
Parameters:
Returns: Dictionary
A dictionary containing the result of the action.
Decorators:
  • @register_extension("group/*", allowed_methods= ['POST', 'GET', 'DELETE'])
Raises:
  • cherrypy.HTTPError - Raised when permission is denied.