Organisation

class Organisation(parent=None)

Bases: Item

This class describes an Organisation object child of Item class.

add_member(user_key)

Add an existing user in your organisation

Parameters:

user_key (string) – The user key of the user to add in the organisation

Returns:

User object

Return type:

User

create_member(email, name=None, lagoon_url=None)

Create a new member in your organisation

Parameters:
  • email (string) – The email of the new member

  • name (string, optional) – The name of the new member

  • lagoon_url (string, optional (default is api_url used during module initialisation)) – The Lagoon interface url. Useful if API url is not the same as Lagoon interface.

Returns:

User object

Return type:

User

get(organisationKey)

Get an organisation by its key

Parameters:

organisationKey (string) – The key of the organisation

Returns:

Organisation object

Return type:

Organisation

get_active_members(limit=200, offset=None)

Gets all active members of the organisation

Parameters:
  • limit (integer) – Maximum limit number of returned members

  • offset (integer) – Number of skipped members. Used for pagination

Returns:

List of User object

Return type:

List of User

get_all_members(limit=200, offset=None)

Gets all members of the organisation

Parameters:
  • limit (integer) – Maximum limit number of returned members

  • offset (integer) – Number of skipped members. Used for pagination

Returns:

List of User object

Return type:

List of User

get_hardware(offset=0, limit=200)

Get all hardware of the organisation

Parameters:
  • offset (integer) – Number of skipped hardware. Used for pagination

  • limit (integer) – Maximum limit number of returned hardware

Returns:

List of Hardware object

Return type:

List of Hardware

get_inactive_members(limit=200, offset=None)

Gets all inactive members of the organisation

Parameters:
  • limit (integer) – Maximum limit number of returned members

  • offset (integer) – Number of skipped members. Used for pagination

Returns:

List of User object

Return type:

List of User

get_member_by_email(email)

Get an exising member of the organisation by his/her email

Returns:

User object

Return type:

User

get_organisations(limit=200, offset=None)

Get all organisations

Parameters:
  • limit (integer) – Maximum limit number of returned organisations

  • offset (integer) – Number of skipped organisations. Used for pagination

Returns:

List of Organisation objects

Return type:

List of Organisation

get_projects(offset=0, limit=200)

Get all projects of the organisation

Parameters:
  • offset (integer) – Number of skipped projects. Used for pagination

  • limit (integer) – Maximum limit number of returned projects

Returns:

List of Project object

Return type:

List of Project

get_software(offset=0, limit=200)

Get all software of the organisation

Parameters:
  • offset (integer) – Number of skipped software. Used for pagination

  • limit (integer) – Maximum limit number of returned software

Returns:

List of Software object

Return type:

List of Software

get_talents(offset=0, limit=200)

Get all talents of the organisation

Parameters:
  • offset (integer) – Number of skipped talents. Used for pagination

  • limit (integer) – Maximum limit number of returned talents

Returns:

List of Person object

Return type:

List of Person

organisation_view = {'_id': 'item._id', '_key': 'item._key', '_rev': 'item._rev', 'applicants': "FIRST(# -($Child)> 0,1 item.data.name == 'Applicants' SORT null VIEW item)", 'buildings': "FIRST(# -($Child)> 0,1 item.data.name == 'Buildings' SORT null VIEW item)", 'createdAt': 'item.createdAt', 'createdBy': 'item.createdBy', 'data': 'item.data', 'hardware': "FIRST(# -($Child)> 0,1 item.data.name == 'Hardware' SORT null VIEW item)", 'licenses': "FIRST(# -($Child)> 0,1 item.data.name == 'Licenses' SORT null VIEW item)", 'projects': "FIRST(# -($Child)> 0,1 item.data.name == 'Projects' SORT null VIEW item)", 'properties': 'FIRST(# -($Child)> 0,1 $Properties SORT null VIEW item)', 'talents': "FIRST(# -($Child)> 0,1 item.data.name IN ['Talents', 'People'] SORT null VIEW item)", 'teams': "FIRST(# -($Child)> 0,1 item.data.name == 'Teams' SORT null VIEW item)", 'type': 'item.type', 'updatedAt': 'item.updatedAt', 'updatedBy': 'item.updatedBy'}