add /api/environments endpoint