GET /pro/api/projectsRetrieves all projects, ordered by modification time (most recent first).
Sample request:
curl \
-H 'Authorization: Token token="xMsNwttqN5bVNEYcrIF01s65"' \
https://dradis-pro.dev/pro/api/projects
Result:
[
{
"id": 3,
"name": "Test Project 3",
"team": {
"id": 1,
"name": "Security Roots"
},
"created_at": "2015-07-27T13:12:31Z",
"updated_at": "2015-07-27T13:12:31Z",
"authors": [
{
"id": 1,
"email": "my@email.com"
}
],
"owners": [
{
"id": 1,
"email": "my@email.com"
}
],
"custom_fields": [
{
"id": 1,
"name": "Assessment Type",
"value": "Webapp"
}
],
"end_date": "2015-08-14",
"start_date": "2015-08-03"
},
{
"id": 2,
"name": "Test Project 2",
"team": {
"id": 1,
"name": "Security Roots"
},
"created_at": "2015-07-27T13:11:18Z",
"updated_at": "2015-07-27T13:11:18Z",
"authors": [
{
"id": 1,
"email": "my@email.com"
}
],
"owners": [
{
"id": 1,
"email": "my@email.com"
}
],
"custom_fields": [
{
"id": 1,
"name": "Assessment Type",
"value": "Webapp"
}
],
"end_date": null,
"start_date": null
},
{
"id": 1,
"name": "Test Project 1",
"team": {
"id": 1,
"name": "Security Roots"
},
"created_at": "2015-07-06T15:55:30Z",
"updated_at": "2015-07-07T08:28:22Z",
"authors": [
{
"id": 1,
"email": "my@email.com"
}
],
"owners": [
{
"id": 1,
"email": "my@email.com"
}
],
"custom_fields": [
{
"id": 1,
"name": "Assessment Type",
"value": "PenTest"
}
],
"end_date": "2015-07-24",
"start_date": "2015-07-13"
}
]
The start_date and end_date fields only appear in project responses if you have the Scheduler enabled.
GET /pro/api/projects/:idRetrieves a single project.
Sample request:
curl \
-H 'Authorization: Token token="xMsNwttqN5bVNEYcrIF01s65"' \
https://dradis-pro.dev/pro/api/projects/1
Result:
{
"id": 1,
"name": "Test Project 1",
"team": {
"id": 1,
"name": "Security Roots"
},
"created_at": "2015-07-06T15:55:30Z",
"updated_at": "2015-07-07T08:28:22Z",
"authors": [
{
"id": 1,
"email": "my@email.com"
}
],
"owners": [
{
"id": 1,
"email": "my@email.com"
}
],
"custom_fields": [
{
"id": 1,
"name": "Assessment Type",
"value": "Webapp"
},
{
"id": 2,
"name": "Recurrence",
"value": "One off"
}
],
"end_date": "2015-07-24",
"start_date": "2015-07-13"
}
POST /pro/api/projectsCreates a project. The attributes for the project 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.
To upload tool output or export a report, see the Tool output upload and Export and reports endpoints.
| Accepted Parameter | Use |
|---|---|
project |
Pass it the name, team_id and report_template_properties_id parameters |
name |
Pass it the name of the project you want to create within Dradis |
team_id |
Assigns the project to a client. Pass it the ID number of the client the project should be associated with within Dradis. |
report_template_properties_id (optional) |
Assigns a default report template to the project |
issuelib_project_locale_attributes (optional) |
Sets the project's IssueLibrary Locale. Pass it an object with the locale_id of a Locale, e.g. {"locale_id": 2}. A locale_id that doesn't exist returns HTTP status 422. New projects use the default Locale if you don't specify one. |
author_ids (optional) |
Assigns users as authors to the project. If not specified, only the user performing the request will be added as author. |
template (optional) |
Associate with a project template to pre-populate the project with data. Pass this the project template name. |
Sample request:
curl \
-H 'Authorization: Token token="xMsNwttqN5bVNEYcrIF01s65"'\
-H 'Content-type: application/json' \
-X POST \
-d '{"project":{"name":"Test Project 4","team_id":"1", "report_template_properties_id":"4", "author_ids": [4, 5], "template":"Welcome Project Template"}}' \
https://dradis-pro.dev/pro/api/projects
Result:
{
"id": 4,
"name": "Test Project 4",
"team": {
"id": 1,
"name": "Security Roots"
},
"project_creation": {
"state": "being_created"
},
"created_at": "2015-07-28T15:14:24Z",
"updated_at": "2015-07-28T15:14:24Z",
"authors": [
{
"id": 1,
"email": "my@email.com"
},
{
"id": 4,
"email": "user4@email.com"
},
{
"id": 5,
"email": "user5@email.com"
}
],
"owners": [
{
"id": 1,
"email": "my@email.com"
}
],
"custom_fields": []
}
The project_creation attribute in the response indicates if the created project is still in the process of building. The possible states are:
being_created - The project is still in the process of building.completed - The project is done building.project_creation state, send a request to GET /pro/api/projects/:id.
PUT /pro/api/projects/:idUpdates a project. The attributes to be updated must be provided in the POST body as JSON. HTTP status 200 will be returned if the update completes successfully.
See POST above for details on the accepted parameters.
Sample request:
curl \
-H 'Authorization: Token token="xMsNwttqN5bVNEYcrIF01s65"' \
-H 'Content-type: application/json' \
-X PUT \
-d '{"project":{"name":"Test Project 4 - Updated"}}'
https://dradis-pro.dev/pro/api/projects/4
Result:
{
"id": 4,
"name": "Test Project 4 - Updated",
"team": {
"id": 1,
"name": "Security Roots"
},
"project_creation": {
"state": "completed"
},
"created_at": "2015-07-28T15:14:24Z",
"updated_at": "2015-07-28T15:14:24Z",
"authors": [
{
"id": 1,
"email": "my@email.com"
}
],
"owners": [
{
"id": 1,
"email": "my@email.com"
}
],
"custom_fields": []
}
PUT /pro/api/projects/:id/ownerUpdates a project's owner. The attributes to be updated must be provided in the POST body as JSON. HTTP status 200 will be returned if the update completes successfully.
| Accepted Parameter | Use |
|---|---|
project |
Pass it the owner parameter |
owner_id |
Pass it the ID number of the user you want to assign as the new project owner |
Sample request:
curl \
-H 'Authorization: Token token="xMsNwttqN5bVNEYcrIF01s65"' \
-H 'Content-type: application/json' \
-X PUT \
-d '{"project":{"owner_id":"7"}}' \
https://dradis-pro.dev/pro/api/projects/4/owner
Result:
{
"id": 4,
"name": "Test Project 4 - Updated",
"team": {
"id": 1,
"name": "Security Roots"
},
"project_creation": {
"state": "completed"
},
"created_at": "2015-07-28T15:14:24Z",
"updated_at": "2015-07-28T15:14:24Z",
"authors": [
{
"id": 1,
"email": "my@email.com"
}
],
"owners": [
{
"id": 7,
"email": "owner@email.com"
}
],
"custom_fields": []
}
PATCH /pro/api/projects/:id/archiveThis archives a project, so it is moved out of the active projects view but not deleted. HTTP status 200 will be returned if the archiving completes successfully.
Sample request:
curl \
-H 'Authorization: Token token="xMsNwttqN5bVNEYcrIF01s65"' \
-X PATCH \
https://dradis-pro.dev/pro/api/projects/4/archive
PATCH /pro/api/projects/:id/unarchiveYou can also unarchive a project. HTTP status 200 will be returned if the unarchiving completes successfully.
Sample request:
curl \
-H 'Authorization: Token token="xMsNwttqN5bVNEYcrIF01s65"' \
-X PATCH \
https://dradis-pro.dev/pro/api/projects/4/unarchive
PATCH /pro/api/projects/:id/discardThis puts a project to the trash bin. HTTP status 200 will be returned if the discarding completes successfully.
Sample request:
curl \
-H 'Authorization: Token token="xMsNwttqN5bVNEYcrIF01s65"' \
-X PATCH \
https://dradis-pro.dev/pro/api/projects/4/discard
PATCH /pro/api/projects/:id/undiscardYou can also restore a project from the trash bin. HTTP status 200 will be returned if the recovery completes successfully.
Sample request:
curl \
-H 'Authorization: Token token="xMsNwttqN5bVNEYcrIF01s65"' \
-X PATCH \
https://dradis-pro.dev/pro/api/projects/4/undiscard
DELETE /pro/api/projects/:idPermanently deletes a project. This cannot be undone! Only projects in the trash bin can be deleted; in other words, if you are deleting a project that was not in the trash already, you will need to DISCARD it before deleting. HTTP status 200 will be returned if the deletion completes successfully.
Sample request:
curl \
-H 'Authorization: Token token="xMsNwttqN5bVNEYcrIF01s65"' \
-H 'Content-type: application/json' \
-X DELETE \
https://dradis-pro.dev/pro/api/projects/4
Result:
{
"message": "Resource deleted successfully"
}
Next help article: Tool output upload endpoint →
Loading form...
Your email is kept private. We don't do the spam thing.