Get All Content Metadata


The REST Web Service, located at /all_content_metadata, returns metadata for all content in the system.

Request URL




A typical return is in this example.

< ?xml version='1.0' encoding='UTF-8'?>
<content -files type='array'>
  </content><content -file>
    <actual -duration type='integer'>30096</actual>
    <contributor nil='true'/>
    <created -at type='datetime'>2010-01-28 16:35:22-05:00</created>
    <delete -datetime type='datetime' nil='true'/>
    <description>This would be the description.</description>
    <duration type='integer'>31</duration>
    <episode nil='true'/>
    <episode -code nil='true'/>
    <id type='integer'>4</id>
    <import_datetime type='datetime'>2010-01-28 16:35:22-05:00</import_datetime>
    <location nil='true'/>
    <name>American Arts - 30 secs</name>
    <program nil='true'/>
    <program -code nil='true'/>
    <categories type='array'/>
  <content -file>
    <actual -duration type='integer'>30054</actual>
    <contributor nil='true'/>
    <created -at type='datetime'>2010-01-28 17:18:59-05:00</created>
    <delete -datetime type='datetime' nil='true'/>
    <description>This short video describes the difference between...</description>
    <duration type='integer'>31</duration>
    <episode>DOM Presents</episode>
    <episode -code nil='true'/>
    <id type='integer'>5</id>
    <import_datetime type='datetime'>2010-01-28 17:18:59-05:00</import_datetime>
    <location nil='true'/>
    <name>3-Channel Video</name>
    <program>DOM 3 Channel Video</program>
    <program -code nil='true'/>
    <categories type='array'>
        <id type='integer'>6</id>
        <name>PSAs, Promos and Shorts</name>


< ?xml version="1.0" encoding="UTF-8"?>
  <error>No content found in system.</error>


  1. Bob Hassinger says:

    Trying to use this interface – I first got plain text, not XML, working from Safari on a Mac. When I try again in various combinations of browser and OS I get “An application error has occurred.”

    Is there something I need to know to make it give the XML, and what is going on with the error? It would seem there is some sort of deficiency in error recovery (e.g. maybe there was something wrong in my early tries and that got the API stuck), or maybe there is some sort of timeout for these requests – maybe to minimize sensitivity to attacks for example?

  2. rbrooks says:

    What version of our software are you on, Bob? Check the “Version and Information” page under your “Config” tab. Thanks!

  3. Bob Hassinger says:

    Date Stamp: 200910051102
    Release: 3.6.4
    UI Revision: 7938
    Schema Version: 553
    MPEG Tools Version: 2.1
    DVD Import Version: 4.04
    SS Version: 3.61 (patch 0) (subver 1)

  4. rbrooks says:

    Thanks, Bob.

    What you are seeing in the Safari browser sounds correct, and it is what we see on this end as well. Safari will display the XML as a large page of seemingly plain text. If you “View Source” of the page, you will see the XML. (View > View Source or Command-Option-U) Google Chrome behaves similarly. Firefox (3.6.3) and IE 8 both show an XML structure immediately with collapsible XML nodes. (We tested FF on both Mac and PC.) It’s odd that you would get an “Application error” in one browser and not others, given that the XML return is served in exactly the same way to every client system. What I am about to suggest may seem rudimentary, but I’ll mention it anyway. Try copy and pasting the URL from a browser that works (Safari) to the browser that doesn’t work. That way, we eliminate any possibility of keyboard entry mistakes. (Of course, don’t forget the “:3000” port number.)

    Keep in mind too that, although web browsers are good to use to test REST web services, they largely weren’t designed to do anything productive with those results. This is the reason unformatted text appears in Safari and Chrome. REST services were designed for consumed by other web-based systems, in which the XML results are being parsed, filtered, and displayed in some useful manner that is tightly integrated into that system’s user interface. (These REST services are not to be confused with the RSS feeds that our products expose, which are also documented in these API docs. RSS is also XML-based, and most web browser’s are designed to consume them and do useful things with them. In other words, pasting an RSS feed URL into Safari or Firefox will display a nice formatted page. Pasting an REST feed’s URL will not.)

    Additionally, I would recommend you upgrade to the latest version of our software: 3.7.0 or greater. In 3.7.0, there was a bug fixed in the /all_content_metadata REST service and performance was improved significantly. These performance issues grew worse as number of titles in your system increased, and performance problems can certainly manifest themselves as “Application Error”-type issues. Also, this REST service prior to 3.7 was configured to return no more than 1,000 records. That limited has been lifted. So, if you plan to use the /all_content_metadata regularly, it’s a good idea to upgrade to 3.7.0+ in any event.

    Our Tech Support Department can assist with the upgrade.

  5. When I attempt to use this interface I get the following error:

    error on line 27 at column 37: Opening and ending tag mismatch: duration line 0 and content-files

    Line 27 looks like this:

    It looks like the tag was never closed. I can get around this particular error by purging this file from our server (its an extremely old overlay called NowPlaying_RSS.html), but it encounters the same error on the next overlay file it finds. Is this a problem with our version of the software (3.7.1) or is it just a weird bug unique to old overlay files? I could just purge all overlay files (as they don’t really work that well anyway) but i’d rather first try to tell if there is a solution already in place.