Portfolio Memberships

This object determines if a user is a member of a portfolio.

Portfolio Memberships have the following fields:
Field Description
id 1234 Read-only. Globally unique ID of the portfolio membership. Note: This field is under active migration to the gid field—please see our blog post for more information.
gid "1234" Read-only. Globally unique ID of the portfolio membership.
resource_type "portfolio_membership" Read-only. The resource type of this resource. The value for this resource is always portfolio_membership.
user { id: 12345, gid: "12345", name: "Tim Bizarro" } Read-only. The user in the membership.
portfolio { id: 1234, gid: "1234", name: 'Progress Tracking' } Read-only. Opt In. The portfolio the user is a member of.

QUERY FOR PORTFOLIO MEMBERSHIPS

GET    /portfolio_memberships

Returns the compact portfolio membership records for the portfolio. You must specify portfolio, portfolio and user, or workspace and user.

Parameter Description
portfolio "36985" The portfolio for which to fetch memberships.
workspace "1331" The workspace for which to fetch memberships.
user "14641" "me" "sashimi@asana.com" The user to filter the memberships on.
# Request
curl -H "Authorization: Bearer <personal_access_token>" \
https://app.asana.com/api/1.0/portfolio_memberships?portfolio=6242&user=5678

# Response
HTTP/1.1 200
{
  "data": [
    {
      "id": 7424,
      "gid": "7424",
      "resource_type": "portfolio_membership",
      "user": {
        "id": 5678,
        "gid": "5678",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    },
    "~..."
  ]
}

GET ALL MEMBERSHIPS FOR A PORTFOLIO

GET    /portfolios/{portfolio_gid}/portfolio_memberships

Returns the compact portfolio membership records for the portfolio.

Parameter Description
portfolio_gid "36985" Required: The portfolio for which to fetch memberships.
user "14641" "me" "sashimi@asana.com" If present, the user to filter the memberships on.
# Request
curl -H "Authorization: Bearer <personal_access_token>" \
https://app.asana.com/api/1.0/portfolios/1843/portfolio_memberships

# Response
HTTP/1.1 200
{
  "data": [
    {
      "id": 6342,
      "gid": "6342",
      "resource_type": "portfolio_membership",
      "user": {
        "id": 1234,
        "gid": "1234",
        "resource_type": "user",
        "name": "Tim Bizarro"
      }
    },
    {
      "id": 7424,
      "gid": "7424",
      "resource_type": "portfolio_membership",
      "user": {
        "id": 5678,
        "gid": "5678",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    },
    "~..."
  ]
}

GET A PORTFOLIO MEMBERSHIP

GET    /portfolio_memberships/{portfolio_membership_gid}

Returns the portfolio membership record.

Parameter Description
portfolio_membership_gid "34729" Required: Globally unique identifier for the portfolio membership.
# Request
curl -H "Authorization: Bearer <personal_access_token>" \
https://app.asana.com/api/1.0/portfolio_memberships/1012

# Response
HTTP/1.1 200
{
  "data": {
    "id": 6274,
    "gid": "6274",
    "resource_type": "portfolio_membership",
    "user": {
      "id": 1234,
      "gid": "1234",
      "resource_type": "user",
      "name": "Tim Bizarro"
    }
  }
}