Updated api to version 2.

Signed-off-by: Staris <jaison@worxco.com>