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

Introduction to the Sequence API

Our products have well designed, powerful, but simple web service Application Programming Interfaces. Everything a human can do in Sequence can be achieved using the API.

Sequence can be fully integrated into your media operations using its API, working seamlessly with your other systems such as your media asset management, encoding, and transcoding systems. Deep integration like this enables Sequence to show you the results of work initiated in your other systems, and also initiate work in those systems. This lets you and your entire team see the current status of a title as it passes through each stage of your workflow. No longer do you need to work across multiple systems, everything is visible in Sequence.

As explained in the introduction to REST APIs guide, the Sequence API follows the REST principles as much as possible. It is XML over HTTP using all four verbs (GET, POST, PUT, DELETE). Each resource, like job, task or asset, has its own URL and can be manipulated in isolation. XML responses will carry the necessary URLs to access sub-resources, so that API clients can discover resources without having to store or concatenate URLs.

Diagram

Discovering Sequence resources

Thanks to the fact that Sequence resources are linked to each other using their URLs, the API is autodiscoverable. As a side effect of this and of the conventions followed by this API, it can be accessed using the Almodovar generic REST client.

All examples below use the curl HTTP client, but you should be able to follow along with any standard HTTP client.

API root

A list of the available top level resources.

$ curl --digest -u api_user https://sequence.bebanjo.net/api
Enter host password for user 'api_user':
<?xml version='1.0' encoding='utf-8' ?>
<sequence>
  <link href="https://sequence.bebanjo.net/api/work_areas" rel="work_areas"></link>
</sequence>

Work areas

Note: Only GET is available.

Each of the areas in which your work is divided. For instance, lets say that you are a service provider doing encoding operations for 2 different customers. Normally, you would create one work area for each customer, so that you can separate their work completely, but all the users in your account can still have access to both work areas so that the whole team can be assigned to any piece of work, independently of where it comes from.

You can fetch either your list of working areas, or a single one. Note that this list is linked from the previous API root example.

$ curl --digest -u api_user https://sequence.bebanjo.net/api/work_areas
Enter host password for user 'api_user':
<?xml version='1.0' encoding='utf-8' ?>
<work_areas>
  <work_area>
    <name>BeBanjo TV</name>
    <link href="https://sequence.bebanjo.net/api/work_areas/52" rel="self"></link>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs" rel="jobs"></link>
  </work_area>
  <work_area>
    <name>BeBanjo Sports</name>
    <link href="https://sequence.bebanjo.net/api/work_areas/75" rel="self"></link>
    <link href="https://sequence.bebanjo.net/api/work_areas/75/jobs" rel="jobs"></link>
  </work_area>
</work_areas>

Note that each resource fetched from the API has a link to self so you can use that URL to fetch that resource individually.

$ curl --digest -u api_user https://sequence.bebanjo.net/api/work_areas/52
Enter host password for user 'api_user':
<work_area>
  <name>BeBanjo TV</name>
  <link href="https://sequence.bebanjo.net/api/work_areas/52" rel="self"></link>
  <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs" rel="jobs"></link>
</work_area>

Jobs

Note: GET, POST, PUT, DELETE are available.

These represent each of the work orders in the system. You access them through their work area and you can filter them by status. Valid filters are:

  • ready: Jobs returned will have all assets marked as received and all tasks completed.
  • pending: Jobs returned will have either assets not received, or some tasks pending.
  • completed: Jobs returned will have all of their tasks completed, independently of their assets status.
  • not_completed: Jobs returned will have at least some task pending, independently of their assets status.
  • received: Jobs returned will have all assets received, independently of task status.
  • not_received: Jobs returned will have at least some asset pending, independently of task status.
  • problematic: Jobs returned will have active problems.
  • not_problematic: Jobs returned will not have active problems.

Here is an example:

$ curl --digest -u api_user https://sequence.bebanjo.net/api/work_areas/52/jobs
Enter host password for user 'api_user':
<?xml version='1.0' encoding='utf-8' ?>
<jobs type='array'>
  <job>
    <name>Ironman 2</name>
    <due-date type='date'>2010-05-05T00:00:00+02:00</due-date>
    <licensor-name>Warner</licensor-name>
    <status>pending</status>
    <tasks-status>pending</tasks-status>
    <assets-status>not_received</assets-status>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875" rel="self"></link>
    <link href="https://sequence.bebanjo.net/api/work_areas/52" rel="work_area"></link>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/assets" rel="assets"></link>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/tasks" rel="tasks"></link>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/notes" rel="notes"></link>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/problems" rel="problems"></link>
  </job>
  <job>
    <name>The Dark Knight</name>
    <due-date type='date'>2010-05-07T00:00:00+02:00</due-date>
    <licensor-name>Fox</licensor-name>
    <status>ready</status>
    <tasks-status>completed</tasks-status>
    <assets-status>received</assets-status>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12878" rel="self"></link>
    <link href="https://sequence.bebanjo.net/api/work_areas/52" rel="work_area"></link>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12878/assets" rel="assets"></link>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12878/tasks" rel="tasks"></link>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12878/notes" rel="notes"></link>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12878/problems" rel="problems"></link>
  </job>
</jobs>

Now filtering by status:

$ curl --digest -u api_user https://sequence.bebanjo.net/api/work_areas/52/jobs?filter=pending
Enter host password for user 'api_user':
<?xml version='1.0' encoding='utf-8' ?>
<jobs type='array'>
  <job>
    <name>Ironman 2</name>
    <due-date type='date'>2010-05-05T00:00:00+02:00</due-date>
    <licensor-name>Warner</licensor-name>
    <status>pending</status>
    <tasks-status>pending</tasks-status>
    <assets-status>not_received</assets-status>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875" rel="self"></link>
    <link href="https://sequence.bebanjo.net/api/work_areas/52" rel="work_area"></link>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/assets" rel="assets"></link>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/tasks" rel="tasks"></link>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/notes" rel="notes"></link>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/problems" rel="problems"></link>
  </job>
</jobs>

Or querying a single one:

$ curl --digest -u api_user https://sequence.bebanjo.net/api/work_areas/52/jobs/12875
Enter host password for user 'api_user':
<?xml version='1.0' encoding='utf-8' ?>
<job>
  <name>Ironman 2</name>
  <due-date type='date'>2010-05-05T00:00:00+02:00</due-date>
  <licensor-name>Warner</licensor-name>
  <status>pending</status>
  <tasks-status>pending</tasks-status>
  <assets-status>not_received</assets-status>
  <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875" rel="self"></link>
  <link href="https://sequence.bebanjo.net/api/work_areas/52" rel="work_area"></link>
  <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/assets" rel="assets"></link>
  <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/tasks" rel="tasks"></link>
  <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/notes" rel="notes"></link>
  <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/problems" rel="problems"></link>
</job>

Learn how you can create, delete or update jobs in the job page.

Assets

Note: GET, POST, PUT, DELETE are available.

Each of the assets that must be received to complete a job.

$ curl --digest -u api_user https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/assets
Enter host password for user 'api_user':
<?xml version='1.0' encoding='utf-8' ?>
<assets type='array'>
  <asset>
    <type-name>subtitles</type-name>
    <status>pending</status>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/assets/21747" rel="self"></link>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875" rel="job"></link>
  </asset>
</assets>

Or a single asset:

$ curl --digest -u api_user https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/assets/21747
Enter host password for user 'api_user':
<?xml version='1.0' encoding='utf-8' ?>
<asset>
  <type-name>subtitles</type-name>
  <status>pending</status>
  <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/assets/21747" rel="self"></link>
  <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875" rel="job"></link>
</asset>

Learn how you can create, delete or update assets in the asset page.

Tasks

Note: GET, POST, PUT, DELETE are available.

Each of the tasks that must be completed to complete a job.

$ curl --digest -u api_user https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/tasks
Enter host password for user 'api_user':
<?xml version='1.0' encoding='utf-8' ?>
<tasks type='array'>
  <task>
    <name>Encoding</name>
    <status>pending</status>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/tasks/55999" rel="self"></link>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875" rel="job"></link>
  </task>
</tasks>

Or a single task:

$ curl --digest -u api_user https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/tasks/55999
Enter host password for user 'api_user':
<?xml version='1.0' encoding='utf-8' ?>
<task>
  <name>Encoding</name>
  <status>pending</status>
  <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/tasks/55999" rel="self"></link>
  <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875" rel="job"></link>
</task>

Learn how you can create, delete or update tasks in the task page.

Notes

Note: GET, POST, PUT, DELETE are available.

Notes related to each job:

$ curl --digest -u api_user https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/notes
Enter host password for user 'api_user':
<?xml version='1.0' encoding='utf-8' ?>
<notes type='array'>
  <note>
    <body>Metadata to be distributed separately to YouTube</body>
    <creator>api_user</creator>
    <created-at type='datetime'>2010-04-22T17:32:21+02:00</created-at>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/notes/19716" rel="self"></link>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875" rel="job"></link>
  </note>
</notes>
$ curl --digest -u api_user https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/notes/19716
Enter host password for user 'api_user':
<?xml version='1.0' encoding='utf-8' ?>
<note>
  <body>This movie rocks!</body>
  <creator>api_user</creator>
  <created-at type='datetime'>2010-04-22T17:32:21+02:00</created-at>
  <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/notes/19716" rel="self"></link>
  <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875" rel="job"></link>
</note>

Learn how you can create, delete or update notes in the note page

Problems

Note: GET, POST, PUT are available.

Reported problems related to a job:

$ curl --digest -u api_user https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/problems
Enter host password for user 'api_user':
<?xml version='1.0' encoding='utf-8' ?>
<problems type='array'>
  <problem>
    <description>Sound volume is a bit low</description>
    <dismissed type='boolean'>false</dismissed>
    <reporter>fulano</reporter>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/problems/212" rel="self"></link>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875" rel="job"></link>
  </problem>
  <problem>
    <description>There are frames dropped in TC 00:27:31</description>
    <dismissed type='boolean'>false</dismissed>
    <reporter>api_user</reporter>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/problems/213" rel="self"></link>
    <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875" rel="job"></link>
  </problem>
</problems>

Accessing a single problem:

$ curl --digest -u api_user https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/problems/213
Enter host password for user 'api_user':
<?xml version='1.0' encoding='utf-8' ?>
<problem>
  <description>There are frames dropped in TC 00:27:31</description>
  <dismissed type='boolean'>false</dismissed>
  <reporter>api_user</reporter>
  <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/problems/213" rel="self"></link>
  <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875" rel="job"></link>
</problem>

Problems cannot be deleted, but they can be dismissed. When they are dismissed, they remain associated to the job they belong to for reference purposes.

Learn how you can create or update problems in the problem page.

As we said, resources are all linked with each other. The convention is using a link tag, with the URL in the href attribute and with the name of the relationship between both resources in the rel attribute (this convention is also used for the resources having a link to self). This way, one can navigate the data through the links.

This is very convenient, but sometimes results in having to make several HTTP calls to get the information we want. This is when link expansion comes in. If you include the expand parameter in your call, the links whose rel is included in the expand parameter will be expanded, which means the link tag, instead of being empty, will contain what you would get if you were to query that URL. This way, you can get several linked resources with only one call.

Let’s see a couple of examples. With this first one, you get a job but also some info about the work area it belongs:

$ curl --digest -u api_user https://sequence.bebanjo.net/api/work_areas/52/jobs/12875?expand=work_area
Enter host password for user 'api_user':
<?xml version='1.0' encoding='utf-8' ?>
<job>
  <name>Ironman 2</name>
  <due-date type='date'>2010-05-05T00:00:00+02:00</due-date>
  <licensor-name>Warner</licensor-name>
  <status>late</status>
  <tasks-status>pending</tasks-status>
  <assets-status>not_received</assets-status>
  <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875" rel="self"></link>
  <link href="https://sequence.bebanjo.net/api/work_areas/52" rel="work_area">
    <work_area>
      <name>BeBanjo TV</name>
      <link href="https://sequence.bebanjo.net/api/work_areas/52" rel="self"></link>
      <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs" rel="jobs"></link>
    </work_area>
  </link>
  <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/assets" rel="assets"></link>
  <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/tasks" rel="tasks"></link>
  <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/notes" rel="notes"></link>
  <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/problems" rel="problems"></link>
</job>

With this second one, you fetch all the info stored related to a job (assets, tasks, notes and problems):

$ curl --digest -u api_user https://sequence.bebanjo.net/api/work_areas/52/jobs/12875?expand=assets,tasks,notes,problems
Enter host password for user 'api_user':
<?xml version='1.0' encoding='utf-8' ?>
<job>
  <name>prdovyosyq</name>
  <due-date type='date'>2010-05-05T00:00:00+02:00</due-date>
  <licensor-name>yhmoxasoct</licensor-name>
  <status>late</status>
  <tasks-status>pending</tasks-status>
  <assets-status>not_received</assets-status>
  <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875" rel="self"></link>
  <link href="https://sequence.bebanjo.net/api/work_areas/52" rel="work_area"></link>
  <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/assets" rel="assets">
    <assets type='array'>
      <asset>
        <type-name>weppcckskw</type-name>
        <status>pending</status>
        <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/assets/21747" rel="self"></link>
        <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875" rel="job"></link>
      </asset>
    </assets>
  </link>
  <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/tasks" rel="tasks">
    <tasks type='array'>
      <task>
        <name>ennhijbxka</name>
        <status>pending</status>
        <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/tasks/55999" rel="self"></link>
        <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875" rel="job"></link>
      </task>
    </tasks>
  </link>
  <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/notes" rel="notes">
    <notes type='array'>
      <note>
        <body>Wadus</body>
        <creator>api_user</creator>
        <created-at type='datetime'>2010-04-22T17:32:21+02:00</created-at>
        <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/notes/19716" rel="self"></link>
        <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875" rel="job"></link>
      </note>
    </notes>
  </link>
  <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/problems" rel="problems">
    <problems type='array'>
      <problem>
        <description></description>
        <dismissed type='boolean'>false</dismissed>
        <reporter>qinnpnjsiv</reporter>
        <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/problems/212" rel="self"></link>
        <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875" rel="job"></link>
      </problem>
      <problem>
        <description></description>
        <dismissed type='boolean'>false</dismissed>
        <reporter>api_user</reporter>
        <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875/problems/213" rel="self"></link>
        <link href="https://sequence.bebanjo.net/api/work_areas/52/jobs/12875" rel="job"></link>
      </problem>
    </problems>
  </link>
</job>

Last updated May 05th, 2017.