Output formats

The JW Platform Management API can deliver the data returned with API calls in various formats. You can freely choose the format that best fits your needs. Because of its nature of nodes and attributes, the XML format slightly differs from the other output formats.


The following formats are supported:

  • py: Serialized Python (using the highest data stream protocol version (HIGHEST_PROTOCOL) of the pickle module)
  • json: JSON (JavaScript Object Notation)
  • xml: XML
  • php: Serialized PHP



The output format is specified using the api_format parameter. It must be provided with each API call.


The structure of the XML output format differs from the other formats, since XML allows for the use of attributes in its data structure (this is also recommended). Totals, keys, and IDs are, for example, placed as attributes in XML. To illustrate, here’s a possible return from the /videos/list call in XML format:

<?xml version="1.0" encoding="UTF-8"?>
  <videos total="22">
    <video key="yYul4DRz">
      <author>JW Platform</author>
      <description>New video</description>
      <tags>new, video</tags>
      <title>New test video</title>

Here is the same return in PHP format. As you can see, the key attribute is a parameter and the total attribute is not returned as PHP count() function can be used to get total number of videos.

[status] => ok
[videos] => Array (
    [0] => Array (
        [status] => ready
        [description] => New video.
        [tags] => new, video
        [title] => New test video
        [duration] => 12.0
        [link] => http://www.jwplatform.com
        [author] => JW Platform
        [key] => yYul4DRz
        [date] => 1225962900

Did this page help you?