Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
This Generic Extractor (https://developers.keboola.com/extend/generic-extractor/) configuration for Toggl API (https://github.com/toggl/toggl_api_docs) allows you to extract Workspaces, Users, Projects, Tasks, and Time Entries.
{
"parameters": {
"api": {
"authentication": {
"type": "basic"
},
"baseUrl": "https://toggl.com/"
},
"config": {
"id": "toggl",
"username": "YOUR-TOGGL-TOKEN-HERE",
"#password": "api_token",
"http": {
"headers": {
"Accept": "application/json"
}
},
"jobs": [{
"endpoint": "api/v8/workspaces",
"dataType": "workspaces",
"dataField": "",
"children": [{
"endpoint": "api/v8/workspaces/{id}/projects",
"dataType": "projects",
"dataField": "",
"placeholders": {
"id": "id"
},
"children": [{
"endpoint": "api/v8/projects/{id}/tasks",
"dataType": "tasks",
"dataField": "",
"placeholders": {
"id": "id"
}
}]
},
{
"endpoint": "api/v8/workspaces/{id}/users",
"dataType": "users",
"dataField": "",
"placeholders": {
"id": "id"
},
"children": [{
"endpoint": "reports/api/v2/details?user_agent={email}&workspace_id={default_wid}",
"dataType": "time_entries",
"dataField": "data",
"placeholders": {
"email": "email",
"default_wid": "default_wid"
}
}]
}
]
}]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment