Skip to main content

Insights

POST Load projects' data trends

https://api.track.toggl.com/insights/api/v1/workspace/{workspace_id}/data_trends/projects

Returns the projects' data trends projects from a workspace.

curl -X POST https://api.track.toggl.com/insights/api/v1/workspace/{workspace_id}/data_trends/projects \
-H "Content-Type: application/json" \
-d '{"billable":"boolean","end_date":"string","previous_period_start":"string","project_ids":["integer"],"start_date":"string"}' \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
workspace_idintegertrueWorkspace ID

Body

nametypedescription
billablebooleanWhether the project is set as billable, optional, premium feature.
end_datestringEnd date, example "2006-01-02". Should be less than Start date.
previous_period_startstringPrevious start date, example "2006-01-02".
project_idsArray of integerProject IDs, optional.
start_datestringStart date, example "2006-01-02". Should be greater than End date.

Response

[
{
"current_period_seconds": {
"type": [
"integer"
]
},
"previous_period_seconds": {
"type": [
"integer"
]
},
"project_id": {
"type": "integer"
},
"start": {
"type": "string"
},
"user_ids": {
"type": [
"integer"
]
}
}
]

POST Export employee profitability insights

https://api.track.toggl.com/insights/api/v1/workspace/{workspace_id}/profitability/employees.{extension}

Downloads employee profitability insights in the specified format: csv or xlsx.

curl -X POST https://api.track.toggl.com/insights/api/v1/workspace/{workspace_id}/profitability/employees.{extension} \
-H "Content-Type: application/json" \
-d '{"currency":"string","end_date":"string","group_ids":"string","resolution":"string","start_date":"string","user_ids":"string"}' \
-u <email>:<password>

Parameters

Body

nametypedescription
currencystring-
end_datestring-
group_idsstring-
resolutionstring-
start_datestring-
user_idsstring-

Response

A stream with the csv or xlsx for the report being exported

POST Export profitability project insights

https://api.track.toggl.com/insights/api/v1/workspace/{workspace_id}/profitability/projects.{extension}

Downloads profitability project insights in the specified format: csv or xlsx.

curl -X POST https://api.track.toggl.com/insights/api/v1/workspace/{workspace_id}/profitability/projects.{extension} \
-H "Content-Type: application/json" \
-d '{"billable":"boolean","client_ids":["integer"],"currency":"string","end_date":"string","project_ids":["integer"],"resolution":"string","start_date":"string"}' \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
extensionstringtruecsv,xlsx

Body

nametypedescription
billablebooleanWhether the project is set as billable, optional, premium feature.
client_idsArray of integerClient IDs, optional. A nil entry on this list means that only projects without client will be selected.
currencystringCurrency, example: "usd".
end_datestringEnd date, optional, example: "2006-01-02". Should be less than End date.
project_idsArray of integerProject IDS, optional.
resolutionstringResolution, optional. Can be "day", "week" or "month".
start_datestringStart date, optional, example: "2006-01-02". Should be greater than End date.

Response

A stream with the csv or xlsx for the report being exported

POST Export projects data trends

https://api.track.toggl.com/insights/api/v1/workspace/{workspace_id}/trends/projects.{extension}

Downloads projects data trends in the specified format: csv or xlsx.

curl -X POST https://api.track.toggl.com/insights/api/v1/workspace/{workspace_id}/trends/projects.{extension} \
-H "Content-Type: application/json" \
-d '{"billable":"boolean","end_date":"string","previous_period_start":"string","project_ids":["integer"],"start_date":"string"}' \
-u <email>:<password>

Parameters

Path

nametyperequireddescription
workspace_idintegertrueWorkspace ID
extensionstringtruecsv,xlsx

Body

nametypedescription
billablebooleanWhether the project is set as billable, optional, premium feature.
end_datestringEnd date, example "2006-01-02". Should be less than Start date.
previous_period_startstringPrevious start date, example "2006-01-02".
project_idsArray of integerProject IDs, optional.
start_datestringStart date, example "2006-01-02". Should be greater than End date.

Response

[
{
"current_period_seconds": {
"type": [
"integer"
]
},
"previous_period_seconds": {
"type": [
"integer"
]
},
"project_id": {
"type": "integer"
},
"start": {
"type": "string"
},
"user_ids": {
"type": [
"integer"
]
}
}
]
© 2023 Toggl. All rights reserved.