Work Hours Details API

Overview

View Work Hours Details data

 

API URL

api/workhours/details

 

HTTP Method

GET

 

URL Parameters

Name

Type

Required

Description

end

String

Requires

End time

start

String

Requires

Start time

tag

String

Requires

The tag serial number to be viewed

access_token or user_access_token

String

Requires

Specify the API access_token of the account or the user_access_token obtained after the user logged in.

 

Response

Returns a JSON object. If "code" is "0", it is successful. "data" is the work hours details data.

 

Examples

{

  "code": 0,

  "msg": "操作成功",

  "msg_en": "Successful operation",

  "data": {

    "data": [

      {

        "_id": {

          "$oid": "667b6900a3cc453c2abb414a"

        },

        "date": 1719360000, //Date of Statistics

        "tag": "f1c0", //Tag Serial Number

        "1719361800": {

          "start": 1719361800, //Start Time

          "end": 1719361822, //End Time

 

          "status": "notin", //On/off E-fence

          "where": "", //E-fence

          "seconds": 22 //Statistical Time

        },

        "1719361822": {

          "start": 1719361822,

          "end": 1719361852,

          "status": "in",

          "where": "1",

          "seconds": 30

        },

        "1719361852": {

          "start": 1719361852,

          "end": 1719361883,

          "status": "in",

          "where": "1",

          "seconds": 31

        }

}

    ],

    "where": {

      "tag": "f1c0"

    },

    "order": "date asc",

    "sql": "db.stats.find({\"$and\":[{\"date\":{\"$gte\":1719331199,\"$lte\":1719417601}},{\"tag\":\"f1c0\"}]}).sort({\"date\":1}).limit(0);"

  }

}