AI Model Management
Overview
This tutorial walks through the 7-AI-Model-Mgmt collection — creating an AI model, registering an
edition and uploading its binary via the resumable TUS protocol, deploying the verified edition to a
WEDA Node device, and tearing it down. For the concepts behind the upload/deploy pipeline (TUS,
hash verification, the apply-pipeline hooks), see
AI Model Management — Upload and Deploy.
Prerequisites
- Completed Get Access Token —
accessTokenis set - Completed Manage Organizations —
org_idis set - A WEDA Node device registered and
Activated—deviceIdis set (for the deploy steps) - The model binary file, plus its
fileName,fileSize(bytes), andfileHash(64-char lowercase SHA-256)
Auto-captured Variables
| Variable | Set by | Used by |
|---|---|---|
modelId | Create Model / List Models | Edition, upload, deploy, teardown |
uploadId | Register New Model Edition | Create Upload Session, Check Upload Status |
uploadIdB64 | Register New Model Edition / Create Upload Session | Create Upload Session (Upload-Metadata) |
tusId | Create Upload Session | Upload Session File |
createdDeploymentId | Deploy Model File | Deployment tracking |
Variables You Set
| Variable | Description |
|---|---|
modelName | Name of the model to create (unique within the Org) |
modelEdition | Edition string, e.g. 1.0.3 |
fileName / fileSize / fileHash | The binary's name, size in bytes, and SHA-256 hash |
deviceId | Target device for deployment |
In Deploy Model File, edit the request body's targets[].deviceIdList and the applyCmd
container name to match your device and running container.
tusId and uploadId refer to the same upload resource in the current release — Postman just
captures each one separately (one from the Location header, one from Register Edition's
response). If you're scripting your own requests, you can use either interchangeably.
Upload the Model
1. Create Model
Creates a new model record under the Org.
- API: Create Model
- Script:
modelIdsaved to environment automatically - Result:
201 Created(or409 Conflictif the name already exists — use List Models to reuse themodelId)
2. List Models
Lists all models in the Org.
- API: List Models
- Script:
modelIdupdated from the response - Result:
200 OK
3. Register New Model Edition
Registers an edition and its file metadata, returning the uploadId used to start the upload.
- API: Register Edition
- Script: saves
uploadId,tusEndpoint, anduploadIdB64 - Result:
201 Created
4. Create Upload Session
Starts a resumable TUS upload session. Sends Upload-Length and the base64-encoded uploadId in
Upload-Metadata.
- API: Create Upload Session (TUS)
- Script: saves
tusIdfrom theLocationheader - Result:
201 Created
5. Upload Session File
Uploads the binary bytes to the TUS session via PATCH. Attach your model file as the request body.
- API: Upload Binary (TUS PATCH)
- Result:
204 No Content
6. Check Upload Status
Polls the upload status until server-side hash verification completes.
After you send this request once, the Postman script re-sends it automatically until the status
reaches Uploaded. Just wait; clicking Send again resets the polling counter.
- API: Check Upload Status
- Result:
200 OK— status walksPending → Uploading → Verifying → Uploaded
Deploy to Devices
7. Deploy Model File
Deploys the verified edition to the target device(s). Edit the request body's deviceIdList and the
apply-pipeline applyCmd container name before sending.
- API: Deploy
- Script:
createdDeploymentIdsaved to environment automatically - Result:
202 Accepted
8. Device Deployed Models
Lists the models deployed on the target device.
- API: List Device Models
- Result:
200 OK
9. List Model Deployment Status
Lists the per-device deployment state for a given model edition.
- API: List Edition Deployments
- Result:
200 OK— each target device reachesstate: DEPLOYED
Teardown
10. Undeploy at Device
Removes the deployed edition from a specific device.
- API: Remove from Device
- Result:
202 Accepted
11. Delete Model File
Deletes the model and all its editions from WEDA Core. Remove the edition from its devices first.
- API: Delete Model
- Result:
200 OKor204 No Content
Related
- Concepts and full field reference: AI Model Management — Upload and Deploy
- Mount the deployed model in your container: Make Your Container Read the Model