> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.nvidia.com/switch-infrastructure/config-manager/services/network-ztp/ztp-api/llms.txt. # Config Manager ZTP APIs ## Overview The NVIDIA Config Manager ZTP Server provides REST API endpoints for network device Zero Touch Provisioning (ZTP). The API serves boot scripts, rendered configurations, firmware images, and manages the provisioning workflow. The API has three endpoint groups. The API reference documents every endpoint. ### Device Endpoints Device-specific endpoints for boot scripts, configurations, firmware, and provisioning status: * `GET /v1/device/{device_uuid}/boot-script` - Retrieve boot script * `GET /v1/device/{device_uuid}/config/{configlet}` - Retrieve configuration file * `GET /v1/device/{device_uuid}/firmware` - Download firmware image * `GET /v1/device/{device_uuid}/firmware/checksum` - Get firmware checksum * `POST /v1/device/{device_uuid}/provisioned` - Mark device as provisioned * `POST /v1/device/{device_uuid}/validate_serial` - Validate device serial number Boot-script and serial-validation requests for a device ID that does not identify an existing device return HTTP 404 with a missing-device message. Serial validation ignores case and trims surrounding whitespace. Both the reported serial and the DCIM serial must contain at least four characters. Either value may include a part-number prefix: validation succeeds when one value ends with the other. Shorter values or mismatches return HTTP 400. The source-IP-authorized SFTP service exposes the same rendered configuration at `/device/{device_uuid}/{configlet}` on TCP 2222. The default Cumulus boot script retrieves `/device/{device_uuid}/startup.yaml` over SFTP; the HTTP API remains available for compatibility. The SFTP server offers both RSA and ECDSA host keys. Clients must support RSA SHA-2 or ECDSA: the bundled Paramiko 5 implementation no longer supports the `ssh-rsa` SHA-1 signature algorithm. Cumulus clients without RSA SHA-2 support can negotiate ECDSA. If host-key negotiation fails, check the client's supported algorithms before changing configuration or credentials. ### Firmware Endpoints Platform and version-based firmware access: * `GET /v1/firmware/{platform}/{version}` - Download firmware by platform/version * `GET /v1/firmware/{platform}/{version}/checksum` - Get firmware checksum ### File Endpoints Generic file storage and retrieval: * `GET /v1/files/{platform}/{version}/{filename}` - Download file * `GET /v1/files/{platform}/{version}/{filename}/checksum` - Get file checksum * `GET /v1/files/{platform}/{version}/` - List files for platform/version * `GET /v1/files/` - List all files * `POST /v1/files/{platform}/{version}/{filename}` - Upload file ## Base URL Contact your system administrator for the ZTP server URL for your environment. ## Authentication and Authorization ### Device Endpoints The device-specific endpoints listed above accept either a device-originated request or an authenticated user request: * Device-originated requests must come from an IP address associated with the device in the selected DCIM provider * User-originated requests must come through the Envoy gateway as an authenticated user when SSO is enabled for the deployment ### Admin Endpoints Admin endpoints (file uploads, sync triggers) require an authenticated user request through the Envoy gateway when SSO is enabled for the deployment. ## Error Responses All endpoints may return standard HTTP error codes: * `400 Bad Request`: Invalid request parameters or body * `403 Forbidden`: Authorization failure * `404 Not Found`: Resource not found * `500 Internal Server Error`: Server error Error responses include a JSON body with error details: ```json { "detail": "Error message describing what went wrong" } ``` ## Streaming Responses Endpoints that return large files use streaming responses: * Files are streamed instead of loaded into memory. * The server cleans up resources if the client disconnects. ## OpenAPI Documentation Interactive API documentation is available at: * Swagger UI: `https://ztp.example.com/docs` * ReDoc: `https://ztp.example.com/redoc` The FastAPI application generates the OpenAPI schema. ## API Docs - [Healthcheck](https://docs.nvidia.com/switch-infrastructure/config-manager/services/network-ztp/ztp-api/healthcheck-healthcheck-get.md): ZTP API - [Current User Info](https://docs.nvidia.com/switch-infrastructure/config-manager/services/network-ztp/ztp-api/whoami-whoami-get.md): ZTP API - [Load Bootscript](https://docs.nvidia.com/switch-infrastructure/config-manager/services/network-ztp/ztp-api/device/load-bootscript-v-1-device-device-uuid-boot-script-get.md): ZTP API > device - [Load Configuration](https://docs.nvidia.com/switch-infrastructure/config-manager/services/network-ztp/ztp-api/device/load-configuration-v-1-device-device-uuid-config-configlet-get.md): ZTP API > device - [Load Firmware](https://docs.nvidia.com/switch-infrastructure/config-manager/services/network-ztp/ztp-api/device/load-firmware-v-1-device-device-uuid-firmware-get.md): ZTP API > device - [Load Firmware Checksum](https://docs.nvidia.com/switch-infrastructure/config-manager/services/network-ztp/ztp-api/device/load-firmware-checksum-v-1-device-device-uuid-firmware-checksum-get.md): ZTP API > device - [Mark Provisioned](https://docs.nvidia.com/switch-infrastructure/config-manager/services/network-ztp/ztp-api/device/mark-provisioned-v-1-device-device-uuid-provisioned-post.md): ZTP API > device - [Validate Serial](https://docs.nvidia.com/switch-infrastructure/config-manager/services/network-ztp/ztp-api/device/validate-serial-v-1-device-device-uuid-validate-serial-post.md): ZTP API > device - [List All Files](https://docs.nvidia.com/switch-infrastructure/config-manager/services/network-ztp/ztp-api/files/list-all-files-v-1-files-get.md): ZTP API > files - [List Files](https://docs.nvidia.com/switch-infrastructure/config-manager/services/network-ztp/ztp-api/files/list-files-v-1-files-platform-version-get.md): ZTP API > files - [Load Object](https://docs.nvidia.com/switch-infrastructure/config-manager/services/network-ztp/ztp-api/files/load-object-v-1-files-platform-version-filename-get.md): ZTP API > files - [Upload File](https://docs.nvidia.com/switch-infrastructure/config-manager/services/network-ztp/ztp-api/files/upload-file-v-1-files-platform-version-filename-post.md): ZTP API > files - [Check Object](https://docs.nvidia.com/switch-infrastructure/config-manager/services/network-ztp/ztp-api/files/check-object-v-1-files-platform-version-filename-head.md): ZTP API > files - [Load Checksum](https://docs.nvidia.com/switch-infrastructure/config-manager/services/network-ztp/ztp-api/files/load-checksum-v-1-files-platform-version-filename-checksum-get.md): ZTP API > files - [Load Firmware](https://docs.nvidia.com/switch-infrastructure/config-manager/services/network-ztp/ztp-api/firmware/load-firmware-v-1-firmware-platform-version-get.md): ZTP API > firmware - [Load Firmware Checksum](https://docs.nvidia.com/switch-infrastructure/config-manager/services/network-ztp/ztp-api/firmware/load-firmware-checksum-v-1-firmware-platform-version-checksum-get.md): ZTP API > firmware ## OpenAPI Specification - [OpenAPI JSON](https://docs.nvidia.com/switch-infrastructure/config-manager/openapi.json): raw OpenAPI 3.1 specification for this API, JSON format - [OpenAPI YAML](https://docs.nvidia.com/switch-infrastructure/config-manager/openapi.yaml): raw OpenAPI 3.1 specification for this API, YAML format