connect to departments api