Eric Zinda has a nice blog entry with API documentation that is not readily found.
swiplserver.prologserver API documentation