Library Weaknesses

Get All Library Weaknesses

This endpoint retrieves a list of Library Weakness resources.

GET /api/v2/library/problems/

Query Parameters

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

Parameter Description
risk_rating Given a risk rating 0-10, returns all Weaknesses with specified rating.
absolute_urls Whether to use absolute or relative urls (default is False).
to_html Whether to convert markdown to HTML (default is False).

GET /api/v2/library/problems/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json

{
    "results": [{
        "id": "P257",
        "db_id": 1,
        "title": "Privacy Violation",
        "text": "This is some example description.",
        "risk_rating": 5,
        "created": "2010-10-20T13:46:08-04:00",
        "updated": "2019-08-28T16:55:57.214000-04:00"
    }]
}

Include Parameters

See the Include Parameters section for more details.

Parameter Description
category Includes the category that applies to each Weakness.
cwe Includes the list of CWEs that apply to each Weakness.
related_tasks Includes a list of Countermeasures that relate to each Weakness.
GET /api/v2/library/problems/?include=related_tasks,category,cwe HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json

{
    "results": [{
        "id": "P257",
        "db_id": 1,
        "title": "Privacy Violation",
        "text": "This is some example description.",
        "risk_rating": 5,
        "created": "2010-10-20T13:46:08-04:00",
        "updated": "2019-08-28T16:55:57.214000-04:00",
        "category": "XML and Web Services",
        "cwe": [{
            "url": "http://cwe.mitre.org/data/definitions/359",
            "title": "Exposure of Private Information ('Privacy Violation')",
            "id": 359
        }],
        "related_tasks": [{
            "id": "CT1",
            "db_id": -1,
            "title": "Example Countermeasure 1",
            "priority": 10,
            "text": "Example Countermeasure solution",
            "phase": "X1"
        }]
    }]
}

Get a specific Library Weakness

This endpoint retrieves a single library Weakness resource, as specified by the id parameter.

GET /api/v2/library/problems/{problem_id}/

URL Parameters

Parameter Description
problem_id The id of the Weakness to retrieve.

All of the expand and include parameters for the 'Get all Library Weaknesses' endpoint apply here as well.

GET /api/v2/library/problems/P3/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json

{
    "id": "P3",
    "db_id": 1,
    "title": "Example Library Weakness",
    "text": "This is an example description.",
    "risk_rating": 5,
    "created": "2010-10-20T13:46:08-04:00",
    "updated": "2019-08-28T16:55:57.214000-04:00"
}

results matching ""

    No results matching ""