Have you tried to read the ESP Content Integration Guide? It's all there, including examples.
The API call is
contentmanager.hasContent(id)
Cominvent AS -
www.cominvent.comHigh-end FAST ESP consulting and training
Jan Høydahl - Gründer & senior architect