Hi
I'm trying to upload a package by using the MobiControl REST-API. Im using MobiControl Version 14.4.2.1307
The API call is described in https://serverurl/MobiControl/api/docs/index#!/Packages/Packages_CreateNewPackage
Here's the request and MobiControls answer (Stirngs in Italic are replaced for privacy reasons):
2019-09-27 15:37:02,937 9768 DEBUG < POST /MobiControl/api/packages HTTP/1.1
< Host: mobicontrolhostname.com
< User-Agent: python-requests/2.22.0
< Accept-Encoding: gzip, deflate
< Accept: */*
< Connection: keep-alive
< Authorization: Bearer here_comes_the_bearer_token
< Content-Type: multipart/related; boundary="===============0510829778131399783=="
< MIME-Version: 1.0
< Content-Length: 1231
<
< --===============0510829778131399783==
Content-Type: application/vnd.soti.mobicontrol.package.metadata+json
MIME-Version: 1.0
{ "deviceFamily" : "AndroidPlus" }
--===============0510829778131399783==
Content-Type: application/vnd.soti.mobicontrol.package
MIME-Version: 1.0
Content-Transfer-Encoding: base64
AQMDKgThisIsShortenedF9Q==
--===============0510829778131399783==--
> HTTP/1.1 400 Bad Request
> Content-Length: 186
> Content-Type: application/json; charset=utf-8
> Server: Microsoft-HTTPAPI/2.0
> Date: Fri, 27 Sep 2019 13:37:54 GMT
>
{
"$type": "ErrorDetails",
"ErrorCode": 0,
"Message": "Unexpected end of MIME multipart stream. MIME multipart message is not complete.",
"Data": null,
"HelpLink": null
}
I have shortened the package in the printout above and replaced the bearer token and hostname. The rest is untouched.
I believe this should be a valid request or I am wrong?
I also tried the example request in the API documentation but got the same answers. Any ideas?