Get CAPEC

Retrieves CAPEC attack pattern details.

Required Permissions

Requires the MEMBER role or higher.

HTTP Request

GET /api/sonar/capecs/:id
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
     https://HOSTNAME/api/sonar/capecs/5
Request Parameters
KeyRequiredTypeDescriptionNote
idYStringCAPEC identifierCAPEC-[sequence]

Success Response

{
  "capec": {
    "id": "CAPEC-282",
    "name": "Meta Abstractions",
    "status": "Draft",
    "type": "View",
    "objective": "This view (slice) covers meta abstraction attack patterns.",
    "datas": {
      "filter": "/Attack_Pattern_Catalog/Attack_Patterns/Attack_Pattern[@Abstraction='Meta']",
      "content_history": {
        "submission": {
          "submission_date": "2014-06-23",
          "submission_name": "CAPEC Content Team",
          "submission_organization": "The MITRE Corporation"
        }
      },
      "type": "Implicit"
    },
    "created": "2014-06-23",
    "updated": "2014-06-23"
  },
  "metrics": {
    "this": {
      "Attack Patterns": 12,
      "Categories": 0,
      "Views": 0,
      "Total": 12
    },
    "total": {
      "Attack Patterns": 559,
      "Categories": 331,
      "Views": 13,
      "Total": 903
    }
  }
}

When the CAPEC type (type) is View, the response includes an additional top-level metrics field as shown in the example above. metrics.this holds the per-type counts of CAPEC entries that belong to the View, and metrics.total holds the per-type counts across all CAPEC entries. Each count map consists of the keys Attack Patterns, Categories, Views, and Total, and the values vary depending on the loaded catalog version. The metrics field is not returned for types other than View.

Error Responses

When the id does not exist

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "capec 'CAPEC-15000' not found"
}