There's a new home for Articles. Find Articles on Our Product Support Page.
Hi everyone, I am currently on MobiControl version 2025.1.0.1007. I am strictly an Android Shop with devices ranging from OS 10-15. Device Agent version(s) 2024.1.4.1149 through 2026.0.0.1104. I am attemping to use a python script to make the POST packages/v2 api call. I have no issue with the creation and upload of the created package. I am running into an issue when trying to get the files in the package copied to the correct folder/folders on the Samsung device. I have tried using a post-install script (I referenced the Android Agent JavaScript documentation) but for whatever reason, I can not get the files on the device. I find it strange that this isn't working since the profile status states that the package was installed successfully. When I check the file structure, no files are copied into the specified directories. I have even tried adding the PackageGroupFile and PackageFileFlags parameters in the script but still no luck. I was wondering if anyone else had any luck using this API call to build -> upload ->deploy successfully. The files in question are files that are generated in ESI. Building the same package in Pack Studio works without fail. I am wondering if I am missing something crucial. Any help would be greatly appriciated. Thank you. If any other information is needed, I would be happy to discuss.
Hi all, i have a problem to filter/search via the API using /devices/search (URL encoded ofc) or /devices In both i always get that the filter is not set correctly but i don't get what to change.In general i want to do following via API: The relevant URL is then like: https://SOTISERVER.EXT/MobiControl/WebConsole/home/dashboard/devices?search=IsAgentOnline%20Equal%20%22FALSE%22%20AND%20LastAgentDisconnectTime%20NotWithIn%20%2230%20DAYS%22%20&groups=PATH&subGroups=true I tried for example: IsAgentOnline:false As it can be found later in the data and in the example at least for the /devices (Property:Value) "IsAgentOnline":false IsAgentOnline=false ... But with no success, I always get "Parameter filter has invalid value IsAgentOnline." or similar. I also did it with no issue without a filter set and then in the devices data provided for example "IsAgentOnline": false can be found but seem not to be able to be used that way. We use version 2024.1.1 Can anyone tell me how to enter the filter correctly?
I setup an API client on our cloud server, then went the API page for our instance. Using the client ID and Secret that were generated when I created the client, I cannot authenticate in order to use it. The username and password are from the Soti identity and is an admin. Keeps saying 'Invalid Credentials'. Are there further steps to set this up properly?
Hello, I am part of the IT department in my company, which uses SOTI MOBICONTROL for managing our ZEBRA TC72 terminals. I'm not the one managing SOTI strategies, but I am currently developing an application that sends certain data via email. I need to identify either the person or at least the terminal sending this data, whether by the name of the terminal or its serial number. Directly through the Android APK, I cannot retrieve the serial number, and all terminals have the same name (TC72). I would like to know if it is possible through SOTI either to retrieve the serial number to send it via email, or to rename the terminals using a strategy such as {name of the group it belongs to}-001 (auto-increment). The terminals with SOTI have a homepage that is an HTML page where the serial number is displayed. if(ip) customDataArr.push("IP: %ip%"); if(mac) customDataArr.push("MAC: %mac%"); if(serialNumber) customDataArr.push("Serial: %serialnum%");If you have any suggestions on how to achieve this, I would be grateful. Thank you for your attention.
Hi All, I dont think the documentation makes it clear, so I thought Id ask here. Is the MobiControl Javascript API accessible/usable in a kiosk html template? Thanks James
Hello, I have some trouble uploading an APK to the API via packages/v2. $Header = @{}$Header["Authorization"] = "Bearer " + $script:Token$Header["Accept"] = "application/json"$boundary = "mobicontrol_boundary" $BinaryString = [IO.File]::ReadAllBytes($PathToAPK)$LF = "`r`n"$body = "--${boundary}${LF}" $body += "Content-Type: application/vnd.soti.mobicontrol.packagearchive.metadata+json${LF}${LF}"$body += '{ "PackageName":"AutoAPP TestPackage", "PackageVersion":"1.0", "PackagePlatform":"Android", "PackageFiles": [{ "FileName":"Testfile.apk", "FileSourceType":"Binary" } ], "PackagePrompt": { "ShowPromptBeforeInstall": false, "PromptMessage":"Install package PackageName now?", "PromptMessageTimeout":10 }}'$body += $LF$body += "--${boundary}${LF}"$body += "Content-Type: application/octet-stream${LF}"$body += "Content-Type-Encoding: Binary${LF}"$body += 'Content-Disposition: attachment; filename="Testfile.apk"' + $LF$body += $LF$body += $BinaryString$body += "${LF}${LF}--${boundary}--${LF}" $response = Invoke-WebRequest -Uri ("https://" + $script:MCFQDN + "/mobicontrol/api/packages/v2") -ContentType "multipart/related; boundary=$boundary" -Method POST -Headers $Header -Body $Body -Verbose I get a success on the upload and after that, on the device, i get I/O error and when I download the package from MobiControl and unpack it, the SettingsManager apk file is 20mb instead of the original 5mb. But if I write the $binarystring back to a file with set-content, I get a 5mb file. An example write-out of $body where I have limited the binarystring output to 100 for readability: --mobicontrol_boundaryContent-Type: application/vnd.soti.mobicontrol.packagearchive.metadata+json { "PackageName":"AutoApp TestPackage", "PackageVersion":"1.0", "PackagePlatform":"Android", "PackageFiles": [{ "FileName":"Testfile.apk", "FileSourceType":"Binary" } ], "PackagePrompt": { "ShowPromptBeforeInstall": false, "PromptMessage":"Install package PackageName now?", "PromptMessageTimeout":10 } } --mobicontrol_boundaryContent-Type: application/octet-streamContent-Type-Encoding: BinaryContent-Disposition: attachment; filename="Testfile.apk" 80 75 3 4 0 0 0 0 8 0 33 8 33 2 62 29 233 132 51 0 0 0 56 0 0 0 57 0 0 0 77 69 84 65 45 73 78 70 47 99 111 109 47 97 110 100 114 111 105 100 47 98 117 105 108 100 47 103 114 97 100 108 101 47 97 112 112 45 109 101 116 97 100 97 116 97 46 112 114 111 112 101 114 116 105 101 115 75 44 40 240 77 45 73 76 73 44 73 12 75 45 --mobicontrol_boundary-- So, do anyone have any idea as to why the apk file when received by MobiControl gets bigger/corrupt? Thanks in advance
Hello! I have been trying to create a profile through PowerShell and the MobiControl API. The end goal is to have a package assigned to it as well. Have been trying the following: Using Content-Type text/xml $xmltest = '<?xml version="1.0" encoding="UTF-8"?><Profile> <Name>APITest_NewProfile</Name> <Description>Test</Description> <DeviceFamily>AndroidPlus</DeviceFamily> <DeviceFamilyQualification>AndroidWork</DeviceFamilyQualification></Profile>' $response = Invoke-RestMethod -Uri "https://$MCFQDN/mobicontrol/api/profiles" -ContentType "text/xml" -Method POST -Headers $Header -Body $xmltest -Verbose I have also tried with a hashtable too, but either way I get the same error:"profileRequest: Error parsing value Contract validation failed" I have looked at the api list, and it appears to me that these is the minimal required fields when not attaching a package. Thanks in advance Mikael
Is there a way to get the device orientation from the API?
It seems that MC APIs use swagger. I was able to locate the swagger.json config file at ``/MobiControl/api/swagger/v2/swagger.json`` however I'm struggling to compile the client libraries for Kotlin. I'm using: swagger-codegen generate -l kotlin-client -v -i swagger.json --api-package dev.antoniocalabrese.mobicontrol.api --model-package dev.antoniocalabrese.mobicontrol.data Also tried: openapi-generator generate -i ./swagger.json -g kotlin With the second command I get some errors with the config validation: org.openapitools.codegen.SpecValidationException: There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI). | Error count: 3, Warning count: 297Errors: -attribute paths.'/devices/{deviceId}/profiles/{profileId}/actions'(post).[action].x-enumType is unexpected -attribute paths.'/security/currentUser/eulaStatus'(put).[eulaStatus].x-enumType is unexpected -attribute paths.'/devicegroups/{path}/icon'(put).[newIcon].x-enumType is unexpected The first command executes but then gradle fails to build the library. Has anyone ever successfully tried to do something similar?
I am trying to connect the API to Power Automate but I cannot seem to figure out the authentication. Has anyone else tried this before?
Hi all, maybe I'm blind but is there any API command where i can add something to a (already existing android) relocation rule?I already work with the API and documentation but i can't see something pointing to this. Before i create a feature request at Soti, i want to ask if someone here does know what command to use to get this done. We are on latest Mobicontorl version (15.6.3).
Hello, Does anyone have a working example of using the /packages/v2 API using Powershell or another scripting language? When I try to call this API I either get a return code of 415 or 500 depending on how I call it. I suspect that it is my handling of reading the APK and PreInstall scripts and placing them in the call but I can not prove it. So far SOTI has not been able to give we a working example of using this code (which is disappointing given that it is their API). I appreciate any insights. Jim
Hi There, i'm looking on how to add Mobicontrol as a data source of PowerBI to build customized report and combine devices data with other data sources. Any idea on how this could be done? MobiControl versions: 15.4.3.1012 (Cloud)
I am a Powershell novice. Does anyone here use Powershell to execute MobiControl APIs?I am having problems trying to connect to the MobiControl server. I get the following error: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.Thanks in advance.
Does any have any experience using the Mobicontrol APIs for a development pipeline?Our development team wants to automate the process of loading android APKs into Mobicontrol. While I understand the process adding a new version through the Web Console, I have no idea what it would look like using scripts and the APIs. I assume the process would be somewhat similar, add the package, then update the profile with the new version of the application but I am unsure.I currently use the package manager to add pre-install script. How would that play into this? Looking for some insight. If you have done this, how well does it work?
Top-tier experts who are delivering outstanding content. Should have more than 7000 points.
Experts who are consistent with great content. Should have more than 1000 points
Highly experienced members with valuable inputs. Should have more than 700 points
Beginners taking the initiative. Should have more than 500 points