foreach ($output_list->feed->entry as $e) {
        echo "\n Output has name = " . $e->content->params->name;
    }
    # delete output instance
    $rats->deleteOutput($output->entry->content->params->id);
    echo "\nDeleted output with name = " . $output->entry->content->params->name;
    # FORMAT
    # -----
    # create format profile
    $format = $rats->createFormat(array("name" => "test_rats_api_format", "category" => "formats", "container" => "mp4", "video_codec" => "h264", "video_cq" => "0.12", "video_deinterlace" => "md", "video_passes" => "2", "audio_channel" => "2", "audio_codec" => "aac", "audio_bitrate" => "96", "audio_sample_rate" => "44100"));
    echo "\n\nCreated format: " . $format->entry->id;
    # retrieve a single format instance based on the id
    $format = $rats->getFormatInstance($format->entry->content->params->id);
    echo "\nRetrieved format with name = " . $format->entry->content->params->name . " and container = " . $format->entry->content->params->container;
    # update format instance
    $format->entry->content->params->description = "Basic mp4, using size of the original";
    $format = $rats->updateFormat($format);
    echo "\nRetrieved format with name = " . $format->entry->content->params->name . " and description = " . $format->entry->content->params->description;
    # get list of your own format instances
    echo "\nGetting list of my format profiles:";
    $format_list = $rats->getFormatList("owner=self");
    foreach ($format_list->feed->entry as $e) {
        echo "\n Format has name = " . $e->content->params->name;
    }
    # delete format instance
    $rats->deleteFormat($format->entry->content->params->id);
    echo "\nDeleted format with name = " . $format->entry->content->params->name;
} catch (Exception $e) {
    echo "\nAn exception occurred with code = " . $e->getCode();
    echo "\nError msg = " . $e->getMessage();
}