Setting maintenance using API

Setting maintenance using API

Hi there

Is there a way to set-up maintenance using API? Can 'suspend monitor' and 'activate monitor' be used for that purpose and will it then be reflected in the reporting?

Thanks,
Tommy