Master - Ota

Add new device group

Securityapi key and Authorization
Request
query Parameters
siteUuid
string or null

If not set, it will login user's siteUuid.

siteId
string or null

Also could use this idName.

Request Body schema:
object (MidmGroupProfile)

Profile object of group

enabled
boolean or null
parentUuid
string or null

ParentUuid is optional, deviceGroup could have child group.

Responses
200

OK

post/ota/api/device/group/save
Request samples
{
  • "profile": {
    },
  • "enabled": true,
  • "parentUuid": "string"
}
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": 0,
  • "message": "string",
  • "build": "string",
  • "data": {
    }
}

Query current device groups

Could get device group uuid

Securityapi key and Authorization
Responses
200

OK

get/ota/api/device/group/all
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": 0,
  • "message": "string",
  • "build": "string",
  • "data": [
    ]
}

Check if the device exists

Securityapi key and Authorization
Request
query Parameters
siteUuid
string or null

It will find device within specific site

serialNo
required
string non-empty
Responses
200

OK

get/ota/api/device/exists
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": 0,
  • "message": "string",
  • "build": "string",
  • "data": true
}

Add new devices

Please not call save device again, it will reset the device status. To avoid confusing, check device exist first.

Securityapi key and Authorization
Request
query Parameters
licenseModelUuid
string or null

If set, it will try to find that available deviceLicense.

If find empty, device will be treated as Trial license.

autoRenew
boolean or null

If set true, when the current license assigned to a device is expiring,

MiDM will automatically renew the device license by assigning an available license from your license inventory.

renewToSameModel
boolean or null

Enable this option if you want to renew only to the same license model that has previously expired.

Request Body schema:
Array
required
object (MidmDeviceProfile)

Profile object of device

enabled
boolean or null
groupUuid
string or null
Responses
200

OK

post/ota/api/device/save
Request samples
[
  • {
    }
]
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": 0,
  • "message": "string",
  • "build": "string"
}

Delete devices

Securityapi key and Authorization
Request
query Parameters
siteUuid
string or null

If not set, it will login user's siteUuid

serialNo
required
string non-empty

Separate multiple devices' serial no with a comma,

it will only can delete the devices which belong to above site

Example: serialNo=GGE09E0012,GGE09E0013,GGE09E0014
Responses
200

OK

post/ota/api/device/delete
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": 0,
  • "message": "string",
  • "build": "string",
  • "data": 0
}

Change device group

Securityapi key and Authorization
Request
query Parameters
devices
required
string non-empty

Separate multiple devices' serial no with a comma

Example: devices=GGE09E0012,GGE09E0013,GGE09E0014
group
string or null

Target device group UUID.

It will remove device group for these devices if not set this.

Responses
200

OK

post/ota/api/device/changeGroup
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": 0,
  • "message": "string",
  • "build": "string",
  • "data": 0
}

Query device information

Securityapi key and Authorization
Request
query Parameters
serialNo
required
string non-empty

If the serial no doesn't exists, it will return null.

minify
boolean or null

Return minified data, it will exclude owner details, group details, configuration profiles, device licenses.

Responses
200

OK

get/ota/api/device/findBy
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": 0,
  • "message": "string",
  • "build": "string",
  • "data": {
    }
}

Query all apps installed in device

Securityapi key and Authorization
Request
query Parameters
serialNo
required
string non-empty

If the serial no doesn't exists, it will return error.

Responses
200

OK

get/ota/api/device/app/installed
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": 0,
  • "message": "string",
  • "build": "string",
  • "data": {
    }
}

Check if the app is installed

Securityapi key and Authorization
Request
query Parameters
serialNo
required
string non-empty

If the serial no doesn't exists, it will return error.

packageName
string or null

Package name

versionCode
integer or null <int32>

Version code

versionName
string or null

Version name

Responses
200

OK

get/ota/api/device/app/isInstalled
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": 0,
  • "message": "string",
  • "build": "string",
  • "data": {
    }
}

Check if devices have applied the profile

Using filter to get devices.

Securityapi key and Authorization
Request
query Parameters
deviceScope
boolean or null
Default: true

true

filter
string or null

If is empty, will get whole scoped devices.

If want to get profile applied devices, put {"states.profile.state":"done"}

profileUuid
required
integer <int32>
page
integer or null <int32>
size
integer or null <int32>
Responses
200

OK

get/ota/api/device/profile/devices
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": 0,
  • "message": "string",
  • "build": "string",
  • "data": [
    ],
  • "totalPage": 0,
  • "size": 0,
  • "totalSize": 0
}

Query all apps

App Management

Any app must be uploaded before requesting to update/install.

Securityapi key and Authorization
Request
query Parameters
siteUuid
string or null
filter
string or null

Json format

sortBy
string or null

Sort filter

direction
string or null
Default: "asc"

Available apply order are asc, desc

Responses
200

OK

get/ota/api/apps/findAll
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": 0,
  • "message": "string",
  • "build": "string",
  • "data": [
    ],
  • "size": 0
}

Pagenated app list

Securityapi key and Authorization
Request
query Parameters
siteUuid
string or null

If the user belongs to multiple site, it'll find the apps which are belonged to the site.

If the site UUID is not described, it'll find from the previous logged site or first site.

If the user not belonged to any site, it will return site not avaialble error(451).

page
integer or null <int32>

Page number

size
integer or null <int32>
Default: 10

The number of records to be listed in a page.

filter
string or null

Json format

sortBy
string or null

Sort filter

direction
string or null
Default: "asc"

Available apply order are asc, desc

Responses
200

OK

get/ota/api/apps/find
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": 0,
  • "message": "string",
  • "build": "string",
  • "data": [
    ],
  • "totalPage": 0,
  • "size": 0,
  • "totalSize": 0
}

Query all system images

System Image(OTA image) Management

Any system image must be uploaded before requesting to update.

There're 2 kinds of image, one is base image and the other is region image.

Whichever the image is, the format is different for AB or Non-AB partition.

In addition, the image can be partial image.Multiple images can be listed in the request, but the MiDM will feed proper image depend on the device state.

For example, the size of all partial images is bigger than full image, it will select full image to meet the final image.

Any image is not for the device, the images will be rejected.

Securityapi key and Authorization
Request
query Parameters
siteUuid
string or null
filter
string or null

Json format

sortBy
string or null

Sort filter

direction
string or null
Default: "asc"

Available apply order are asc, desc

Responses
200

OK

get/ota/api/otas/findAll
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": 0,
  • "message": "string",
  • "build": "string",
  • "data": [
    ],
  • "size": 0
}

Pagenated system image list

Securityapi key and Authorization
Request
query Parameters
siteUuid
string or null

If the user belongs to multiple site, it'll find the apps which are belonged to the site.

If the site UUID is not described, it'll find from the previous logged site or first site.

If the user not belonged to any site, it will return site not avaialble error(451).

page
integer or null <int32>

Page number

size
integer or null <int32>
Default: 10

The number of records to be listed in a page.

filter
string or null

Json format

sortBy
string or null

Sort filter

direction
string or null
Default: "asc"

Available apply order are asc, desc

Responses
200

OK

get/ota/api/otas/find
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": 0,
  • "message": "string",
  • "build": "string",
  • "data": [
    ],
  • "totalPage": 0,
  • "size": 0,
  • "totalSize": 0
}

New profile request

If isGlobal is true, any scope will be ignored.

If no profile.name described, the profile name will be the time stamp as formatted "yyyyMMdd_hh:mm:ss".

If the scoped devices not existing, it will be registered automatically.

{
  "isGlobal": <true|false>,
  "profile": { "name": "<profile name>", "applyOrder": "none|apps|otas|settings", "removeIfNoScope": "true|false", "unscopeIfApplied": "true|false" },
  "scope": { "group": [<device groups>], "device": [<devices>]},
  "apps": {"install": [{"uuid": "<app uuid>", "silentInstall": <true|false>}]},
  "otas": [<UUIDs of each system images>],
  "settings": {<configuration settings>}
}

Example JSON:

{
  "scope": {
    "group": [
      "020a7dbf-ad72-474a-87a1-a9f90372e94b",
      "649205ee-3ce6-4b37-ae42-14a272e31201"
    ]
  },
  "apps": {
    "install": [
      {
        "uuid": "37088946-e6f4-49e3-b45a-05beda912df2",
        "starts_on_update": true,
        "silent_install": true,
        "grant_all": true
      },
      {
        "uuid": "37088946-e6f4-49e3-b45a-05beda912df2"
      }
    ]
  },
  "otas": [
    "48231c37-1fb9-4876-b4b2-c817cc52ffa8",
    "94de7ae1-b750-4839-bf3f-39ec76a4c76d"
  ],
  "schedule_date": {
    "start_on": "2024-02-06"
  },
  "settings": {
    "otas": {
      "silent_install": true,
      "partialFirst": true,
      "need_ac": false,
      "checkBuildDate": true
    }
  }
}
  1. Must record the profileUuid
  2. Introduce for params:
    1. apps.install:
      1. starts_on_update: After updating the app, need start it or not
      2. silent_install: Before updating the app, it will not ask user to confirm to install the app if set true
      3. grant_all: try to grant all permission from App needed
    2. settings.otas:
      1. silent_install: Before updating the image, it will not ask user to confirm to update the image if set true
      2. partialFirst: The size of all partial images is less than full image, it will select the sequence to do partial images update one by one
      3. need_ac: When doing image update, need plug ac power or not
      4. checkBuildDate: If true, only allow region upgrade, will check Region build date
Securityapi key and Authorization
Request
Request Body schema:
siteUuid
string or null
writerUuid
string or null
isGlobal
boolean or null

If isGlobal is true, any scope will be ignored.

object (MidmInnerProfile)
object (MidmScope)
object (MidmWriter)
object (MidmApps)
otas
Array of strings or null

UUIDs of each system images

object (MidmScheduleDate)
object (MidmSettings)
created
string or null
updated
string or null
enabled
boolean or null
Responses
200

OK

post/ota/api/device/profile/apply
Request samples
{
  • "siteUuid": "string",
  • "writerUuid": "string",
  • "isGlobal": true,
  • "profile": {
    },
  • "scope": {
    },
  • "writer": {
    },
  • "apps": {
    },
  • "otas": [
    ],
  • "schedule_date": {
    },
  • "settings": {
    },
  • "created": "string",
  • "updated": "string",
  • "enabled": true
}
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": 0,
  • "message": "string",
  • "build": "string",
  • "data": {
    }
}

Query current profiles

List all profiles with paging or filter.

Securityapi key and Authorization
Request
query Parameters
page
integer or null <int32>

Page number

size
integer or null <int32>
Default: 10

The number of records to be listed in a page.

Default is 10.

filter
string or null

Json format

sortBy
string or null

Sort filter

Example: sortBy=profile.name
direction
string or null
Default: "asc"

Available apply order are asc, desc

Responses
200

OK

get/ota/api/device/profile/find
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": 0,
  • "message": "string",
  • "build": "string",
  • "data": [
    ]
}

Load existed profile

List all profiles with paging or filter.

Securityapi key and Authorization
Request
path Parameters
profileUuid
required
string
Responses
200

OK

get/ota/api/device/profile/{profileUuid}
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": 0,
  • "message": "string",
  • "build": "string",
  • "data": {
    }
}

Update profile

Load existed profile first. Then, edit and save it.

Securityapi key and Authorization
Request
Request Body schema:
siteUuid
string or null
writerUuid
string or null
isGlobal
boolean or null

If isGlobal is true, any scope will be ignored.

object (MidmInnerProfile)
object (MidmScope)
object (MidmWriter)
object (MidmApps)
otas
Array of strings or null

UUIDs of each system images

object (MidmScheduleDate)
object (MidmSettings)
created
string or null
updated
string or null
enabled
boolean or null
Responses
200

OK

post/ota/api/device/profile/save
Request samples
{
  • "siteUuid": "string",
  • "writerUuid": "string",
  • "isGlobal": true,
  • "profile": {
    },
  • "scope": {
    },
  • "writer": {
    },
  • "apps": {
    },
  • "otas": [
    ],
  • "schedule_date": {
    },
  • "settings": {
    },
  • "created": "string",
  • "updated": "string",
  • "enabled": true
}
Response samples
application/json
{
  • "uq": "3903dc78-9349-41a0-9662-d1e33de117f8",
  • "doc_version": "latest",
  • "result": true,
  • "code": 0,
  • "message": "string",
  • "build": "string",
  • "data": {
    }
}