Random Object

The random object can be returned using the PHP and HTTP APIs.

To access it using the PHP API, use the dmObject::getRandom() method, which returns an object of type dmObject:

<?php
$obj
= dmObject::getRandom();
echo
$obj->getField('title');
echo
$obj->getThumbnailURL();
?>

To access the random object using the HTTP API, navigate to http://my_cdm_server/dm/api/?r=objects/random. JSON is available by appending .json to the URI. HTTP clients that request JSON as a preferred content type in their HTTP "Accept" header should receive it automatically.