API Documentation
Table of Contents
Installation
PyPI Installation
Docker Installation
CLI Reference
Global Options
Commands
exec - Execute InSpec Profile
exec - Execute InSpec Profileconvert - Convert InSpec Profile to Ansible Collection
convert - Convert InSpec Profile to Ansible Collectionsupermarket - Interact with Chef Supermarket
supermarket - Interact with Chef SupermarketREST API Server
Base URL
Starting the Server
Authentication
Role-Based Access Control (RBAC)
Authentication Endpoints
GET /health
GET /api/v1
GET /api/v1/auth/login
POST /api/v1/auth/password-login
GET /api/v1/auth/callback
GET /api/v1/auth/me
POST /api/v1/auth/logout
Job Template Endpoints
GET /api/v1/job-templates
POST /api/v1/job-templates
GET /api/v1/job-templates/{template_id}
PUT /api/v1/job-templates/{template_id}
DELETE /api/v1/job-templates/{template_id}
POST /api/v1/job-templates/{template_id}/launch
Job Endpoints
GET /api/v1/jobs
POST /api/v1/jobs
GET /api/v1/jobs/{job_id}
VCS Credential Endpoints
POST /api/v1/vcs/credentials
GET /api/v1/vcs/credentials
DELETE /api/v1/vcs/credentials/{credential_id}
VCS Repository Endpoints
POST /api/v1/vcs/repositories
GET /api/v1/vcs/repositories
POST /api/v1/vcs/repositories/{repo_name}/sync
DELETE /api/v1/vcs/repositories/{repo_name}
GET /api/v1/vcs/repositories/{repo_name}/history
GET /api/v1/vcs/repositories/{repo_name}/files
GET /api/v1/vcs/repositories/{repo_name}/files/{file_path}
Webhook Endpoints
POST /api/v1/webhooks/github/{repo_name}
POST /api/v1/webhooks/gitlab/{repo_name}
User Management Endpoints
GET /api/v1/users
PUT /api/v1/users/{user_id}
Monitoring Endpoints
GET /api/v1/storage/validation-status
GET /metrics
API Examples
Complete Workflow Example
Python Client Example
Python API
Basic Usage
Core Classes
ExecutionConfig
ExecutionResult
Runner
ProfileConverter
Reporters
InSpec JSON Reporter
InSpecJSONReport
InSpecControl
InSpecProfile
InSpecPlatform
InSpecStatistics
HTML Reporter
JUnit Reporter
Converters
Profile Conversion
Profile Structure Analysis
Control ID Handling
Custom Resource Handling
Conversion Workflow
Bug Fixes and Testing
Bug #1: Control ID Regex Pattern Fix (v0.1.6)
Problem
Root Cause
Solution
Impact
Testing
Verification
References
Examples
Example 1: Local Compliance Check
Example 2: Multi-Host Compliance
Example 3: Convert and Deploy
Example 4: CI/CD Integration
Example 5: Custom Reporting
Example 6: Chef Supermarket Integration
Configuration
Environment Variables
Ansible Configuration
Error Handling
Support and Resources
License
Last updated