Countermeasure Notes
Get all Countermeasure notes
This endpoint returns a list of Countermeasure note resources.
GET /api/v2/projects/{project_id}/tasks/{task_id}/notes/
URL parameters
Parameter | Description |
---|---|
project_id | The id of the Project |
task_id | The id of the Countermeasure |
GET /api/v2/projects/1/tasks/1-T2/notes/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
"results": [{
"automatic": true,
"text": "This Countermeasure is on-hold until we...",
"id": 682,
"created": "2015-03-26T19:50:46.348000-05:00",
"updater": {
"id": 1,
"email": "admin@example.com",
"first_name": "Admin",
"last_name": "Testerton",
"is_active": true,
"role": {
"id": "UR4",
"name": "Administrator"
}
},
"updated": "2015-03-26T19:50:46.348000-05:00",
"extra": {
"ext_id": 1002
},
"task": "T2"
}]
}
Create a note for a Countermeasure
POST /api/v2/projects/{project_id}/tasks/{task_id}/notes/
URL parameters
Parameter | Description |
---|---|
project_id | The id of the Project |
task_id | The id of the Countermeasure |
Payload
Fields | Required | Description |
---|---|---|
text | Yes | The text for the Countermeasure note. |
POST /api/v2/projects/1/tasks/1-T2/notes/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
{
"text": "Desired text for a note."
}
HTTP/1.1 201 CREATED
Content-Type: application/json
{
"automatic": false,
"text": "Desired text for a note",
"id": 5,
"created": "2019-01-30T14:43:24.115695-05:00",
"updater": {
"id": 1,
"email": "test@example.com",
"first_name": "Admin",
"last_name": "Testerton",
"is_active": true,
"role": {
"id": "UR4",
"name": "Administrator"
}
},
"updated": "2019-01-30T14:43:24.115695-05:00",
"extra": {},
"task": "T2"
}
Update a Countermeasure note
PATCH /api/v2/projects/{project_id}/tasks/{task_id}/notes/{note_id}/
URL parameters
Parameter | Description |
---|---|
project_id | The id of the Project |
task_id | The id of the Countermeasure |
note_id | The id of the Note |
Payload
Fields | Required | Description |
---|---|---|
text | No | The text for the Countermeasure note. |
PATCH /api/v2/projects/1/tasks/1-T2/notes/5/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
{
"text": "Updated text for a note."
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"automatic": false,
"text": "Updated text for a note.",
"id": 5,
"created": "2019-01-30T14:43:24.115695-05:00",
"updater": {
"id": 1,
"email": "test@example.com",
"first_name": "Admin",
"last_name": "Testerton",
"is_active": true,
"role": {
"id": "UR4",
"name": "Administrator"
}
},
"updated": "2019-01-30T14:43:24.115695-05:00",
"extra": {},
"task": "T2"
}