Vacation dates now available from WorkspaceMemberships

tl;dr:


Hey folks,

We’ve added a vacation_dates field to WorkspaceMemberships. Vacation dates in the API map to “out of office” in Asana.

Example

{
  "gid": "12345",
  "resource_type": "workspace_membership",
  "user": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  },
  "workspace": {
    "gid": "12345",
    "resource_type": "workspace",
    "name": "My Company Workspace"
  },
  "is_active": true,
  "is_admin": true,
  "is_guest": true,
  "user_task_list": {
    "gid": "12345",
    "resource_type": "user_task_list",
    "name": "My Tasks in My Workspace",
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  },
  "vacation_dates": {
    "end_on": "2022-11-07",
    "start_on": "2022-11-05"
  }
}

Impact

You will be able to check vacation dates for a user via the API. For the moment, this is read-only.

Timeline

Generally available now (2022-11-16).


Yours in Developer Relations,
Sasha, on behalf of the Asana API Team

3 Likes

Can you confirm this is still a single date range and not a collection of dates or ranges?

Thanks!

This is great. Any plans to have the ability to update this date via the api?

Would also be great to be able to add numerous date sets. E.g., if we have a PTO form that users can submit throughout the year, it would add those date spans to Asana.

I can confirm that. What this endpoint does is provide API access to this info in My Settings:

image

I don’t know if there are plans to make it updateable via the API, although this comment

For the moment, this is read-only.

(emphasis mine) gives me hope.

2 Likes