Project Weakness Countermeasures

Get all project Weakness Countermeasures

Note: SD Elements terminology has changed. Problems will now be referred to as Weaknesses, and Tasks will now be referred to as Countermeasures. During this terminology transition, some parameter names and URL paths will still appear as problem or task.

This endpoint retrieves a list of Countermeasure resources that are applicable to a particular Weakness associated with a project. This endpoint will only return accepted Countermeasures.

GET /api/v2/projects/{project_id}/problems/{problem_id}/tasks/

URL parameters

Parameter Description
project_id The id of the applicable project.
problem_id The id of the Weakness to retrieve.

Query parameters

The following parameters may be used to filter the Weakness Countermeasure resources in the response.

Parameter Description
risk_relevant Filter Weakness Countermeasures to those relevant for the project's risk policy if true and non-relevant for false.
assigned_to Filter Weakness Countermeasures based on who they are assigned to. Expects an email or list of emails for assigned_to__in.
priority Filter Weakness Countermeasures based on the priority of the Countermeasure.
status Filter Weakness Countermeasures based on Countermeasure status. Expects Countermeasure status id (such as TS1).

GET /api/v2/projects/120/problems/120-P1171/tasks/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
    "results": [{
            "id": "120-T1366",
            "task_id": "T1366",
            "title": "Identify applicable compliance regulations",
            "assigned_to": [
                {
                    "id": 1,
                    "email": "admin@example.com",
                    "first_name": "Admin",
                    "last_name": "Testerton",
                    "is_active": true,
                    "role": {
                        "id": "UR4",
                        "name": "Administrator"
                    }
                }],
            "status": "TS2",
            "risk_relevant": false
        }]
}

Expand Parameters

See the Expand Parameters section for more details.

Parameter Description
status Status field is expanded to display information on the Countermeasure's status
GET /api/v2/projects/120/problems/120-P1171/tasks/?expand=status HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
    "results": [{
            "id": "120-T1366",
            "task_id": "T1366",
            "title": "Identify applicable compliance regulations",
            "assigned_to": [
                {
                "id": 1,
                "email": "admin@example.com",
                "first_name": "Admin",
                "last_name": "Testerton",
                "is_active": true,
                "role": {
                    "id": "UR4",
                    "name": "Administrator"
                    }
                }],
            "status": {
                "id": "TS2",
                "meaning": "TODO",
                "icon": "clock-o",
                "name": "Incomplete",
                "requires_comment": false,
                "slug": "TODO"
            }
        }]
}

Get a specific project Weakness's Countermeasure

This endpoint retrieves a single Countermeasure resource of a particular Weakness, as specified by the id parameter. This endpoint will only return accepted Countermeasures.

GET /api/v2/projects/{project_id}/problems/{problem_id}/tasks/{id}/

URL parameters

Parameter Description
project_id The id of the Project of the Countermeasure.
problem_id The id of the applicable Weakness.
id The id of the Countermeasure to retrieve.

All of the expand parameters for the 'Get all project Weakness Countermeasures' endpoint apply here as well.

GET /api/v2/projects/120/problems/120-P1171/tasks/120-T1366/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
    "id": "120-T1366",
    "task_id": "T1366",
    "title": "Identify applicable compliance regulations",
    "assigned_to": [
        {
            "id": 1,
            "email": "admin@example.com",
            "first_name": "Admin",
            "last_name": "Testerton",
            "is_active": true,
            "role": {
                "id": "UR4",
                "name": "Administrator"
            }
        }
    ],
    "status": "TS2",
    "risk_relevant": false
}

results matching ""

    No results matching ""