REST API reference for Production Readiness Audit System
https://api.production-audit.devAll API endpoints are relative to this base URL.
Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY/api/healthCheck API health and availability
{
"status": "ok",
"version": "0.1.0",
"uptime": 123456
}/api/auditQueue a production readiness audit for a local project
{
"projectPath": "/path/to/project",
"options": {
"ux": true,
"format": "json",
"cache": true
}
}{
"success": true,
"auditId": "audit_abc123",
"status": "queued",
"message": "Audit queued successfully",
"estimatedTime": "30s"
}/api/audit/:idRetrieve audit results by ID
{
"success": true,
"audit": {
"id": "audit_abc123",
"projectPath": "/path/to/project",
"projectName": "my-app",
"status": "completed",
"createdAt": "2026-01-12T14:00:00Z",
"completedAt": "2026-01-12T14:00:30Z",
"score": {
"overall": 8.5,
"dimensions": {
"realData": 9,
"integrations": 8,
"features": 7.5,
"errorHandling": 8.5,
"testing": 9,
"security": 9.5,
"buildHealth": 10,
"documentation": 7,
"uxPolish": 8
}
},
"metrics": {
"totalFiles": 150,
"filesScanned": 150,
"mocksDetected": 2,
"missingIntegrations": 3,
"stubsFound": 1,
"missingTests": 5,
"buildErrors": 0,
"securityIssues": 0,
"uxIssues": 4
}
}
}/api/teamsGet all teams for the authenticated user
{
"success": true,
"teams": [
{
"id": "team_123",
"name": "Engineering Team",
"slug": "engineering",
"plan": "pro",
"role": "owner",
"memberCount": 5
}
]
}/api/teamsCreate a new team
{
"name": "Engineering Team",
"description": "Our development team",
"plan": "pro"
}{
"success": true,
"team": {
"id": "team_123",
"name": "Engineering Team",
"slug": "engineering-team",
"plan": "pro",
"maxSeats": 10
}
}/api/teams/:teamId/membersGet all members of a team
{
"success": true,
"members": [
{
"id": "user_123",
"email": "user@example.com",
"fullName": "John Doe",
"role": "developer",
"joinedAt": "2026-01-01T00:00:00Z"
}
]
}/api/github/installationsRegister a GitHub App installation
{
"installationId": 12345678,
"setupAction": "install"
}{
"success": true,
"message": "Installation registered successfully",
"installation": {
"id": 12345678,
"account": "my-org",
"repos": [
"repo1",
"repo2"
]
}
}/api/github/webhookReceive GitHub webhook events (internal use)
{
"success": true,
"message": "Webhook processed"
}Request validation failed
{
"success": false,
"error": "VALIDATION_ERROR",
"message": "Invalid request: projectPath is required"
}Missing or invalid authentication
{
"success": false,
"error": "UNAUTHORIZED",
"message": "Authentication required"
}Insufficient permissions
{
"success": false,
"error": "FORBIDDEN",
"message": "You do not have permission to access this resource"
}Resource not found
{
"success": false,
"error": "NOT_FOUND",
"message": "Audit not found"
}Too many requests
{
"success": false,
"error": "RATE_LIMITED",
"message": "Rate limit exceeded. Try again in 60 seconds."
}Internal server error
{
"success": false,
"error": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
}| Plan | Requests/Hour | Audits/Month |
|---|---|---|
| Free | 100 | 10 |
| Pro | 1,000 | Unlimited |
| Team | 5,000 | Unlimited |
import { PrasClient } from '@te-code/pras-sdk'
const client = new PrasClient({
apiKey: process.env.PRAS_API_KEY
})
// Run an audit
const result = await client.audit.run({
projectPath: './my-app',
options: { ux: true, format: 'json' }
})
console.log('Audit ID:', result.auditId)
// Get audit results
const audit = await client.audit.get(result.auditId)
console.log('Score:', audit.score.overall)from pras import PrasClient
client = PrasClient(api_key=os.environ['PRAS_API_KEY'])
# Run an audit
result = client.audit.run(
project_path='./my-app',
options={'ux': True, 'format': 'json'}
)
print(f'Audit ID: {result.audit_id}')
# Get audit results
audit = client.audit.get(result.audit_id)
print(f'Score: {audit.score.overall}')# Run an audit
curl -X POST https://api.production-audit.dev/api/audit \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"projectPath": "/path/to/project",
"options": {"ux": true, "format": "json"}
}'
# Get audit results
curl -X GET https://api.production-audit.dev/api/audit/audit_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"