Get time tracking sessions with API v2

Hi Monday!

I am looking for a way to collect the sessions recorded by the time tracking column in the items.
The proposal is to be able to export it to Google Sheets as a big table contain all the sessions with additional data I will add.

Currently, I am trying to leverage the new API with GraphQL in order to export the sessions each user did and unable to do that.

This is the query I am sending:

   {
     boards(ids: [MY_BOARD_IDS]) {
        id
        name
        tags {
          id
          name
        }
        items (ids: [MY_TRACKED_ITEM_IDS]) {
          id
          name
          column_values (ids: ["time_tracking"]) {
            id
            value
          }
        }
      }
   }

And the response doesn’t contain the sessions as can be seen on the GUI.

The value node contains the following information.
{
“running”:“false”,
“startDate”:1597066904,
“duration”:18720,
“changed_at”:“2020-08-10T18:53:44.830Z”
}

What I was expected to see is an array of sessions with the following data:

  • time started (as timestamp)
  • duration (in seconds)
1 Like

Hey @dorshiff :wave: Thanks for reaching out and a very warm welcome to the community! I hope you enjoy your stay :slight_smile:

To be transparent with you, this is currently the expected behavior of the API as of now. I can definitely relate to how getting the session information would be much more useful, and I’ve made sure to pass that as feedback to our development team. That said, I am afraid I can not provide an API workaround to get a different result in this case.

You might already be aware of this being an option, but you can also export the Time Tracking data within a cell ot Excel:

I understand that might not be the automatic solution you are looking for here, but I thought it might help too.

-Alex

Hi Alex,

Thank you for the response.

I am familliar with the option to export to excel the time tracking log but as you mentioned, it is not automatic and not structured in a way I will be able to parse it.

In the applications API the sessions data is accessible?
I will be able to craft a monday App to use it in a dashboard?

1 Like

@dorshiff

Thank you for getting back to me on this and for your understanding!

To be transparent with you, this is something I’ll have to check over with team just to be sure myself, and I’m not quite certain if we can provide something like this as of now. Seeing as we have a Time Tracking widget that can pull data based on time tracking sessions, I’d like to extrapolate here and say it should be possible, but transparently, I can’t confirm this.

I’ve passed the question to our dev team and hopefully, they will be able to shed more light on this for me :slight_smile:

-Alex

Any news on this on ?

Hey @MartinSvava, a very warm welcome to the community! and congrats on making your first post with us :slight_smile: I hope you enjoy your stay.

I know everyone is waiting for this to be released and like I mentioned in the other thread, we are getting quite close to release this. As soon as this is out and approved, I’ll post in the Feature Request thread with an update.

I’m going to close this topic for now.

-Alex