Fetch Apps And Websites Usage
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.trackpilots.com/v1/my-team/apps-and-websites-usage/{userId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.trackpilots.com/v1/my-team/apps-and-websites-usage/{userId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.trackpilots.com/v1/my-team/apps-and-websites-usage/{userId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"success": true,
"statusCode": 200,
"statusMessage": "Fetched apps and websites successfully",
"error": null,
"data": {
"summary": {
"totalTimeSpentSeconds": 122404,
"websiteTimeSpentSeconds": 44520,
"appsTimeSpentSeconds": 77884
},
"websitesUsage": {
"totalWebsiteTimeSpentSeconds": 44520,
"websites": [
{
"domain": "chatgpt.com",
"iconUrl": "https://chatgpt.com/favicon.ico",
"timeSpentSeconds": 8375
}
]
},
"appsUsage": {
"totalAppsTimeSpentSeconds": 77884,
"apps": [
{
"appName": "Visual Studio Code",
"iconUrl": "https://trackpilots.s3.amazonaws.com/app-icon/vscode.png",
"timeSpentSeconds": 41823
}
]
}
}
}My Team
Fetch Apps And Websites Usage
GET
/
v1
/
my-team
/
apps-and-websites-usage
/
{userId}
Fetch Apps And Websites Usage
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.trackpilots.com/v1/my-team/apps-and-websites-usage/{userId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.trackpilots.com/v1/my-team/apps-and-websites-usage/{userId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.trackpilots.com/v1/my-team/apps-and-websites-usage/{userId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"success": true,
"statusCode": 200,
"statusMessage": "Fetched apps and websites successfully",
"error": null,
"data": {
"summary": {
"totalTimeSpentSeconds": 122404,
"websiteTimeSpentSeconds": 44520,
"appsTimeSpentSeconds": 77884
},
"websitesUsage": {
"totalWebsiteTimeSpentSeconds": 44520,
"websites": [
{
"domain": "chatgpt.com",
"iconUrl": "https://chatgpt.com/favicon.ico",
"timeSpentSeconds": 8375
}
]
},
"appsUsage": {
"totalAppsTimeSpentSeconds": 77884,
"apps": [
{
"appName": "Visual Studio Code",
"iconUrl": "https://trackpilots.s3.amazonaws.com/app-icon/vscode.png",
"timeSpentSeconds": 41823
}
]
}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
User ID of the team member
Example:
"ab7c4f30-1024-471a-a767-739df0dc53fd"
Query Parameters
Timezone for logs calculation
Example:
"Asia/Kolkata"
