salt.modules.bamboohr

Support for BambooHR

New in version Beryllium.

Requires a subdomain and an apikey in /etc/salt/minion:

salt.modules.bamboohr.list_employees(order_by='id')

Show all employees for this company.

CLI Example:

salt myminion bamboohr.list_employees

By default, the return data will be keyed by ID. However, it can be ordered by any other field. Keep in mind that if the field that is chosen contains duplicate values (i.e., location is used, for a company which only has one location), then each duplicate value will be overwritten by the previous. Therefore, it is advisable to only sort by fields that are guaranteed to be unique.

CLI Examples:

salt myminion bamboohr.list_employees order_by=id salt myminion bamboohr.list_employees order_by=displayName salt myminion bamboohr.list_employees order_by=workEmail
salt.modules.bamboohr.list_meta_fields()

Show all meta data fields for this company.

CLI Example:

salt myminion bamboohr.list_meta_fields
salt.modules.bamboohr.list_users(order_by='id')

Show all users for this company.

CLI Example:

salt myminion bamboohr.list_users

By default, the return data will be keyed by ID. However, it can be ordered by any other field. Keep in mind that if the field that is chosen contains duplicate values (i.e., location is used, for a company which only has one location), then each duplicate value will be overwritten by the previous. Therefore, it is advisable to only sort by fields that are guaranteed to be unique.

CLI Examples:

salt myminion bamboohr.list_users order_by=id salt myminion bamboohr.list_users order_by=email
salt.modules.bamboohr.show_employee(emp_id, fields=None)

Show all employees for this company.

CLI Example:

salt myminion bamboohr.show_employee 1138

By default, the fields normally returned from bamboohr.list_employees are returned. These fields are:

  • canUploadPhoto
  • department
  • displayName
  • firstName
  • id
  • jobTitle
  • lastName
  • location
  • mobilePhone
  • nickname
  • photoUploaded
  • photoUrl
  • workEmail
  • workPhone
  • workPhoneExtension

If needed, a different set of fields may be specified, separated by commas:

CLI Example:

salt myminion bamboohr.show_employee 1138 displayName,dateOfBirth

A list of available fields can be found at http://www.bamboohr.com/api/documentation/employees.php

salt.modules.bamboohr.update_employee(emp_id, key=None, value=None, items=None)

Update one or more items for this employee. Specifying an empty value will clear it for that employee.

CLI Examples:

salt myminion bamboohr.update_employee 1138 nickname Curly salt myminion bamboohr.update_employee 1138 nickname '' salt myminion bamboohr.update_employee 1138 items='{"nickname": "Curly"} salt myminion bamboohr.update_employee 1138 items='{"nickname": ""}