Skip to main content
GET
/
v1
/
settings
/
idle-alert
Fetch Idle Alert Settings
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.trackpilots.com/v1/settings/idle-alert', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "success": true,
  "statusCode": 200,
  "statusMessage": "Fetched idle alert settings successfully",
  "error": null,
  "data": [
    {
      "userId": "f0ad9ad9-d421-48dc-868d-9760e33e5089",
      "userName": "Abirami Kannan",
      "emailId": "abiramikannan2006@gmail.com",
      "profilePicUrl": null,
      "idleAlertSettings": {
        "minimumIdleTimeMinutes": 10,
        "enableIdleTimeAlert": true
      }
    },
    {
      "userId": "b514fe51-df34-414e-8bec-9dcdd23cde23",
      "userName": "Swetha Senthil",
      "emailId": "senthilsundari2802@gmail.com",
      "profilePicUrl": "https://trackpilots.s3.amazonaws.com/profile-pic/9b8090ae-e4c9-49ee-9dbf-62817262d05a.jpeg",
      "idleAlertSettings": {
        "minimumIdleTimeMinutes": 3,
        "enableIdleTimeAlert": false
      }
    },
    {
      "userId": "ab7c4f30-1024-471a-a767-739df0dc53fd",
      "userName": "Sakthivel Govinthan",
      "emailId": "sakthiveltechit@gmail.com",
      "profilePicUrl": "https://trackpilots.s3.amazonaws.com/profile-pic/9b8090ae-e4c9-49ee-9dbf-62817262d05a.png",
      "idleAlertSettings": {
        "minimumIdleTimeMinutes": 5,
        "enableIdleTimeAlert": false
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

Fetched expected eork hours settings successfully

success
boolean
Example:

true

statusCode
integer
Example:

200

statusMessage
string
Example:

"Fetched idle alert settings successfully"

error
object
Example:

null

data
object[]
Example:
[
{
"userId": "f0ad9ad9-d421-48dc-868d-9760e33e5089",
"userName": "Abirami Kannan",
"emailId": "abiramikannan2006@gmail.com",
"profilePicUrl": null,
"idleAlertSettings": {
"minimumIdleTimeMinutes": 10,
"enableIdleTimeAlert": true
}
},
{
"userId": "b514fe51-df34-414e-8bec-9dcdd23cde23",
"userName": "Swetha Senthil",
"emailId": "senthilsundari2802@gmail.com",
"profilePicUrl": "https://trackpilots.s3.amazonaws.com/profile-pic/9b8090ae-e4c9-49ee-9dbf-62817262d05a.jpeg",
"idleAlertSettings": {
"minimumIdleTimeMinutes": 3,
"enableIdleTimeAlert": false
}
},
{
"userId": "ab7c4f30-1024-471a-a767-739df0dc53fd",
"userName": "Sakthivel Govinthan",
"emailId": "sakthiveltechit@gmail.com",
"profilePicUrl": "https://trackpilots.s3.amazonaws.com/profile-pic/9b8090ae-e4c9-49ee-9dbf-62817262d05a.png",
"idleAlertSettings": {
"minimumIdleTimeMinutes": 5,
"enableIdleTimeAlert": false
}
}
]