Archiving a Maya scene in Python?

I’m looking to archive a scene (Archive a scene) through a python script, the documentation for the API ‘getExternalContent()’ is ridiculous. So trying in python, anyone done it in python? Or successfully done it with the API?