<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
<!-- NERF is a trademark of defconxt. -->

# API Reference — Performing Identity Attack Path Analysis

## Attack Path Analysis APIs

### BloodHound CE API

| Endpoint | Description |
|---|---|
| `POST /api/v2/graphs/shortest-path` | Find shortest path between nodes |
| `GET /api/v2/graphs/search?query=...` | Search graph nodes |
| `POST /api/v2/file-upload/start` | Upload collection data |
| `GET /api/v2/asset-groups` | List asset groups |

### Microsoft Graph — Permissions and Roles

| Endpoint | Description |
|---|---|
| `GET /directoryRoles` | List directory roles |
| `GET /directoryRoles/{id}/members` | Role members |
| `GET /groups/{id}/transitiveMembers` | Transitive group members |
| `GET /servicePrincipals/{id}/appRoleAssignments` | App role assignments |

### Agent Script

```bash
# Collect graph data
node agent.js collect --source entra --output entra_graph.json

# Find attack paths
node agent.js find-paths --target global_admin --max-depth 5

# Get remediation recommendations
node agent.js remediate --paths-file attack_paths.json
```
