I tried to upload my custom model via REST API with the following code:
curl -X POST 'https://mohmlovpapp01.healthgrp.com.sg/api/v2/customModels/6384510809470eaf11538486/versions/' -H 'Content-Type: multipart/form-data' -H 'Accept: application/json' -H 'Authorization: Bearer {access-token}' -F 'filePath=rd.pkl' -F 'files=@/home/pamunixadm3001/rd.pkl' -F 'baseEnvironmentId={EnvironmentId}'
However, it returns the error message:
{"message": "Invalid field data", "errors": {"files": "Each file must have a corresponding filePath. Supply the files as a form-data list of `file` objects. And supply the relative file paths as a form-data list of `filePath` strings"}}
How do I resolve this issue? Thank you
Hi!
As it is described in the documentation:
So I guess your parameters are confused there. Try:
-F 'filePath=@/home/pamunixadm3001/' -F 'files=rd.pkl'