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 for an Organization | Edition, upload, deploy, teardown |
uploadId | Register New Edition of an Existing Model, re-confirmed by Create a resumable upload | Create a resumable upload, Upload a file chunk, Check Upload Status |
uploadIdB64 | Register New Edition of an Existing Model / Create a resumable upload | Create a resumable upload (Upload-Metadata) |
createdDeploymentId | Create Model Deployment | 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. Dots are not allowed |
fileName / fileSize / fileHash | The binary's name, size in bytes, and SHA-256 hash |
deviceId | Target device for deployment |
In Create Model Deployment, edit the request body's targets[].deviceIdList and the applyCmd
container name to match your device and running container.
The tus Location header ends with the same uploadId that Register Edition returned. The
collection parses it out and asserts the two match, so there is only one upload identifier to
track. If you script your own client, you can rely on that equality rather than storing two
values.
Upload the Model
1. Create Model
Creates a new model record under the Org.
- API: Create Model
- Script: saves
modelIdas a collection variable - Result:
201 Created(or409 Conflictif the name already exists — use List Models for an Organization to reuse themodelId)
2. List Models for an Organization
Lists all models in the Org.
- API: List Models
- Script:
modelIdupdated from the response - Result:
200 OK
3. Register New Edition of an Existing Model
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 a resumable upload
Starts a resumable TUS upload session. Sends Upload-Length and the base64-encoded uploadId in
Upload-Metadata.
- API: Create Upload Session (TUS)
- Script: parses the
uploadIdfrom theLocationheader and asserts it matches theuploadIdfrom step 3 - Result:
201 Created
5. Upload a file chunk
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.
Send this request again every few seconds until the status reaches Uploaded. Server-side hash
verification of a large file can take a while.
- API: Check Upload Status
- Result:
200 OK— status walksPending → Uploading → Verifying → Uploaded
Deploy to Devices
7. Create Model Deployment
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: saves
createdDeploymentIdas a collection variable - Result:
202 Accepted
8. List All AI Models for a Specific Device
Lists the models deployed on the target device.
- API: List Device Models
- Result:
200 OK
9. List Devices for a Specific Model Edition
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. Delete Model File from a Specific Device
Removes the deployed edition from a specific device.
- API: Remove from Device
- Result:
202 Accepted
11. Delete a Model and All Its Editions
Deletes the model and all its editions from WEDA Core. Remove the edition from its devices first.
- API: Delete Model
- Result:
200 OK
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