Notes endpoint

Notes belong to a Node in a Project

When working with data for a specific Project like Notes, make sure to define the Dradis-Project-Id HTTP header like so:

$ curl \
  -H 'Authorization: Token token="xMsNwttqN5bVNEYcrIF01s65"' \
  -H 'Dradis-Project-Id: 3' \
  https://dradis-pro.dev/pro/api/nodes/8/notes

GET /pro/api/nodes/:node_id/notes

Retrieves all of the Notes associated with the specific Node in your project, ordered by the note id, descending.

You can paginate the results for 25 views per page by appending e.g. \?page\=1 and \?page\=2, so e.g. http://dradis-pro.dev/pro/api/nodes/8/notes\?page\=1.

Sample request:

curl \
  -H 'Authorization: Token token="hxMsNwttqN5bVNEYcrIF01s65"' \
  -H 'Dradis-Project-Id: 3' \
  http://dradis-pro.dev/pro/api/nodes/8/notes

Result:

[
  {
    "id": 14,
    "author": "Nessus upload plugin",
    "category_id": 1,
    "title": "Host Details",
    "fields": {
      "Title": "Host Details",
      "Type": "Details",
      "Description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam fringilla tristique nisi, id cursus elit tincidunt egestas. Nunc sagittis libero eu hendrerit aliquam."
    },
    "text": "#[Title]#\r\nHost Details\r\n\r\n#[Type]#\r\nDetails\r\n\r\n#[Description]#\r\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam fringilla tristique nisi, id cursus elit tincidunt egestas. Nunc sagittis libero eu hendrerit aliquam."
  },
  {
    "id": 13,
    "author": "Nessus upload plugin",
    "category_id": 6,
    "title": "Host info",
    "fields": {
      "Title": "Host info",
      "Host information": "Name: scanme.insecure.org\nIP address: 64.13.134.52\nFQDN: scanme.insecure.org\nOS: NetBSD 3.0\nMac address: n/a\nNetbios name: n/a",
      "Scan information": "Scan started: Fri Dec 11 02:57:52 2009\nScan ended: Fri Dec 11 03:07:22 2009"
    },
    "text": "#[Title]#\nHost info\n\n#[Host information]#\nName: scanme.insecure.org\nIP address: 64.13.134.52\nFQDN: scanme.insecure.org\nOS: NetBSD 3.0\nMac address: n/a\nNetbios name: n/a\n\n#[Scan information]#\nScan started: Fri Dec 11 02:57:52 2009\nScan ended: Fri Dec 11 03:07:22 2009\n"
  }
]

GET /pro/api/nodes/:node_id/notes/:note_id

Retrieves a single Note from the specific Node in your project.

Sample request:

curl \
  -H 'Authorization: Token token="hxMsNwttqN5bVNEYcrIF01s65"' \
  -H 'Dradis-Project-Id: 3' \
  http://dradis-pro.dev/pro/api/nodes/8/notes/13

Result:

{
  "id": 13,
  "author": "Nessus upload plugin",
  "category_id": 6,
  "title": "Host info",
  "fields": {
    "Title": "Host info",
    "Host information": "Name: scanme.insecure.org\nIP address: 64.13.134.52\nFQDN: scanme.insecure.org\nOS: NetBSD 3.0\nMac address: n/a\nNetbios name: n/a",
    "Scan information": "Scan started: Fri Dec 11 02:57:52 2009\nScan ended: Fri Dec 11 03:07:22 2009"
  },
  "text": "#[Title]#\nHost info\n\n#[Host information]#\nName: scanme.insecure.org\nIP address: 64.13.134.52\nFQDN: scanme.insecure.org\nOS: NetBSD 3.0\nMac address: n/a\nNetbios name: n/a\n\n#[Scan information]#\nScan started: Fri Dec 11 02:57:52 2009\nScan ended: Fri Dec 11 03:07:22 2009\n"
}
  

POST /pro/api/nodes/:node_id/notes

Creates a Note on the specified Node in your project. The attributes for the Issue must be provided in the POST body as JSON.

HTTP status 201 will be returned if the creation completes successfully, and a Location header will be sent with the response, set to the URL of the newly created resource.

Accepted Parameter Use
note Pass it the text parameter.
text Pass it the content of the Note using JSON on one line subbing in \r\n for new lines. Don't forget to include field names with the #[ ]# syntax.
category_id (optional) Pass this the numeric value of the category you want to assign to your Note. For example, pass it a value of 1 to set your Note to the AdvancedWordExport ready category.

Sample request:

curl \
  -H 'Authorization: Token token="hxMsNwttqN5bVNEYcrIF01s65"' \
  -H 'Dradis-Project-Id: 3' \
  -H 'Content-type: application/json' \
  -X POST \
  -d '{"note": {"text": "#[Title]#\r\nNew Note\r\n\r\n#[Description]#\r\nSample note content.", "category_id": "1"}}' \
  http://dradis-pro.dev/pro/api/nodes/8/notes

Result:

{
  "id": 15,
  "author": "admin@securityroots.com",
  "category_id": 1,
  "title": "New Note",
  "fields": {
    "Title": "New Note",
    "Description": "Sample note content."
  },
  "text": "#[Title]#\r\nNew Note\r\n\r\n#[Description]#\r\nSample note content."
}
  

PUT /pro/api/nodes/:node_id/notes/:note_id

Updates a Note on the specified Node in your project. The attributes to be updated must be provided in the body as JSON. Like the POST method, make sure to write out the new content of the Issue using JSON on one line subbing in \r\n to create new lines create fields using the #[ ]# syntax.

HTTP status 200 will be returned if the update completes successfully.

See POST above for more details on the accepted parameters.

Sample request:

curl \
  -H 'Authorization: Token token="hxMsNwttqN5bVNEYcrIF01s65"' \
  -H 'Dradis-Project-Id: 3' \
  -H 'Content-type: application/json' \
  -X PUT \
  -d '{"note": {"text": "#[Title]#\r\nUpdated Note\r\n\r\n#[Description]#\r\nUpdated note content.", "category_id": "6"}}' \
  http://dradis-pro.dev/pro/api/nodes/8/notes/15

Result:

{
  "id": 15,
  "author": "admin@securityroots.com",
  "category_id": 6,
  "title": "Updated Note",
  "fields": {
    "Title": "Updated Note",
    "Description": "Updated note content."
  },
  "text": "#[Title]#\r\nUpdated Note\r\n\r\n#[Description]#\r\nUpdated note content."
}
  

DELETE /pro/api/nodes/:node_id/notes/:note_id

Deletes a Note from the specified Node in your project. HTTP status 200 will be returned if the deletion completes successfully.

Sample request:

curl \
  -H 'Authorization: Token token="hxMsNwttqN5bVNEYcrIF01s65"' \
  -H 'Dradis-Project-Id: 3' \
  -H 'Content-type: application/json' \
  -X DELETE \
  http://dradis-pro.dev/pro/api/nodes/8/notes/15

Result:

{
  message: "Resource deleted successfully"
}

Next help article: Attachments endpoint →

Seven Strategies To Differentiate Your Cybersecurity Consultancy

You don’t need to reinvent the wheel to stand out from other cybersecurity consultancies. Often, it's about doing the simple things better, and clearly communicating what sets you apart.

  • Tell your story better
  • Improve your testimonials and case studies
  • Build strategic partnerships

Your email is kept private. We don't do the spam thing.