Community - SOTI MobiControl

Community - SOTI MobiControl

There's a new home for Articles. Find Articles on Our Product Support Page.

SOTI MobiControl Discussions


  • 0 votes 4 answers

    SendMessage using API

    I have been reading through these forums and finding a lot of help regarding API request. So far I'm able to request my API token via PS and use it for device management!   I need the proper syntax to SendMessage action so that I can send a message to all the devices in a specific group. Please provide the syntax. When I use the below it does not work -  { "Action": "SendMessage"}

    SOTI MobiControl
    5 years ago
  • 0 votes 4 answers

    Uploading Packages via API Solved Locked

    I'm trying to simplify the upload of Packages using the API but can't seem to get it to work. I'm trying to code this in Powershell and a snippet of this code is below: $MCFQDN = "SERVER.LOCATION" Get-MobiControlToken $response = ""$APIURL = "https://$MCFQDN/MobiControl/api/packages"$filename = "c:\Temp\PackageName.pcg" $Header = @{}$Header["Authorization"] = "Bearer " + $Token$Header["Accept"] = "application/json" try {    $response = Invoke-RestMethod -Uri $APIURL -ContentType "multipart/related;" -Method POST -InFile $filename -Headers $Header    $response}catch {    $($_.Exception.Message)} The Get-MobiControl function works without issue, but each time I run this script I get a 415 error stating "Unsupported media type provided. Expected media type is multipart/related" but I have defined that. I've also tried defining it in the header instead. Is there something glaringly obvious I'm missing? Thanks in advance.

    SOTI MobiControl
    6 years ago
  • 0 votes 3 answers

    Revoke a Certificate using API - "ErrorCode": 3500, "Message": "Certificate action failed.",

    Good Afternoon Everyone, I'm currently trying to remove certificates that were installed by our old MDM system via the API as they're causing issues with Exchange Email configuration. I'm getting an error that appears to be from MobiControl rather than a generic Rest API error but I can't find anything about it in any MobiControl documentation. The error is: Invoke-restmethod : {"$type": "ErrorDetails","ErrorCode": 3500,"Message": "Certificate action failed.","Data": [],"HelpLink": null} The script I'm running is: $MCFQDN = "https://SERVERURL/mobicontrol/api/devices/$DeviceId/certificates/$CertificateID/actions" $Body = @{"ActionKind" = "Revoke" } $Header = @{Authorization = "Bearer $token"} try{$response = Invoke-restmethod -Uri $MCFQDN -Method POST -Headers $Header -Body (ConvertTo-Json $Body) -ContentType "application/json"}catch{$($_.Exception.Message)} Does anyone have any idea what the issue might be? I'm tried removing a certificate managed by MobiControl as well and got the same error. Thanks!

    Android
    7 years ago

Top 3 Contributors of The Week

View All

Earn Contributor Badge

More info
  • Diamond
    Diamond New !

    Top-tier experts who are delivering outstanding content. Should have more than 7000 points.

  • Platinum

    Experts who are consistent with great content. Should have more than 1000 points

  • Gold

    Highly experienced members with valuable inputs. Should have more than 700 points

  • Silver

    Beginners taking the initiative. Should have more than 500 points