Programmatic Access
Recertification cycles can be managed through the CLI, the Python SDK, and the MCP server — enabling automation, CI/CD integration, and AI-assisted governance workflows.
CLI
The qarion recertification command group provides full lifecycle management from the terminal.
Quick Reference
| Command | Description |
|---|---|
qarion recertification list SPACE | List cycles in a space |
qarion recertification get SPACE CYCLE_ID | Get cycle detail with audits |
qarion recertification create SPACE --name ... --due-date ... | Create a new cycle |
qarion recertification populate SPACE CYCLE_ID | Populate audit items |
qarion recertification complete SPACE CYCLE_ID | Mark cycle as completed |
qarion recertification cancel SPACE CYCLE_ID | Cancel a cycle |
qarion recertification review AUDIT_ID --status ... | Approve or reject an audit |
Example: Create and Populate a Cycle
# Create a product cycle with a Q1 deadline
qarion recertification create marketing-analytics \
--name "Q1 2026 PII Review" \
--due-date "2026-03-31T23:59:59Z" \
--type product
# Populate with matching resources
qarion recertification populate marketing-analytics <CYCLE_ID>
Example: Approve All Pending Audits
# Get cycle detail as JSON, extract pending audit IDs, approve each
CYCLE=$(qarion --json recertification get marketing-analytics <CYCLE_ID>)
echo "$CYCLE" | jq -r '.audits[] | select(.status == "pending") | .id' | \
while read -r AUDIT_ID; do
qarion recertification review "$AUDIT_ID" --status approved
done
Use --json to get machine-readable output for scripting.
Python SDK
The SDK provides both async and sync clients for all recertification operations.
Async Example
from qarion import QarionClient
async with QarionClient(api_key="your-api-key") as client:
# Create a cycle
cycle = await client.recertification.create_cycle(
"marketing-analytics",
name="Q1 2026 Review",
due_date="2026-03-31T23:59:59Z",
)
# Configure filters
await client.recertification.update_config(
"marketing-analytics",
cycle.id,
filters={"tags": ["pii"], "criticality": ["High"]},
)
# Populate and review
await client.recertification.populate_cycle("marketing-analytics", cycle.id)
detail = await client.recertification.get_cycle("marketing-analytics", cycle.id)
for audit in detail.audits:
await client.recertification.review_audit(
audit.id, status="approved",
)
await client.recertification.complete_cycle("marketing-analytics", cycle.id)
Sync Example
from qarion import QarionSyncClient
client = QarionSyncClient(api_key="your-api-key")
cycles = client.recertification.list_cycles("marketing-analytics")
for c in cycles:
print(f"{c.name}: {c.reviewed_count}/{c.audit_count}")
client.close()
Available Methods
| Method | Description |
|---|---|
create_cycle | Create a new cycle |
list_cycles | List all cycles |
get_cycle | Get cycle detail with audits |
update_config | Update filters and templates |
delete_cycle | Permanently delete a cycle |
populate_cycle | Auto-populate audit items |
recertify_all | Bulk-create requests for all pending audits |
archive_cycle / unarchive_cycle | Archive/restore a cycle |
complete_cycle / cancel_cycle | Change cycle status |
get_filter_suggestions | Get autocomplete values for filters |
review_audit | Approve or reject an audit item |
create_audit_request | Create a request for a single audit |
For full method signatures and models, see the SDK Reference.
MCP Server
The Qarion MCP server exposes recertification operations as tools, enabling AI assistants (e.g., Claude, Copilot) to manage recertification cycles.
Available Tools
| Tool | Description |
|---|---|
list_recertification_cycles | List cycles in a space |
get_recertification_cycle | Get cycle detail |
create_recertification_cycle | Create a new cycle |
populate_recertification_cycle | Populate audit items |
complete_recertification_cycle | Mark cycle as completed |
cancel_recertification_cycle | Cancel a cycle |
review_recertification_audit | Approve or reject an audit |
Example Prompt
"List the recertification cycles in the marketing-analytics space and show me which ones have pending audits."
The MCP tools accept the same parameters as the SDK methods and return JSON responses.
Use Cases
Scheduled Reviews via CI/CD
Create a cron job or CI/CD pipeline that automatically creates and populates a cycle at the start of each quarter:
# Runs on the first day of each quarter
qarion recertification create marketing-analytics \
--name "$(date +%Y)-Q$((($(date +%-m)-1)/3+1)) Review" \
--due-date "$(date -v+90d +%Y-%m-%dT23:59:59Z)" \
--type product
# Populate immediately
qarion recertification populate marketing-analytics <CYCLE_ID>
Automated Compliance Reporting
Use the SDK to pull cycle data and feed it into compliance dashboards:
cycles = await client.recertification.list_cycles("marketing-analytics")
completed = [c for c in cycles if c.status == "completed"]
for c in completed:
detail = await client.recertification.get_cycle("marketing-analytics", c.id)
approved = sum(1 for a in detail.audits if a.status == "approved")
print(f"{c.name}: {approved}/{c.audit_count} approved")