Asana API

Getting access, Developing, Testing

Back to Asana

Get Multiple Memberships

Returns compact goal_membership, team_membership, project_membership, portfolio_membership, or workspace_membership records. The possible types for parent in this request are project, portfolio, team, goal, and workspace. An additional member (user GID or team GID) can be passed in to filter to a specific membership. If a parent param is not provided, a member, resource_subtype, and workspace param must be provided.

Input

type: object properties: parameters: type: object properties: parent: type: string description: |- Globally unique identifier for `project`, `portfolio`, `team`, `goal`, and `workspace`. member: type: string description: Globally unique identifier for `team` or `user`. resource_subtype: type: string description: >- The resource_subtype to filter on. Must be provided with `member` and `workspace` if `parent` is not provided. Valid values include `team_membership`, `workspace_membership`, `portfolio_membership` workspace: type: string description: >- The workspace to filter on. Must be provided with `member` and `resource_subtype` if `parent` is not provided. limit: type: integer description: Pagination limit for the request. offset: type: string description: >- Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' title: Parameters

Output

type: object properties: data: type: array items: anyOf: - description: A generic Asana Resource, containing a globally unique identifier. type: object x-docs-overrides: properties.resource_type.example: project_membership properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid user: description: >- A generic Asana Resource, containing a globally unique identifier. type: object x-docs-overrides: properties.resource_type.example: user properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: type: string description: >- *Read-only except when same user as requester*. The user’s name. example: Greg Sanchez project: description: >- [Opt In](/docs/inputoutput-options). The project the user is a member of. type: object x-docs-overrides: properties.resource_type.example: project properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: description: >- Name of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer. type: string example: Stuff to buy member: description: Member can be a user or a team. type: object x-docs-overrides: properties.resource_type.example: member properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: type: string description: The name of the member example: Greg Sanchez write_access: description: >- Whether the member has full access, edit access, or comment-only access to the project. type: string enum: - full_write - editor - comment_only readOnly: true example: full_write - description: A generic Asana Resource, containing a globally unique identifier. type: object x-docs-overrides: properties.resource_type.example: portfolio_membership properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid portfolio: description: >- [Opt In](/docs/inputoutput-options). The portfolio the user is a member of. type: object x-docs-overrides: properties.resource_type.example: portfolio properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: description: The name of the portfolio. type: string example: Bug Portfolio user: description: >- A generic Asana Resource, containing a globally unique identifier. type: object x-docs-overrides: properties.resource_type.example: user properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: type: string description: >- *Read-only except when same user as requester*. The user’s name. example: Greg Sanchez - description: A generic Asana Resource, containing a globally unique identifier. type: object x-docs-overrides: properties.resource_type.example: team_membership properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid user: description: >- A generic Asana Resource, containing a globally unique identifier. type: object x-docs-overrides: properties.resource_type.example: user properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: type: string description: >- *Read-only except when same user as requester*. The user’s name. example: Greg Sanchez team: description: >- A generic Asana Resource, containing a globally unique identifier. type: object x-docs-overrides: properties.resource_type.example: team properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: description: The name of the team. type: string example: Marketing is_guest: type: boolean description: Describes if the user is a guest in the team. example: false is_limited_access: type: boolean description: Describes if the user has limited access to the team. example: false is_admin: type: boolean description: Describes if the user is a team admin. example: false - description: A generic Asana Resource, containing a globally unique identifier. type: object x-docs-overrides: properties.resource_type.example: goal_membership properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid member: description: >- A generic Asana Resource, containing a globally unique identifier. type: object x-docs-overrides: properties.resource_type.example: member properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: type: string description: The name of the member example: Greg Sanchez goal: description: >- A generic Asana Resource, containing a globally unique identifier. type: object x-docs-overrides: properties.resource_type.example: goal properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: type: string description: The name of the goal. example: Grow web traffic by 30% owner: description: >- A generic Asana Resource, containing a globally unique identifier. type: object x-docs-overrides: properties.resource_type.example: user nullable: true properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: type: string description: >- *Read-only except when same user as requester*. The user’s name. example: Greg Sanchez is_commenter: type: boolean description: Describes if the member is comment only in goal. example: false is_editor: type: boolean description: Describes if the member is editor in goal. example: false - description: A generic Asana Resource, containing a globally unique identifier. type: object x-docs-overrides: properties.resource_type.example: workspace_membership properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid user: description: >- A generic Asana Resource, containing a globally unique identifier. type: object x-docs-overrides: properties.resource_type.example: user properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: type: string description: >- *Read-only except when same user as requester*. The user’s name. example: Greg Sanchez workspace: description: >- A generic Asana Resource, containing a globally unique identifier. type: object x-docs-overrides: properties.resource_type.example: workspace properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: description: The name of the workspace. type: string example: My Company Workspace user_task_list: description: The user's "My Tasks" in the workspace. readOnly: true type: object x-docs-overrides: properties.resource_type.example: user_task_list properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: description: The name of the user task list. type: string example: My Tasks in My Workspace owner: description: >- The owner of the user task list, i.e. the person whose My Tasks is represented by this resource. readOnly: true type: object x-docs-overrides: properties.resource_type.example: user properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: type: string description: >- *Read-only except when same user as requester*. The user’s name. example: Greg Sanchez workspace: description: The workspace in which the user task list is located. readOnly: true type: object x-docs-overrides: properties.resource_type.example: workspace properties: gid: description: Globally unique identifier of the resource, as a string. type: string readOnly: true example: '12345' x-insert-after: false resource_type: description: The base type of this resource. type: string readOnly: true example: task x-insert-after: gid name: description: The name of the workspace. type: string example: My Company Workspace is_active: type: boolean readOnly: true description: Reflects if this user still a member of the workspace. is_admin: type: boolean readOnly: true description: Reflects if this user is an admin of the workspace. is_guest: type: boolean readOnly: true description: Reflects if this user is a guest of the workspace. vacation_dates: type: object readOnly: true nullable: true description: >- Contains keys `start_on` and `end_on` for the vacation dates for the user in this workspace. If `start_on` is null, the entire `vacation_dates` object will be null. If `end_on` is before today, the entire `vacation_dates` object will be null. properties: start_on: description: >- The day on which the user's vacation in this workspace starts. This is a date with `YYYY-MM-DD` format. type: string example: '2022-11-05T00:00:00.000Z' end_on: description: >- The day on which the user's vacation in this workspace ends, or null if there is no end date. This is a date with `YYYY-MM-DD` format. nullable: true type: string example: '2022-11-07T00:00:00.000Z' created_at: description: The time at which this resource was created. type: string format: date-time readOnly: true example: '2012-02-22T02:06:58.147Z'