Add API + tests for Swarm

Applies to all of them