~aleteoryx/muditaos

ref: 85cd9dd6902b49221fa94f91b062f64c3ef9df8e muditaos/doc/os_api/endpoints/pure/security_endpoint.md -rw-r--r-- 2.3 KiB
85cd9dd6 — Lukasz Mastalerz [CP-1852] Too many user files removes default relaxation audio from the list 2 years ago

#Security endpoint (13)

#Parameters explanation

Common parameters explanation

#Usage examples

#Get phone lock status

Request Payload Structure

{
  "endpoint":13,
  "method":1,
  "uuid":123,
  "body":{
    "category":"phoneLockStatus"
  }
}

Response Payload Structure

{
  "endpoint":13,
  "status":204,
  "uuid":123
}

Parameters:

  • status - 423 when the EULA is not accepted or battery level is critical otherwise 204 when phone is unlocked or 403 when phone is locked

Access to all edpoints is blocked when:

  • device is locked - 403 status is returned
  • EULA is not accepted - 423 status is returned
  • Critical battery level - 423 status is returned

#Get phone lock time

Request Payload Structure

{
  "endpoint":13,
  "method":1,
  "uuid":123,
  "body":{
    "category":"phoneLockTime"
  }
}

Response Payload Structure

{
  "endpoint":13,
  "status":200,
  "uuid":123,
  "body":{
    "phoneLockTime":1630919524,
    "timeLeftToNextAttempt":120
  }
}

Parameters:

  • phoneLockTime - timestamp in seconds when the next attempt of phone unlock will be possible
  • timeLeftToNextAttempt - time left in seconds, after which the next attempt of phone unlock will be possible

Response Payload Structure when phone is not time locked

{
  "endpoint":13,
  "status":422,
  "uuid":123
}

Parameters:

  • status - 422 when phone is unlocked, or unlocking phone is possible at this moment

#Set phone lock off

Request Payload Structure

{
  "endpoint":13,
  "method":3,
  "uuid":123,
  "body":{
    "phoneLockCode":[1, 1, 1, 1]
  }
}

Response Payload Structure

{
  "endpoint":13,
  "status":204,
  "uuid":123
}

Parameters:

  • phoneLockCode - code needed to unlock phone as array of integer values
  • status - 204 if passed phoneLockCode has a correct format (eg. length), 400 otherwise

It is Mudita Center responsibility to check if phone was successfully unlocked by checking phone lock status.