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

Problem

Problems are whatever that is preventing the jobs from being completed. A problem belongs to a job. It has no child resources.

Here is what its XML looks like:

<?xml version='1.0' encoding='utf-8' ?>
<problem>
  <description>Missing Actors list in the Metadata</description>
  <dismissed type='boolean'>false</dismissed>
  <reporter>bebanjo_sfanytime</reporter>
  <link href="https://sequence.example.com/api/work_areas/10/jobs/27188/problems/462" rel="self"></link>
  <link href="https://sequence.example.com/api/work_areas/10/jobs/27188" rel="job"></link>
</problem>

Valid attributes

  • description (text, read/write): This is the description of the problem. It can be any text.
  • reporter (string, read only): This is the login ID for the user who reported the problem.
  • dismissed (boolean, read/write): This flag specifies if the problem has been dismissed or is still active.

Creating a problem

In order to add a problem to a specific Job, it is necessary to issue a POST request to the problems list of a Job. The URL for the request would look something like this:

https://sequence.example.com/api/work_areas/10/jobs/27188/problems

The attributes that can be used to create a problem are:

  • description (required)
  • dismissed (optional)

Here is an example using curl:

$ curl --digest -u robot_user -H "Content-Type: application/xml" -d @problem.xml https://sequence.example.com/api/work_areas/10/jobs/27188/problems

This line would issue a POST request to the URL specified at the end using digest authentication. It is also setting the HTTP header Content-Type: application/xml (required) and is sending the contents of the file problem.xml as the body of the request. This is what the body of the POST request should look like:

<problem>
  <description>Audio not present in TC 00:10:13:03</description>
</problem>

If successfully created, the response will be the complete XML of the new problem with an HTTP status code of 200:

<problem>
  <description>Audio not present in TC 00:10:13:03</description>
  <dismissed type='boolean'>false</dismissed>
  <reporter>robot_user</reporter>
  <link href="https://sequence.example.com/api/work_areas/10/jobs/27188/problems/463" rel="self"></link>
  <link href="https://sequence.example.com/api/work_areas/10/jobs/27188" rel="job"></link>
</problem>

Updating a problem

A problem is generally updated to change its dismissed status. To update a problem, it is necessary to issue a PUT request to the URL of the problem in question. The body of the request should contain the XML of the problem with the attributes that must change. Note that not all attributes must be included, it would be enough to include the attributes that we wish to update.

The following example updates the status of the previous problem. Note how the URL used now is the one that uniquely identifies the problem:

$ curl --digest -u robot_user -H "Content-Type: application/xml" -X PUT -d @problem_update.xml https://sequence.example.com/api/work_areas/10/jobs/27188/problems/463

This is what the body of the request would contain:

<problem>
  <dismissed>true</dismissed>
</problem>

If the request is successful, it should return the updated problem XML and a status code of 200:

<problem>
  <description>Audio not present in TC 00:10:13:03</description>
  <dismissed type='boolean'>true</dismissed>
  <reporter>robot_user</reporter>
  <link href="https://sequence.example.com/api/work_areas/10/jobs/27188/problems/463" rel="self"></link>
  <link href="https://sequence.example.com/api/work_areas/10/jobs/27188" rel="job"></link>
</problem>

Deleting a problem

It is currently not possible to delete problems from a Job. Once dismissed, they remain associated to the job for reference purposes

Last updated September 19th, 2017.