Hey everyone,
I’ve just started using KNIME and I think it would be a useful tool in producing reports about how we use our hours. We use the Toggl software to track what task we’re working on at a given time.
My intent is to use the Toggl API:
and the ‘GET Request’ node. I would then use an excel reader writer node. I’ve trawled the web for threads regarding the Toggl API in Knime but without luck.
The Get Request node produces the desired output for the base URL but for any of the other reports (detailed,Weekly,Report) it doesn’t seem to work.
Any recommendations would be very welcome thankyou!
Good morning from Australia and thanks for the quick response.
When I run the Get request node for the base URL I return under the ‘body’ column
{“Welcome to reports api V2. VALID requests are:”:[{"":"/reports/api/v2/index(.)"},{"":"/reports/api/v2(.)"},{"":"/reports/api/v2/revision(.)"},{"":"/reports/api/v2/login(.)"},{“GET”:"/reports/api/v2/summary(.)"},{"":"/reports/api/v2/bookmark(.)"},{“GET”:"/reports/api/v2/division_by_zero_error(.)"},{“GET”:"/reports/api/v2/error500(.)"},{“GET”:"/reports/api/v2/error400(.)"},{“GET”:"/reports/api/v2/combo(.)"},{“GET”:"/reports/api/v2/env(.)"},{“GET”:"/reports/api/v2/weekly(.)"},{“GET”:"/reports/api/v2/details(.)"},{“GET”:"/reports/api/v2/combined(.)"},{“GET”:"/reports/api/v2/project(.)"},{"":"/reports/api/v2/logout(.)"}]}
which, from what I understand, means that there is a connection with Toggl. Also, under the column header “status” it returns 200.
Yet when I try to run the same node for the other URLs it does not return anything under the body column and 400 under the ‘Status’ column.
Good Morning Oole,
I believe I am Authenticating properly, I’ve chosen the ‘basic’ option under the Authentication tab on the GET Request node. I’ve also used ‘api_token’ as the username and the API token in base 64 as the Toggl API page suggests. I’ve also inputted ‘user_agent’ and ‘workspace_id’ in the request headers tab.
I’m not sure what you mean by testing it with a cURL, could you please explain?
Thank you for your response, I look forward to using KNIME more and more!
cURL is a tool to send webrequests from the command line: https://curl.haxx.se/, you can use it to test your requests. If you want to use a graphical tool, you can try out something like https://insomnia.rest/.