Countermeasure Updates
Retrieve the list of Countermeasures whose inclusion state does not match its relevance
Will return a list of Countermeasures whose accepted state is out of date with the project having id "project_id". This list includes Countermeasures which are relevant to a project but have not had their inclusion accepted by a user and Countermeasures which are no longer relevant to a project whose removal has yet to be accepted.
GET /api/v2/projects/{project_id}/task-updates/
URL Parameters
Parameter | Description |
---|---|
project_id | The ID of the project for the Countermeasures |
GET /api/v2/projects/1/task-updates/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
"results": [{
"id": "1-T2",
"task_id": "T2",
"url": "http://example.com/bunits/new-business-unit/...",
"title": "Secure forgotten password",
"text": "Insecure forgotten password and password reset...",
"priority": 8,
"phase": "X1",
"relevant": true,
"accepted": false,
"updated": "2015-06-16T19:37:44.710100Z",
"library_task_created": "2015-06-16T19:36:57.863684Z",
"library_task_updated": "2015-06-16T19:36:57.836874Z"
}]
}
Get specific updated Countermeasure
Return Countermeasure data for a specific Countermeasure whose relevance is out of line with its acceptance status
GET /api/v2/projects/{project_id}/task-updates/{task_id}/
URL Parameters
Parameter | Description |
---|---|
project_id | The ID of the project for the Countermeasure |
task_id | The ID of the specific Countermeasure |
GET /api/v2/projects/1/task-updates/1-T2/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "1-T2",
"task_id": "T2",
"url": "http://example.com/bunits/new-business-unit/...",
"title": "Secure forgotten password",
"text": "Insecure forgotten password and password reset...",
"priority": 8,
"phase": "X1",
"relevant": true,
"accepted": false,
"updated": "2015-06-16T19:37:44.710100Z",
"library_task_created": "2015-06-16T19:36:57.863684Z",
"library_task_updated": "2015-06-16T19:36:57.836874Z"
}
Accept Countermeasure changes for a project
Will accept changes to the project Countermeasures. If a payload of task_ids is provided, will only accept changes to those Countermeasures. If no payload provided, will accept all Countermeasure changes. If some of the task_ids are valid but others aren't, a partial success response is returned.
POST /api/v2/projects/{project_id}/task-updates/
URL Parameters
Parameter | Description |
---|---|
project_id | The ID of the project for the Countermeasures |
Payload
Fields | Required | Description |
---|---|---|
task_ids | No | A list of task_ids whose changes have to be accepted |
In the sample below, Countermeasure "T1" is a new project-relevant Countermeasure and "T2" is a Countermeasure to be removed from the project.
POST /api/v2/projects/1/task-updates/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
{
"task_ids": ["T1", "T2"]
}
HTTP/1.1 200 OK