Skip to main content
POST
/
v1
/
dashboard
/
top-productive-performer
Fetch Top Productive Perfomer
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    timeZone: 'Asia/Kolkata',
    userId: ['ab7c4f30-1024-471a-a767-739df0dc53fd'],
    teamId: []
  })
};

fetch('https://api.trackpilots.com/v1/dashboard/top-productive-performer', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "success": true,
  "statusCode": 200,
  "statusMessage": "Fetched top performer successfully",
  "error": null,
  "data": [
    {
      "rank": 1,
      "user": {
        "name": "Sakthivel Govinthan",
        "profilePicUrl": "https://trackpilots.s3.amazonaws.com/profile-pic/9b8090ae-e4c9-49ee-9dbf-62817262d05a.png"
      },
      "productivity": {
        "percentage": 36.96
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Either userId or teamId must be provided. Both cannot be empty.

timeZone
string
required

IANA timezone of the requester

Example:

"Asia/Kolkata"

userId
string<uuid>[]
required

List of user UUIDs to fetch screenshots for

teamId
string<uuid>[]

List of team UUIDs to fetch screenshots for

Example:
[]

Response

Fetched top productive performer successfully.

success
boolean
Example:

true

statusCode
integer
Example:

200

statusMessage
string
Example:

"Fetched top performer successfully"

error
object
Example:

null

data
object[]