JavaScript
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));
200
Example
{ "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 } } ] }
Fetch the top productive performers today
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Either userId or teamId must be provided. Both cannot be empty.
IANA timezone of the requester
"Asia/Kolkata"
List of user UUIDs to fetch screenshots for
List of team UUIDs to fetch screenshots for
[]
Fetched top productive performer successfully.
true
"Fetched top performer successfully"
null
Show child attributes