Skip to content

Developers

How can we help you?

← Go back

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/JSON 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 rel="self" href="https://sequence.bebanjo.net/api/work_areas/10/jobs/27188/problems/462"/>
  <link rel="job" href="https://sequence.bebanjo.net/api/work_areas/10/jobs/27188"/>
</problem>
{
  "resource_type": "problem",
  "description": "Missing Actors list in the Metadata",
  "dismissed": false,
  "reporter": "bebanjo_sfanytime",
  "self_link": "https://sequence.bebanjo.net/api/work_areas/10/jobs/27188/problems/462",
  "job_link": "https://sequence.bebanjo.net/api/work_areas/10/jobs/27188"
}

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.bebanjo.net/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:password -H "Content-Type: application/xml" -d @problem.xml https://sequence.bebanjo.net/api/work_areas/10/jobs/27188/problems
$ curl --digest -u robot_user:password -H "Content-Type: application/json" -H "Accept: application/json" -d @problem.json https://sequence.bebanjo.net/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 or Content-Type: application/json (required) and is sending the contents of the file problem.xml or problem.json 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>
{
  "description": "Audio not present in TC 00:10:13:03"
}

If successfully created, the response will be the complete XML/JSON 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 rel="self" href="https://sequence.bebanjo.net/api/work_areas/10/jobs/27188/problems/463"/>
  <link rel="job" href="https://sequence.bebanjo.net/api/work_areas/10/jobs/27188"/>
</problem>
{
  "resource_type": "problem",
  "description": "Audio not present in TC 00:10:13:03",
  "dismissed": false,
  "reporter": "robot_user",
  "self_link": "https://sequence.bebanjo.net/api/work_areas/10/jobs/27188/problems/463",
  "job_link": "https://sequence.bebanjo.net/api/work_areas/10/jobs/27188"
}

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/JSON 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:password -H "Content-Type: application/xml" -X PUT -d @problem_update.xml https://sequence.bebanjo.net/api/work_areas/10/jobs/27188/problems/463
$ curl --digest -u robot_user:password -H "Content-Type: application/json" -H "Accept: application/json" -X PUT -d @problem_update.json https://sequence.bebanjo.net/api/work_areas/10/jobs/27188/problems/463

This is what the body of the request would contain:

<problem>
  <dismissed>true</dismissed>
</problem>
{
  "dismissed": true
}

If the request is successful, it should return the updated problem XML/JSON 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 rel="self" href="https://sequence.bebanjo.net/api/work_areas/10/jobs/27188/problems/463"/>
  <link rel="job" href="https://sequence.bebanjo.net/api/work_areas/10/jobs/27188"/>
</problem>
{
  "resource_type": "problem",
  "description": "Audio not present in TC 00:10:13:03",
  "dismissed": true,
  "reporter": "robot_user",
  "self_link": "https://sequence.bebanjo.net/api/work_areas/10/jobs/27188/problems/463",
  "job_link": "https://sequence.bebanjo.net/api/work_areas/10/jobs/27188"
}

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