API Documentation
RESTful API for accessing OSA security patterns, NIST 800-53 Rev 5 controls, and compliance framework mappings. Public data endpoints require no authentication. Key management endpoints require a session or API key.
Base URL
https://www.opensecurityarchitecture.org/api/v1
Format: All responses are JSON. CORS enabled for cross-origin access.
Headers: Rate limit info in X-RateLimit-Limit and X-RateLimit-Remaining.
Rate Limits
| Tier | Limit | Scope |
|---|---|---|
| Anonymous | 60 req/min | Per IP address |
| Signed in | 100 req/min | Per user account |
| API key | 100 req/min | Per key (customisable) |
Create a free API key for higher limits and programmatic access.
Authentication
Public data endpoints (patterns, controls, frameworks) require no authentication. Key management endpoints require either a browser session (OAuth) or an API key.
API Key Authentication
Pass your API key in the X-API-Key header:
curl -H "X-API-Key: osa_your_key_here" \
https://www.opensecurityarchitecture.org/api/v1/patterns Create and manage API keys from your API Keys dashboard (requires sign-in).
Keys use the prefix osa_ followed by 44 hex characters. The full key is shown once at creation — store it securely.
Maximum 5 active keys per account. Keys can be revoked at any time.
Patterns
/api/v1/patterns List all security patterns with optional filtering and pagination.
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
per_page | integer | Items per page (default: 20, max: 100) |
status | string | Filter by status: published, draft |
family | string | Filter by NIST control family (e.g. AC, SC) |
search | string | Keyword search. Every word must match. Results are ranked and carry a score. Deprecated patterns are left out unless status=deprecated is given |
/api/v1/patterns/:id Get full detail for a specific pattern including controls, threats, examples, and references.
| Parameter | Type | Description |
|---|---|---|
fields | string | Optional. controls or threats to return only that section |
Example:
GET /api/v1/patterns/SP-029?fields=threats /api/v1/patterns/:id/crosswalk One call for the join that otherwise takes a pattern call, a framework call and one call per control: each control with its emphasis, the threats it mitigates in this pattern, and its clauses in the frameworks you name. An empty clause list means OSA records no mapping, and the response names those controls under unmapped. For a framework compared with a published crosswalk, unmapped_checked lists the ones with no clause there either. Where OSA's mapping takes a published crosswalk as its base, based_on names it, and a control's osa_own lists the clauses OSA adds to it, which are still part of OSA's mapping. A control that NIST has withdrawn from SP 800-53 is marked withdrawn, with the controls it moved into. pattern.control_counts gives the totals for the whole pattern, so a filtered response shows how many controls it left out.
| Parameter | Type | Description |
|---|---|---|
framework | string | Optional. Up to five framework IDs, comma-separated |
emphasis | string | Optional. critical, important or standard, comma-separated |
Example:
GET /api/v1/patterns/SP-023/crosswalk?framework=iec_62443,cra&emphasis=critical IDs are accepted in either form: SP-023 or sp-023, SC-07 or sc-7, iec_62443 or iec-62443.
Controls
/api/v1/controls List the NIST SP 800-53 Rev 5 controls with optional filtering. The controls that NIST has withdrawn are included, each marked withdrawn.
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
per_page | integer | Items per page (default: 20, max: 100) |
family | string | NIST family code (e.g. AC, IA, SC, SR) |
baseline | string | Filter by NIST baseline: low, moderate, high |
search | string | Search name, ID, family name, and description |
/api/v1/controls/:id Get full control detail including compliance mappings and which patterns use it. withdrawn says whether NIST has withdrawn the control, and incorporated_into names the controls its content moved into. attack gives the number of MITRE ATT&CK techniques the control mitigates in CTID's mapping, with the route that lists them.
| Parameter | Type | Description |
|---|---|---|
fields | string | Optional. patterns for reverse lookup, mappings for compliance only, enhancements for NIST's enhancements of the control, attack for the MITRE ATT&CK techniques it mitigates in CTID's mapping |
Example:
GET /api/v1/controls/AC-02?fields=patterns /api/v1/crosswalk Line up a set of SP 800-53 controls against up to five frameworks in one call, for example your own controls once you have mapped them to SP 800-53 (how). For each framework it lists the matching clauses (clauses_reached) and the gaps (clauses_not_reached) in the framework's own order, with the SP 800-53 controls that map to each gap (controls_for_not_reached). For each control it lists the control's clauses. Check each matching clause against the framework's own text. Where OSA's mapping starts from a published crosswalk, based_on names it and a control's osa_own lists the clauses OSA adds. For a withdrawn control outside OSA's catalogue, such as SA-12, withdrawn_by_nist names what NIST moved it into.
| Parameter | Type | Description |
|---|---|---|
controls | string | Required. Comma-separated base control ids, up to 320 |
framework | string | Required. Comma-separated framework ids, up to five |
Example:
GET /api/v1/crosswalk?controls=AC-02,IA-02,SI-04&framework=nis2,iso_27001_2022 MITRE ATT&CK
MITRE ATT&CK Enterprise with the NIST SP 800-53 controls that CTID's mapping relates to each technique, from osa-data's data/mitre-attack. See what the data is and the matrix.
/api/v1/attack The ATT&CK version, the sources and their licences, counts, and the tactics with how many of their techniques have a control.
/api/v1/attack/techniques Techniques and sub-techniques, each with its CTID status (mapped, non_mappable, unmapped) and its number of controls.
| Parameter | Type | Description |
|---|---|---|
tactic | string | Tactic id, for example TA0001 |
control | string | Only the techniques this control mitigates |
ctid | string | mapped, non_mappable or unmapped |
search | string | Search technique id and name |
per_page | integer | Items per page (default: 100, max: 1000) |
/api/v1/attack/techniques/:id One technique: MITRE's description, its SP 800-53 controls, MITRE's mitigations and detection strategies, the groups MITRE records using it, its sub-techniques, and the OSA patterns ranked by how many of its controls they include. The same as a card at /attack/t1566.md.
Example:
GET /api/v1/attack/techniques/T1566 Compliance Frameworks
/api/v1/frameworks List all 90 supported compliance frameworks with mapping statistics.
/api/v1/frameworks/:id Get framework detail. Use fields=mappings for paginated control-to-framework mappings.
Available framework IDs:
iso_27001_2022iso_27002_2022cobit_2019cis_controls_v8nist_csf_2soc2_tscpci_dss_v4csa_ccm_v4csa_aicmfinos_ccciso_42001_2023nist_ai_rmf_1eu_ai_actiec_62443nis2pra_op_resiliencemas_trmapra_cps_234asd_e8bsi_grundschutzanssifinma_circularosfi_b13gdprdorabio2rbi_csffisclgpd_bcbhkma_tme1mlps_2dnb_good_practicecraswift_cscfsama_csfnca_eccuae_iacbb_tmqatar_niacbuaecbe_csfsa_js2cbn_csfbog_cisdpopiabom_ctrmiosco_cyberbcbs_239cpmi_pfmiffiec_isnydfs_500hipaa_srecb_croeeba_ictsebi_cscrfbot_cybercmmc_2nerc_cipnrc_73_54tsa_psdieee_1686ferc_cipdoe_c2m2api_1164awiaiaea_nsspci_ptsfips_140cbesttiber_eupci_hsmcommon_criteriaisae_3402solvency_iilloyds_msnaic_dspra_ss1_23fca_sysc_13hitrust_csffda_21_cfr_11fda_cyberiso_27799nhs_dsptowasp_masvs_v2ccss_v9micabasel_sco60bsscsec_custody_digitaldpdpa Example:
GET /api/v1/frameworks/pci_dss_v4?fields=mappings&per_page=50 Follows
Follow patterns and frameworks to track updates. Requires authentication (browser session or API key).
Patterns
/api/v1/patterns/follows List all patterns the authenticated user is following. Returns pattern IDs and follow timestamps.
/api/v1/patterns/:id/follow Follow a pattern. Idempotent — following an already-followed pattern succeeds silently.
/api/v1/patterns/:id/follow Unfollow a pattern. Idempotent — unfollowing an unfollowed pattern succeeds silently.
/api/v1/patterns/:id/followers Public endpoint returning the follower count for a pattern. Cached for 5 minutes.
Frameworks
/api/v1/frameworks/follows List all frameworks the authenticated user is following.
/api/v1/frameworks/:id/follow Follow a framework. Idempotent.
/api/v1/frameworks/:id/follow Unfollow a framework. Idempotent.
/api/v1/frameworks/:id/followers Public endpoint returning the follower count for a framework. Cached for 5 minutes.
Key Management
These endpoints require authentication (browser session or API key).
/api/v1/keys List your API keys (name, prefix, tier, rate limit, timestamps). The full key is never returned.
/api/v1/keys Create a new API key. Maximum 5 active keys per account.
Request:
POST /api/v1/keys
Content-Type: application/json
Cookie: session=...
{
"name": "My Integration"
} Response (201):
{
"key": "osa_abc123...",
"data": {
"id": "2fd2564e0e21...",
"name": "My Integration",
"prefix": "osa_abc1",
"tier": "free",
"rate_limit": 100,
"created_at": "2026-02-12T09:00:00Z"
}
} The full key is returned only once at creation. Store it securely — it cannot be retrieved later.
/api/v1/keys/:id Revoke an API key. Revoked keys are immediately rejected on authenticated endpoints. Returns 204 on success.
Response Format
List Response
{
"data": [...],
"pagination": {
"page": 1,
"per_page": 20,
"total": 44,
"total_pages": 3
}
} Detail Response
{
"data": {
"id": "SP-029",
"title": "Zero Trust Architecture",
"description": "...",
"controls": [...],
"threats": [...]
}
} Error Response
{
"error": "Pattern SP-999 not found"
} Rate Limited
HTTP 429
Retry-After: 42
X-RateLimit-Limit: 60
{
"error": "Rate limit exceeded (60/min for anonymous access). Sign in or use an API key for higher limits."
} Quick Start
# List all patterns
curl https://www.opensecurityarchitecture.org/api/v1/patterns
# Get Zero Trust pattern with threats
curl https://www.opensecurityarchitecture.org/api/v1/patterns/SP-029?fields=threats
# List controls in the Access Control family
curl https://www.opensecurityarchitecture.org/api/v1/controls?family=AC
# Get PCI DSS v4 mappings
curl https://www.opensecurityarchitecture.org/api/v1/frameworks/pci_dss_v4?fields=mappings
# Search patterns
curl "https://www.opensecurityarchitecture.org/api/v1/patterns?search=authentication"
# Use an API key for authenticated endpoints
curl -H "X-API-Key: osa_your_key_here" \
https://www.opensecurityarchitecture.org/api/v1/keys