跳至主要内容

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 TokenaccessToken is set
  • Completed Manage Organizationsorg_id is set
  • A WEDA Node device registered and ActivateddeviceId is set (for the deploy steps)
  • The model binary file, plus its fileName, fileSize (bytes), and fileHash (64-char lowercase SHA-256)

Auto-captured Variables

VariableSet byUsed by
modelIdCreate Model / List ModelsEdition, upload, deploy, teardown
uploadIdRegister New Model EditionCreate Upload Session, Check Upload Status
uploadIdB64Register New Model Edition / Create Upload SessionCreate Upload Session (Upload-Metadata)
tusIdCreate Upload SessionUpload Session File
createdDeploymentIdDeploy Model FileDeployment tracking

Variables You Set

VariableDescription
modelNameName of the model to create (unique within the Org)
modelEditionEdition string, e.g. 1.0.3
fileName / fileSize / fileHashThe binary's name, size in bytes, and SHA-256 hash
deviceIdTarget 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: modelId saved to environment automatically
  • Result: 201 Created (or 409 Conflict if the name already exists — use List Models to reuse the modelId)

2. List Models

Lists all models in the Org.

  • API: List Models
  • Script: modelId updated 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, and uploadIdB64
  • Result: 201 Created

4. Create Upload Session

Starts a resumable TUS upload session. Sends Upload-Length and the base64-encoded uploadId in Upload-Metadata.

5. Upload Session File

Uploads the binary bytes to the TUS session via PATCH. Attach your model file as the request body.

6. Check Upload Status

Polls the upload status until server-side hash verification completes.

Automatic polling — do not click Send repeatedly

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 walks Pending → 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: createdDeploymentId saved to environment automatically
  • Result: 202 Accepted

8. Device Deployed Models

Lists the models deployed on the target device.

9. List Model Deployment Status

Lists the per-device deployment state for a given model edition.


Teardown

10. Undeploy at Device

Removes the deployed edition from a specific device.

11. Delete Model File

Deletes the model and all its editions from WEDA Core. Remove the edition from its devices first.



Last updated on Jul-17, 2026 | Version 1.1.0