How to set up archiving through API interface

I want to call the api to implement the archiving function, but I can’t find the relevant interface.