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 rel="self" href="https://sequence.example.com/api/work_areas/10/jobs/27188/problems/462"/>
<link rel="job" href="https://sequence.example.com/api/work_areas/10/jobs/27188"/>
</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:password -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 rel="self" href="https://sequence.example.com/api/work_areas/10/jobs/27188/problems/463"/>
<link rel="job" href="https://sequence.example.com/api/work_areas/10/jobs/27188"/>
</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:password -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 rel="self" href="https://sequence.example.com/api/work_areas/10/jobs/27188/problems/463"/>
<link rel="job" href="https://sequence.example.com/api/work_areas/10/jobs/27188"/>
</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 January 12th, 2021.