We use cookies (just for analytics) on this website. If you continue we will assume you are happy with it. ok

BeBanjo

Back to index

Enumeration entry

The Enumeration entry is used to populate the list of elements of an enumeration

A enumeration entry looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<entry>
  <id type="integer">66475</id>
  <value>France &gt; Bouygues &gt; Boing &gt; Catch Up</value>
  <description>France &gt; Bouygues &gt; Boing &gt; Catch Up</description>
  <link rel="self" href="https://movida.bebanjo.net/api/entries/66475"/>
  <link rel="enumeration" href="https://movida.bebanjo.net/api/enumerations/879"/>
  <link rel="mapping_entries" href="https://movida.bebanjo.net/api/entries/66475/mapping_entries"/>
</entry>

Note: currently enumeration entries cannot be created/updated/destroyed through the API. Please, contact your Technical Account Manager in order to define the list of enumeration and enumeration entries suitable for your company.

Valid attributes

  • value (required): string used internally to identify that entry.
  • description (required): string used on the Movida UI to represent the entry.
  • enumeration (optional): The enumeration it belongs to.
  • mapping_entries (optional): Each of the mapping entries associated to that enumeration entry.

Get a list of all entries for an enumeration

Entries are accessed via the Enumeration they belong to, as in the example below, through the link identified by the rel="entries" attribute:

<?xml version='1.0' encoding='utf-8' ?>
<enumerations type="array">
  <enumeration>
    <id type="integer">879</id>
    <name>BeBanjo:Platform Configuration</name>
    <link rel="self" href="https://movida.bebanjo.net/api/enumerations/879"/>
    <link rel="entries" href="https://movida.bebanjo.net/api/enumerations/879/entries"/>
    <link rel="mappings" href="https://movida.bebanjo.net/api/enumerations/879/mappings"/>
  </enumeration>
</enumerations>

If we follow that link, we can fetch the list of all entries for that enumeration.

$ curl --digest -u robot_user:password http://www.example.com/api/enumerations/879/entries
<?xml version="1.0" encoding="UTF-8"?>
<entries type="array">
  <entry>
    <id type="integer">66475</id>
    <value>France &gt; Bouygues &gt; Boing &gt; Catch Up</value>
    <description>France &gt; Bouygues &gt; Boing &gt; Catch Up</description>
    <link rel="self" href="https://movida.bebanjo.net/api/entries/66475"/>
    <link rel="enumeration" href="https://movida.bebanjo.net/api/enumerations/879"/>
    <link rel="mapping_entries" href="https://movida.bebanjo.net/api/entries/66475/mapping_entries"/>
  </entry>
  <entry>
    <id type="integer">81068</id>
    <value>Finland &gt; AVS &gt; Toonix &gt; SVOD</value>
    <description>Finland &gt; AVS &gt; Toonix &gt; SVOD</description>
    <link rel="self" href="https://movida.bebanjo.net/api/entries/81068"/>
    <link rel="enumeration" href="https://movida.bebanjo.net/api/enumerations/879"/>
    <link rel="mapping_entries" href="https://movida.bebanjo.net/api/entries/81068/mapping_entries"/>
  </entry>
</entries>

Get a specific enumeration entry

Just do a GET to the URL in the enumeration_entry self link

$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/entries/66475

And:

<?xml version='1.0' encoding='utf-8' ?>
<entry>
  <id type="integer">66475</id>
  <value>France &gt; Bouygues &gt; Boing &gt; Catch Up</value>
  <description>France &gt; Bouygues &gt; Boing &gt; Catch Up</description>
  <link rel="self" href="https://movida.bebanjo.net/api/entries/66475"/>
  <link rel="enumeration" href="https://movida.bebanjo.net/api/enumerations/879"/>
  <link rel="mapping_entries" href="https://movida.bebanjo.net/api/entries/66475/mapping_entries"/>
</entry>

Remember you can use the expand me some nodes trick if you want to, for instance, find out what are the mappings entries and enumeration of a particular enumeration entry.

$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/entries/66475?expand=enumeration,mapping_entries,mapping

This would expand the rel="enumeration", the rel=”mappings_entries”” links inside the enumeration entry, and the rel=”mapping””` link inside each mapping entry yielding something like:

<?xml version='1.0' encoding='utf-8' ?>
<entry>
  <id type="integer">66475</id>
  <value>France &gt; Bouygues &gt; Boing &gt; Catch Up</value>
  <description>France &gt; Bouygues &gt; Boing &gt; Catch Up</description>
  <link rel="self" href="https://movida.bebanjo.net/api/entries/66475"/>
  <link rel="enumeration" href="https://movida.bebanjo.net/api/enumerations/879">
    <enumeration>
      <id type="integer">879</id>
      <name>BeBanjo:Platform Configuration</name>
      <link rel="self" href="https://movida.bebanjo.net/api/enumerations/879"/>
      <link rel="entries" href="https://movida.bebanjo.net/api/enumerations/879/entries"/>
      <link rel="mappings" href="https://movida.bebanjo.net/api/enumerations/879/mappings"/>
    </enumeration>
  </link>
  <link rel="mapping_entries" href="https://movida.bebanjo.net/api/entries/66475/mapping_entries">
    <mapping-entries type="array">
      <mapping-entry>
        <id type="integer">34</id>
        <value>Bouygues</value>
        <link rel="entry" href="https://movida.bebanjo.net/api/entries/66475"/>
        <link rel="mapping" href="https://movida.bebanjo.net/api/mappings/7">
          <mapping>
            <id type="integer">7</id>
            <name>Distribution Channel</name>
            <link rel="self" href="https://movida.bebanjo.net/api/mappings/7"/>
            <link rel="enumeration" href="https://movida.bebanjo.net/api/enumerations/879"/>
          </mapping>
        </link>
      </mapping-entry>
      <mapping-entry>
        <id type="integer">35</id>
        <value>Boing</value>
        <link rel="entry" href="https://movida.bebanjo.net/api/entries/66475"/>
        <link rel="mapping" href="https://movida.bebanjo.net/api/mappings/8">
          <mapping>
            <id type="integer">8</id>
            <name>Channel Brand</name>
            <link rel="self" href="https://movida.bebanjo.net/api/mappings/8"/>
            <link rel="enumeration" href="https://movida.bebanjo.net/api/enumerations/879"/>
          </mapping>
        </link>
      </mapping-entry>
      <mapping-entry>
        <id type="integer">36</id>
        <value>Catch Up</value>
        <link rel="entry" href="https://movida.bebanjo.net/api/entries/66475"/>
        <link rel="mapping" href="https://movida.bebanjo.net/api/mappings/9">
          <mapping>
            <id type="integer">9</id>
            <name>Business Model</name>
            <link rel="self" href="https://movida.bebanjo.net/api/mappings/9"/>
            <link rel="enumeration" href="https://movida.bebanjo.net/api/enumerations/879"/>
          </mapping>
        </link>
      </mapping-entry>
      <mapping-entry>
        <id type="integer">1717</id>
        <value nil="true"/>
        <link rel="entry" href="https://movida.bebanjo.net/api/entries/66475"/>
        <link rel="mapping" href="https://movida.bebanjo.net/api/mappings/24">
          <mapping>
            <id type="integer">24</id>
            <name>Image Validation Rule Set</name>
            <link rel="self" href="https://movida.bebanjo.net/api/mappings/24"/>
            <link rel="enumeration" href="https://movida.bebanjo.net/api/enumerations/879"/>
          </mapping>
        </link>
      </mapping-entry>      
    </mapping-entries>
  </link>
</entry>

Last updated November 09th, 2020.