Project Attributes
Get All Project Attributes
This endpoint retrieves a list of Attribute resources relevant to a particular Project.
GET /api/v2/projects/{project_id}/attributes/
URL Parameters
| Parameter | Description |
|---|---|
| project_id | The id of the Project to retrieve Attributes for |
Query Parameters
| Parameter | Description |
|---|---|
| id | Filter by Attribute ID |
| id__in | Filter by a list of Attribute IDs. Comma-separated (e.g. AT1,AT2) |
| name | Filter by Attribute name |
| name__in | Filter by a list of Attribute names. Comma-separated |
| search | Filter by performing a text search on Attribute name and description |
| ordering | Sort by the specified field. Prefix field name with minus to sort descending. Supported fields: id, name |
GET /api/v2/projects/1/attributes/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
"results": [
{
"id": "AT1",
"name": "Password Authentication",
"description": "The application uses password-based authentication"
},
{
"id": "AT2",
"name": "Stores Sensitive Data",
"description": "The application stores sensitive user data"
}
]
}
Include Parameters
See the Include Parameters section for more details.
| Parameter | Description |
|---|---|
| sources | A list of sources explaining why the Attribute is relevant to the Project. |
GET /api/v2/projects/1/attributes/?include=sources HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
"results": [
{
"id": "AT1",
"name": "Password Authentication",
"description": "The application uses password-based authentication",
"sources": [
{
"type": "survey",
"reason": "Answer [Uses password authentication](/path/to/answer/)",
"actor": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com"
}
}
]
},
{
"id": "AT2",
"name": "Stores Sensitive Data",
"description": "The application stores sensitive user data",
"sources": [
{
"type": "diagram",
"reason": "Diagram node [Database Server](/path/to/node/)",
"actor": {
"id": 2,
"first_name": "Jane",
"last_name": "Smith",
"email": "jane.smith@example.com"
}
}
]
}
]
}
Get a Specific Project Attribute
This endpoint retrieves a specific Attribute resource relevant to a particular Project.
GET /api/v2/projects/{project_id}/attributes/{attribute_id}/
URL Parameters
| Parameter | Description |
|---|---|
| project_id | The id of the Project to retrieve Attributes for |
| attribute_id | The id of the Attribute to retrieve |
GET /api/v2/projects/1/attributes/AT1/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "AT1",
"name": "Password Authentication",
"description": "The application uses password-based authentication"
}
Include Parameters
All of the include parameters for the Get All Project Attributes endpoint apply here as well.