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


Back to index

Introduction to REST APIs

Movida, Metadata and Sequence APIs are based on REST principles.

We will get you up to speed using REST with BeBanjo applications, but if you want to dig deeper check further reading.

Basic principles

In short, our APIs follow these principles:

  1. Communication is done over HTTPS.
  2. Each resource has its own URL, which you use to interact with it.
  3. Interaction is done using the basic HTTP verbs:
    • GET for fetching resources
    • POST for creating resources
    • PUT for updating resources
    • DELETE for deleting resources
  4. The format used is XML following some conventions. POST and PUT requests require valid XML and properly escaped node contents.
  5. Each resource is linked with related resources using the <link> tag and its URLs.


BeBanjo’s APIs currently return XML and setting an Accept: application/xml header in any request made to the APIs is required.

All XML elements returned will carry its type as an attribute, except strings. So if there is no type attribute on a node, then it is either a string or a single node with children.

Available types are: array, integer, date, datetime, duration, boolean and document. For date and datetime types the API uses the following formats

  • date: ‘YYYY-MM-DD’
  • datetime: ISO 8601 YYYY-MM-DDThh:mm:ssTZD, where TZD is the time zone designator (Z or +hh:mm or -hh:mm); the + or - values indicate how far ahead or behind a time zone is from the UTC (Coordinated Universal Time) zone.

We recommend the usage of the same formats when make requests to the API as those are the ones we support.

<?xml version='1.0' encoding='utf-8' ?>
<schedulings type='array'>
    <id type='integer'>1</id>
    <put-up type='datetime'>2009-12-15T06:00:00Z</put-up>
    <take-down type='datetime'>2010-12-15T06:00:00Z</take-down>
    <link rel="title_group" href="https://movida.bebanjo.net/api/title_groups/1"/>
    <link rel="title" href="https://movida.bebanjo.net/api/titles/1"/>

There is always one level of depth within each resource (i.e. a “scheduling”), so that you can always find its attributes directly underneath its node. The exception is when the type is document. In this case it can hold a free form XML, which may vary in its format and depth.

Relationships with other resources are declared via the “link” tags which enables autodiscovery.


Each resource has its own URL, which you use to interact with it. There are 4 operations that you can use for a given URL: GET, POST, PUT and DELETE which semantics are, unsurprisingly, fetching, creating, updating or deleting the given resource.

Keep in mind that some operations might not be available for some resources. Refer to the specific application API documentation in order to know which are the available operations.

For PUT and POST operations the request must include in its body an XML representation of the resource that follows the same conventions as described above (i.e. the same XML that you fetch with a GET should work with a PUT). It’s also required for these operations the inclusion of a Content-Type: application/xml header. Here is an example of a POST cURL request:

$ cat title.xml
  <name>13 Assassins</name>
  <link rel="licensor" href="https://movida.bebanjo.net/api/licensors/4"/>
$ curl --digest -u robot_user:password -H "Content-Type: application/xml" -X POST -d @title.xml "https://movida.bebanjo.net/api/titles"

In addition to the four basic HTTP operations, conforming with the HTTP/1.1 standard, each resource responds to the HEAD method. A HEAD request is like a GET request but it only returns headers, not the body in the response.


Our APIs are auto-discoverable. This means that if you start from the root of either Sequence or Movida, you should be able to make your way through all of the available resources via the urls held in the link nodes.

Of course, you don’t have to (in fact, you shouldn’t) start from the beginning every time. If you know you only need to access, for instance, the schedulings of a particular platform in Movida, you can just go straight to that URL; or if you have to update a particular Sequence task, you can store that URL as its unique identifier and perform an HTTP PUT to update it.

If you need to remember a specific resource (like a scheduling or a platform), we encourage you to store its URL as its unique ID rather than the ID itself.

Backwards compatibility

Our API is in constant evolution. Developers who use our APIs can assume their software will continue working while we add new features, provided that new nodes might be added to any of the XML representations of our API resources.

We commit to not remove information, change its format, or the way it’s accessed, unless previously agreed with all our integrators.

Further reading

If you are looking for a deeper understanding of REST, try the following resources:

A good introduction to many of the principles and ideas we follow when designing our APIs are outlined in these blog posts:

Last updated January 10th, 2022.