Inflectra Internal Tool
Spira Project
Setup Tool
Automated Spira environment provisioning
via the REST API — driven by a JSON config file
DERMOT CANNIFFE · MAY 2026
Today's agenda
- 1 The problem we're solving
- 2 What the tool does
- 3 How it works
- 4 The AI angle
- 5 Questions
The problem
Every new Spira engagement starts the same way.
- SE or PS engineer logs into Spira admin UI
- Manually creates programs, products, releases
- Manually configures custom fields — one by one
- Manually creates test folders and populates test cases
- Repeats this for every client, every environment, every phase
This is slow, error-prone, and impossible to version-control.
At scale it gets worse
What we want
- Consistent environments across clients
- Reproducible setups for demos and PoCs
- Fast onboarding for new engagements
- A record of what was provisioned
What we get
- Inconsistent naming conventions
- Missing custom fields
- No audit trail
- Knowledge locked in one person's head
The solution
A config-driven Python script that provisions a complete Spira project structure via the REST API v7.
Define your structure in a JSON file. Run one command. Done.
- Creates products, releases, custom fields, folders, and test cases
- Fully idempotent — safe to re-run, skips what already exists
- One JSON file per client — version-controlled, shareable, auditable
- Multiple structure files supported — one repo, many clients
The structure file
A single JSON file describes everything to be created.
{
"program": {
"name": "Oetker Portfolio",
"products": [{
"name": "Oetker Boost phase A",
"releases": [
{ "name": "Oetker Boost phase A - Release 1" },
{ "name": "Oetker Boost phase A - Release 2" }
],
"customFields": {
"testCases": [{ "name": "Transaction Code",
"type": "list", "values": ["VA01","ZVA01"] }],
"testSets": [{ "name": "Country",
"type": "list", "values": ["DE","IT","FR"] }]
},
"testFolders": [{
"name": "Oetker SD",
"testCases": [
{ "name": "Create Standard Sales Order",
"description": "Verify VA01 creates a sales order." }
]
}]
}]
}
}
How it works
1
Load credentials from .env and validate connection to Spira
2
Read the structure JSON file
3
Verify the program exists in Spira (must be created manually — API limitation)
4
For each product: create it, resolve its template, then create releases, custom fields, folders, and test cases
5
Print a full summary of everything created
Each step checks for existing resources first — re-running is always safe.
Code architecture
Thin client + service layer + runner. Each layer has one job.
spira_setup/
├── client.py ← all HTTP: auth, retries, error handling
├── runner.py ← reads JSON, orchestrates everything
└── services/
├── projects.py ← create/find products & programs
├── releases.py ← create releases
├── templates.py ← custom lists & custom properties
└── test_cases.py ← folders & test cases
- Adding a new artifact type = one new service file
- API version change = one file to update (
client.py)
- New client = one new JSON file, zero code changes
The AI angle New
The structure file has a formal JSON Schema. Any LLM can generate a valid file from a plain-English brief.
"Generate a Spira structure file for a logistics client. Two products — WMS and TMS.
Releases for Q3 and Q4 2025. Test cases covering order creation, shipment tracking,
and returns. Add a Country field (DE, IT, FR) to test sets."
- Works with ChatGPT, Claude, Kiro, Copilot — any LLM
- Schema enforces correctness: required fields, valid types, no extra keys
- SE or AM describes the client's needs → LLM produces a ready-to-run file
- VS Code autocomplete and validation included for free
End-to-end workflow
SE / AM
Describes client needs to an LLM
→
LLM
Generates structure.json from schema
→
SE / AM
Reviews structure file
→
→
Spira
Fully provisioned in seconds
From brief to live Spira environment — without touching the admin UI.
Questions?
BUILT WITH PYTHON · SPIRA REST API V7 · REVEAL.JS