Add functionality to get departments from the api