ads portal rest sample code