Appearance
Get memberships from a team
API Reference📘
Customizing the response Skip link to Customizing the response
Requests to this endpoint return "compact" team membership objects ( schema) by default. To include more fields in the response, see input/output options.
team_gid
string
required
Globally unique identifier for the team.
opt_fields
array of strings
This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
opt_fields ADD string
opt_pretty
boolean
Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
truetruefalse
limit
integer
1 to 100
Results per page. The number of objects to return per page. The value must be between 1 and 100.
offset
string
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.
``200 Successfully retrieved the requested team's memberships.
object
data
array of objects
data
object
This object represents a user's connection to a team.
gid
string
Globally unique identifier of the resource, as a string.
resource_type
string
The base type of this resource.
user
object
A user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
user object
team
object
Full object requires scope:teams:read
A team is used to group related projects and people together within an organization. Each project in an organization is associated with a team.
team object
is_guest
boolean
Describes if the user is a guest in the team.
is_limited_access
boolean
Describes if the user has limited access to the team.
is_admin
boolean
Describes if the user is a team admin.
next_page
object | null
Conditional. This property is only present when a limit query parameter is provided in the request. When making a paginated request, the API will return a number of results as specified by the limit parameter. If more results exist, then the response will contain a next_page attribute, which will include an offset, a relative path attribute, and a full uri attribute. If there are no more pages available, next_page will be null and no offset will be provided. Note that an offset token will expire after some time, as data may have changed.
offset
string
Pagination offset for the request.
path
string
A relative path containing the query parameters to fetch for next_page
uri
uri
A full uri containing the query parameters to fetch for next_page
``400 This usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
``401 A valid authentication token was not provided with the request, so the API could not associate a user with the request.
``403 The authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
``404 Either the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
``500 There was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
Updated 28 days ago
Did this page help you?
Yes
No
ShellNodeRubyPHPPython
xxxxxxxxxx
curl --request GET \
--url https://app.asana.com/api/1.0/teams/team_gid/team_memberships \
--header 'accept: application/json'
xxxxxxxxxx
{
"data": [\
\
{\
\
"gid": "12345",\
\
"resource_type": "team_membership",\
\
"user": {\
\
"gid": "12345",\
\
"resource_type": "user",\
\
"name": "Greg Sanchez"\
\
},\
\
"team": {\
\
"gid": "12345",\
\
"resource_type": "team",\
\
"name": "Marketing"\
\
},\
\
"is_guest": false,\
\
"is_limited_access": false,\
\
"is_admin": false\
\
}\
\
],
"next_page": {
"offset": "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9",
"path": "/tasks/12345/attachments?limit=2&offset=eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9",
"uri": "https://app.asana.com/api/1.0/tasks/12345/attachments?limit=2&offset=eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9"
}
}Updated28 days ago
Did this page help you?
Yes
No