Developers
How can we help you?
Note
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/JSON 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 rel="self" href="https://sequence.bebanjo.net/api/work_areas/10/jobs/12875/notes/69837"/>
<link rel="job" href="https://sequence.bebanjo.net/api/work_areas/10/jobs/12875"/>
</note>
{
"resource_type": "note",
"body": "Expecting more information",
"creator": "bebanjo_sfanytime",
"created_at": "2010-12-21T19:31:16+00:00",
"self_link": "https://sequence.bebanjo.net/api/work_areas/10/jobs/12875/notes/69837",
"job_link": "https://sequence.bebanjo.net/api/work_areas/10/jobs/12875"
}
Valid attributes
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:
https://sequence.bebanjo.net/api/work_areas/10/jobs/27188/notes
The attributes that can be used to create a note are:
body
(required).
Here is an example using curl:
$ curl --digest -u robot_user:password -H "Content-Type: application/xml" -d @note.xml https://sequence.bebanjo.net/api/work_areas/10/jobs/27188/notes
$ curl --digest -u robot_user:password -H "Content-Type: application/json" -H "Accept: application/json" -d @note.json https://sequence.bebanjo.net/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
or Content-Type: application/json
(required) and is sending the contents of the file note.xml
or note.json
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>
{
"body": "Original Title: 'Mujeres al Borde de un Ataque de Nervios'"
}
If successfully created, the response will be the complete XML/JSON of the new note with an HTTP status code of 200
:
<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 rel="self" href="https://sequence.bebanjo.net/api/work_areas/10/jobs/27188/notes/69388"/>
<link rel="job" href="https://sequence.bebanjo.net/api/work_areas/10/jobs/27188"/>
</note>
{
"resource_type": "note",
"body": "Original Title: 'Mujeres al Borde de un Ataque de Nervios'",
"creator": "robot_user",
"created_at": "2010-12-21T19:36:15+00:00",
"self_link": "https://sequence.bebanjo.net/api/work_areas/10/jobs/27188/notes/69388",
"job_link": "https://sequence.bebanjo.net/api/work_areas/10/jobs/27188"
}
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 -X DELETE https://sequence.bebanjo.net/api/work_areas/10/jobs/27188/notes/69388
$ curl --digest -u robot_user:password -H "Accept: application/json" -X DELETE https://sequence.bebanjo.net/api/work_areas/10/jobs/27188/notes/69388
The response should be a 204
(no content) HTTP Status code, with no body.