Skip to content

Instantly share code, notes, and snippets.

@odinuv
Created April 27, 2017 13:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save odinuv/5d782dd6cdcdfd9a09617e766cb45087 to your computer and use it in GitHub Desktop.
Save odinuv/5d782dd6cdcdfd9a09617e766cb45087 to your computer and use it in GitHub Desktop.
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