Updated to work with cm-api v6 for CM 5.0