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

Note: This resource links can be expanded using the expand option.

The enumeration resource describes reusable configuration of an account.

A enumeration looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<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>

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

Valid attributes

  • name (required): Name of the enumeration.
  • entries (optional): Each of the entries that describes the enumeration.
  • mappings (optional): Each of the mappings associated to that enumeration.

Get a list of all enumerations in the current account

In the root resource, just do a GET to the URL in the enumerations link:

<?xml version='1.0' encoding='utf-8' ?>
<movida>
  ...
  <link rel="enumerations" href="https://movida.bebanjo.net/api/enumerations"/>
  ...
</movida>
$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/enumerations

And:

<?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>

Note: This is a paginated resource. By default, only 50 enumerations will be included in each page but you can override this default by using the per_page parameter described in the next section. The total-entries attribute will indicate the total number of entries and the links rel="next" and rel="prev" should be used to get the next and the previous pages.

Valid attributes

You can filter the list of enumerations returned using the following attributes:

  • per_page: Number of elements returned in each page. The maximum value allowed is 200 and the default is 50.

Get a specific enumeration

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

$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/enumerations/879

And:

<?xml version='1.0' encoding='utf-8' ?>
<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>

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

$ curl --digest -u robot_user:password https://movida.bebanjo.net/api/enumerations/879?expand=entries,mappings,mapping_entries

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

<?xml version='1.0' encoding='utf-8' ?>
<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">
    <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">
          <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-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-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-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-entry>            
          </mapping-entries>
        </link>
      </entry>
    </entries>
  </link>
  <link rel="mappings" href="https://movida.bebanjo.net/api/enumerations/879/mappings">
    <mappings type="array">
      <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>
      <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>
    </mappings>
  </link>
</enumeration>

Last updated February 17th, 2020.