Projects endpoint

GET /pro/api/projects

Retrieves 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",
    "client": {
      "id": 1,
      "name": "Security Roots"
    },
    "created_at": "2015-07-27T13:12:31Z",
    "updated_at": "2015-07-27T13:12:31Z",
    "authors": [
      {
        "email": "my@email.com"
      }
    ],
    "owners": [
      {
        "email": "my@email.com"
      }
    ]
  },
  {
    "id": 2,
    "name": "Test Project 2",
    "client": {
      "id": 1,
      "name": "Security Roots"
    },
    "created_at": "2015-07-27T13:11:18Z",
    "updated_at": "2015-07-27T13:11:18Z",
    "authors": [
      {
        "email": "my@email.com"
      }
    ],
    "owners": [
      {
        "email": "my@email.com"
      }
    ]
  },
  {
    "id": 1,
    "name": "Test Project 1",
    "client": {
      "id": 1,
      "name": "Security Roots"
    },
    "created_at": "2015-07-06T15:55:30Z",
    "updated_at": "2015-07-07T08:28:22Z",
    "authors": [
      {
        "email": "my@email.com"
      }
    ],
    "owners": [
      {
        "email": "my@email.com"
      }
    ]
  }
]

GET /pro/api/projects/:id

Retrieves 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",
  "client": {
    "id": 1,
    "name": "Security Roots"
  },
  "created_at": "2015-07-06T15:55:30Z",
  "updated_at": "2015-07-07T08:28:22Z",
  "authors": [
    {
      "email": "my@email.com"
    }
  ],
  "owners": [
    {
      "email": "my@email.com"
    }
  ]
}

POST /pro/api/projects

Creates 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.

Accepted Parameter Use
project Pass it the name, client_id and report_template_properties_id parameters
name Pass it the name of the project you want to create within Dradis
client_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
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","client_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",
  "client": {
    "id": 1,
    "name": "Security Roots"
  },
  "created_at": "2015-07-28T15:14:24Z",
  "updated_at": "2015-07-28T15:14:24Z",
  "authors": [
    {
      "email": "my@email.com",
    },
    {
      "email": "user4@email.com",
    },
    {
      "email": "user5@email.com",
    }
  ],
  "owners": [
    {
      "email": "my@email.com"
    }
  ]
}

PUT /pro/api/projects/:id

Updates 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",
  "client": {
    "id": 1,
    "name": "Security Roots"
  },
  "created_at": "2015-07-28T15:14:24Z",
  "updated_at": "2015-07-28T15:14:24Z",
  "authors": [
    {
      "email": "my@email.com"
    }
  ],
  "owners": [
    {
      "email": "my@email.com"
    }
  ]
}

DELETE /pro/api/projects/:id

Deletes a project. 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: Nodes endpoint →

InfoSec project delivery 5-day crash course

Learn innovative, actionable techniques and approaches for reducing the overhead that drags down InfoSec project delivery. You’ll learn how to optimize:

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

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