API Reference
Complete API documentation for the Praetor platform
OpenAPI Specification
The Praetor API follows OpenAPI 3.0 standards. Download the complete specification:
Download OpenAPI SpecAuthentication
All API requests require authentication using a Bearer token or API key. Include your token in the Authorization header:
Authorization: Bearer YOUR_API_TOKENAlternatively, use an API key via the X-API-Key header:
X-API-Key: YOUR_API_KEYMCP Server Integration
Praetor provides a Model Context Protocol (MCP) server that integrates seamlessly with Claude Code. The MCP server exposes 60+ tools for code analysis, specification management, and brownfield convergence.
Available Tool Categories
- audit.* - Code quality auditing and convergence analysis
- code.* - Code scanning (files, symbols, dependencies)
- findings.* - Security and quality findings management
- convergence.* - Spec-to-code convergence tracking
- obligations.* - Implementation obligation tracking
- standards.* - Coding standards validation
- playbook.* - Test automation and quality playbooks
- test.* - E2E test execution and validation
Installation & Setup
- Generate an API key in your Developer Settings
- Install the MCP package:
npm install -g @strata19/mcp - Create a
.praetor/config.yamlfile with your API key - Register with Claude Code:
claude mcp add praetor-audit --command "praetor-mcp" - Verify:
claude mcp list
For step-by-step instructions with pre-filled API key, visit your Developer Settings.
Base URL
All API endpoints are relative to the base URL:
https://your-instance.praetor.app/apiMain Resources
Projects
Manage specification projects.
GET /projects- List all projectsPOST /projects- Create a new projectGET /projects/:id- Get project detailsPATCH /projects/:id- Update a projectDELETE /projects/:id- Delete a project
User Stories
Access generated user stories and specifications.
GET /userstories- List user storiesPOST /userstories- Create a user storyGET /userstories/:id- Get story detailsPATCH /userstories/:id- Update a story
Kits
Manage code generation kits.
GET /kits- List available kitsPOST /kits- Create a new kitGET /kits/:id- Get kit detailsPATCH /kits/:id- Update a kit
Workflows
Orchestrate multi-agent workflows.
GET /workflows- List workflowsPOST /workflows- Start a workflowGET /workflows/:id- Get workflow statusPOST /workflows/:id/cancel- Cancel a workflow
Response Format
All API responses follow a consistent JSON structure:
{
"data": { /* resource data */ },
"meta": {
"requestId": "uuid",
"timestamp": "2024-02-24T00:00:00Z"
}
}Error Handling
Errors return appropriate HTTP status codes with details:
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters",
"details": { /* additional context */ }
}
}Rate Limiting
API requests are rate limited to 1000 requests per hour per user. Rate limit information is included in response headers:
X-RateLimit-Limit- Total requests allowedX-RateLimit-Remaining- Requests remainingX-RateLimit-Reset- Unix timestamp when limit resets
Interactive Documentation
For an interactive API explorer with request/response examples, try the OpenAPI specification with your preferred API client (Postman, Insomnia, etc.).
Need Help?
Check out the full documentation for guides, tutorials, and best practices.