Notes are generic pieces of information associated to a given job. A note belongs to a job. It has no child resources.
Here is what its XML looks like:
<?xml version='1.0' encoding='utf-8' ?> <note> <body>Expecting more information</body> <creator>bebanjo_sfanytime</creator> <created-at type='datetime'>2010-12-21T19:31:16+00:00</created-at> <link href="https://sequence.example.com/api/work_areas/10/jobs/12875/notes/69837" rel="self"></link> <link href="https://sequence.example.com/api/work_areas/10/jobs/12875" rel="job"></link> </note>
body(text, read/write): This is the body of the note. It can be any text.
creator(string, read only): This is the login ID for the user who created the note.
created-at(datetime, read only): This is the timestamp when the date was created.
Creating a note
In order to add a note to a specific Job, it is necessary to issue a
POST request to the notes list of a Job. The URL for the request would look something like this:
The attributes that can be used to create a note are:
Here is an example using curl:
$ curl --digest -u robot_user:password -H "Content-Type: application/xml" -d @note.xml https://sequence.example.com/api/work_areas/10/jobs/27188/notes
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
note.xml as the body of the request. This is what the body of the
POST request should look like:
<note> <body>Original Title: 'Mujeres al Borde de un Ataque de Nervios'</body> </note>
If successfully created, the response will be the complete XML of the new note with an HTTP status code of
<note> <body>Original Title: Mujeres al Borde de un Ataque de Nervios</body> <creator>robot_user</creator> <created-at type="datetime">2010-12-21T19:36:15+00:00</created-at> <link href="https://sequence.example.com/api/work_areas/10/jobs/27188/notes/69388" rel="self"></link> <link href="https://sequence.example.com/api/work_areas/10/jobs/27188" rel="job"></link> </note>
Updating a note
It is currently not possible to update a note.
Deleting a note
In order to
DELETE a note, it is only necessary to issue a
DELETE request to the note URL, like so:
$ curl --digest -u robot_user:password -H "Content-Type: application/xml" -X DELETE https://sequence.example.com/api/work_areas/10/jobs/27188/notes/69388
The response should be a
204 (no content) HTTP Status code, with no body.
Last updated December 06th, 2018.