Hal Sadofsky and Gavin LaRose have contributed some scripts they use for administering their servers. They are on the wiki at
Also, in webwork2/bin are scripts called addcourse and newpassword.
If all of the students in a large math course are in the same webwork course but have different section numbers it would be pretty easy to write a script that changes a student's section number.
Then you could fancy it up from there to do many students, transfers between courses, etc.
The API is essentially defined by the $db methods in DB.pm.
(Ooh - if you wanted to be really fancy, maybe you could write a client to do all of these things using the SOAP web-service, and then it could be done without command line access to the server.)