Document Properties endpoint

When working with data for a specific Project, 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/document_properties

GET /pro/api/document_properties

Retrieves all of the Document Properties associated with the specific project.

Sample request:

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

Result:

[
  {
    "test1": "test1"
  },
  {
    "test2": "test2"
  }
]

GET /pro/api/document_properties/:document_property_id

Retrieves a single Document Property 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/document_properties/dradis.client

Result:

{
  "dradis.client": "ACME Ltd."
}
  

POST /pro/api/document_properties

Creates a Document Property in your project. The attributes for the Document Property 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
document_properties Pass it the text parameter.
text Pass it the list of Document Properties to be created. If a property exists it will be overwritten

Sample request:

curl \
  -H 'Authorization: Token token="hxMsNwttqN5bVNEYcrIF01s65"' \
  -H 'Dradis-Project-Id: 3' \
  -H 'Content-type: application/json' \
  -X POST \
  -d '{"document_properties": {"dradis.client": "ACME Ltd.", "dradis.project": "Test"}}' \
  http://dradis-pro.dev/pro/api/document_properties

Result:

[
  {
    "dradis.client": "ACME Ltd."
  },
  {
    "dradis.project": "Test"
  }
]
  

PUT /pro/api/nodes/document_properties/:document_property

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 '{"document_property": {"value": "updated2!"}}' \
  http://dradis-pro.dev/pro/api/document_properties/dradis.client

Result:

{
  "dradis.client": "updated!"
}
  

DELETE /pro/api/document_properties/:document_property

Deletes a Document Property 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/document_properties/dradis.client

Result:

{
  "message": "Resource deleted successfully"
}

Next help article: Methodologies endpoint →

Streamline InfoSec Project Delivery

Learn practical tips to reduce the overhead that drags down security assessment delivery with this 5-day course. These proven, innovative, and straightforward techniques will optimize all areas of your next engagement including:

  • Scoping
  • Scheduling
  • Project Planning
  • Delivery
  • Intra-team Collaboration
  • Reporting and much more...

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