The dynamic API endpoint generation system automatically creates FastAPI endpoints from workflow metadata. This creates a single source of truth for workflow definitions and provides excellent maintainability.
The WorkflowMetadataMixin allows workflows to define their API metadata directly in the workflow class:
workflow_description: Human-readable descriptionworkflow_input_class: Pydantic input modelworkflow_api_endpoint: API endpoint pathworkflow_namespace: Workflow namespaceThe dynamic API generator:
All workflows use the metadata system, including:
/ngc/backup - “Backup network device configuration to Config Store”/ngc/deploy - “Deploy intended configuration to network device with approval workflow”/ngc/vpc_creation - “Create VPC with route distinguisher assignment and VRF provisioning”/ngc/vpc_deletion - “Delete VPC and associated VRFs with validation checks”/ngc/reprovision - “Reprovision network device using ZTP and perform post-provision backup”/ngc/connected_host_metadata - “Discover and analyze connected hosts through MAC table and LLDP neighbor data”/hello_world - “Simple hello world workflow for testing and demonstration”/hello_world_approval - “Hello world workflow with approval step for testing staged workflows”WorkflowMetadataMixin to the workflow classREGISTERED_WORKFLOWS listsrc/nv_config_manager/temporal/common/mixins/metadata.py)src/nv_config_manager/temporal/api/dynamic_endpoints.py)The workflow is now automatically:
/v1/workflow/ngc/my_new_workflowuv run workflow-cli my-new-workflowReturns metadata for all registered workflows.
Returns the list of registered workflow type names.
The following endpoint returns metadata for a specific registered workflow:
The dynamic API system provides a clean, maintainable approach to workflow management. By defining metadata directly in workflow classes, the system automatically generates consistent APIs, CLI commands, and documentation. This approach scales well as new workflows are added and ensures consistency across all interfaces.