Upload AI/ML Model to LEM
3 min
Upload AI/ML Model to LEM
UI trigger: LEM -> Edge Lifecycle Management -> AI/ML Models -> Upload New Model.
LEM uses a pre-signed S3 URL pattern instead of the LE resumable-session pattern. Step 1 gets a signed URL; Step 2 uploads directly to object storage; Step 3 registers the model in LEM.
Step table
Step | Name in Collection | Method | Endpoint | Body / Notes | Output |
|---|---|---|---|---|---|
1 | Step 1 of Upload New AI/ML Model | POST | {{LEM_URL}}/api/v1/file/{{project_id}}/mlModel/{{filename}}/upload-url | {"projectId": "...", "fileName": "model.zip"} | {"url": "<signed_s3_url>"} |
2 | Step 2 of Upload New AI/ML Model | PUT | <signed_s3_url from Step 1> | Binary .zip model file bytes. URL carries AWS SigV4 query params. | 200 OK (S3 direct upload) |
3 | Step 3 of Upload New Model | POST | {{LEM_URL}}/api/v1/file/{{project_id}}/mlModel/{{filename}} | {"description": "..."} - registers the model in LEM | Model available in LEM |
Auth notes
- Steps 1 and 3 use X-AuthToken: {{LEM_AdminApiToken}}.
- Step 2 (S3 PUT) uses the embedded AWS SigV4 signature in the URL - no additional auth header needed. Sending X-AuthToken to S3 will fail.