Demonstrates how to use setup hooks to prepare data and configuration before API execution.
| API | Description |
|---|---|
demo-hook |
Demonstrates how setup hook data is passed to and used within an API handler |
uv syncIf the intuned CLI is not installed, install it globally:
npm install -g @intuned/cliAfter installing dependencies, intuned command should be available in your environment.
intuned dev run api demo-hook .parameters/api/demo-hook/default.jsonintuned dev provisionintuned dev deploy/
├── api/
│ └── demo-hook.py # Demo API showing hook data usage
├── hooks/
│ └── setup_context.py # Main setup hook executed before API runs
├── utils/
│ └── types_and_schemas.py # Pydantic models and type definitions
├── intuned-resources/
│ └── jobs/
│ └── demo-hook.job.jsonc # Job definition for demo-hook API
├── .parameters/api/ # Test parameters
├── Intuned.jsonc # Project config
├── pyproject.toml # Python dependencies
└── README.md