Library CWEs
Get all Library's CWEs
This endpoint retrieves a list of all CWE resources in SD Elements.
GET /api/v2/library/cwes/
Query Parameters
The following parameters may be used to filter the library Weakness resources in the response.
Parameter | Description |
---|---|
search | Query for CWEs by relevant terms in the title or by the id of the CWE. |
GET /api/v2/library/cwes/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
"results": [
{
"id": 1,
"title": "Environment [Category]",
"url": "http://cwe.mitre.org/data/definitions/1"
},
{
"id": 2,
"title": ".NET Misconfiguration: Data Transmission without Encryption [Variant]",
"url": "http://cwe.mitre.org/data/definitions/2"
},
{
"id": 3,
"title": "DEPRECATED: Technology-specific Overflow Issues [Category]",
"url": "http://cwe.mitre.org/data/definitions/3"
}
]
}
Get a specifc Library CWE
This endpoint retrieves a single CWE resource from the library as specified by the id.
GET /api/v2/library/cwes/{cwe_id}
All of the query parameters for the 'Get all Library CWEs' endpoint apply here as well.
GET /api/v2/library/cwes/6/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": 6,
"title": "Example Common Weakness Enumerator",
"url": "http://cwe.mitre.org/data/definitions/6"
}