Memberships
GET
/me/memberships
Retrieve a list of all organizations the user is a member of
查询参数
limit
integer
Limits the number of results to return.
reverse
boolean
Reverses the order in which the results are returned.
pageToken
string
The cursor that keeps track of the current position in the results.
status
string
Possible values: banned, invited, active
响应载荷
nextPageToken
string
The token to fetch the next page of results. If empty, there are no more results to fetch.
results
array of object
必填
显示子属性
results.organization
object
必填
The organization record
显示子属性
results.organization.id
string
必填
The organization's ID
results.organization.name
string
必填
Organization's display name.
results.organization.slug
string
必填
Human-readable identifier
results.organization.avatarUrl
string
URL to the organization avatar.
results.organization.status
string
必填
Current status
Possible values: active, banned
results.organization.statusReason
string
The reason for the organization's status (if any).
results.organization.pendingMemberCount
integer
How many members are pending to join the organization
results.organization.activeMemberCount
integer
必填
How many members are active
results.organization.owner
string
必填
ID of the user that owns the organization
results.organization.createdAt
string
必填
When the organization was created
results.organization.updatedAt
string
When the organization was last updated
results.organization.managedBy
array of object
List of entities managing the organization
显示子属性
results.organization.managedBy.Type
string
Type of the entity managing the organization
results.organization.managedBy.ID
string
ID of the entity managing the organization
results.organization.verified
boolean
results.status
string
必填
The status of user's membership on the organization.
Possible values: banned, invited, active
results.createdAt
string
必填
When the membership was created.
results.updatedAt
string
必填
When the membership was last updated.
results.roleIds
array of string
IDs of IAM roles assigned to the user.
results.roleRefs
array of object
The list of roles to assign to the membership
显示子属性
results.roleRefs.id
string
必填
results.roleRefs.type
string
必填
Possible values: organization, managed
results.roleRefs.workspaces
array of string
results.requiredSsoAuth
boolean
Indicates if SSO Authentication is required for this membership
results.requiredMfaAuth
boolean
Indicates if MFA Authentication is required for this membership
results.attributes
object
Additional attributes for the membership
代码示例
curl -X GET 'https://api.bird.com/me/memberships' \
-H 'Authorization: AccessKey YOUR_ACCESS_KEY'GET
/me/memberships/{organizationId}
Retrieve a single organization membership object.
响应载荷
organization
object
必填
The organization record
显示子属性
organization.id
string
必填
The organization's ID
organization.name
string
必填
Organization's display name.
organization.slug
string
必填
Human-readable identifier
organization.avatarUrl
string
URL to the organization avatar.
organization.status
string
必填
Current status
Possible values: active, banned
organization.statusReason
string
The reason for the organization's status (if any).
organization.pendingMemberCount
integer
How many members are pending to join the organization
organization.activeMemberCount
integer
必填
How many members are active
organization.owner
string
必填
ID of the user that owns the organization
organization.createdAt
string
必填
When the organization was created
organization.updatedAt
string
When the organization was last updated
organization.managedBy
array of object
List of entities managing the organization
显示子属性
organization.managedBy.Type
string
Type of the entity managing the organization
organization.managedBy.ID
string
ID of the entity managing the organization
organization.verified
boolean
status
string
必填
The status of user's membership on the organization.
Possible values: banned, invited, active
createdAt
string
必填
When the membership was created.
updatedAt
string
必填
When the membership was last updated.
roleIds
array of string
IDs of IAM roles assigned to the user.
roleRefs
array of object
The list of roles to assign to the membership
显示子属性
roleRefs.id
string
必填
roleRefs.type
string
必填
Possible values: organization, managed
roleRefs.workspaces
array of string
requiredSsoAuth
boolean
Indicates if SSO Authentication is required for this membership
requiredMfaAuth
boolean
Indicates if MFA Authentication is required for this membership
attributes
object
Additional attributes for the membership
代码示例
curl -X GET 'https://api.bird.com/me/memberships/{organizationId}' \
-H 'Authorization: AccessKey YOUR_ACCESS_KEY'POST
/me/memberships/{organizationId}
Accept a pending invitation to join the organization.
响应载荷
organization
object
必填
The organization record
显示子属性
organization.id
string
必填
The organization's ID
organization.name
string
必填
Organization's display name.
organization.slug
string
必填
Human-readable identifier
organization.avatarUrl
string
URL to the organization avatar.
organization.status
string
必填
Current status
Possible values: active, banned
organization.statusReason
string
The reason for the organization's status (if any).
organization.pendingMemberCount
integer
How many members are pending to join the organization
organization.activeMemberCount
integer
必填
How many members are active
organization.owner
string
必填
ID of the user that owns the organization
organization.createdAt
string
必填
When the organization was created
organization.updatedAt
string
When the organization was last updated
organization.managedBy
array of object
List of entities managing the organization
显示子属性
organization.managedBy.Type
string
Type of the entity managing the organization
organization.managedBy.ID
string
ID of the entity managing the organization
organization.verified
boolean
status
string
必填
The status of user's membership on the organization.
Possible values: banned, invited, active
createdAt
string
必填
When the membership was created.
updatedAt
string
必填
When the membership was last updated.
roleIds
array of string
IDs of IAM roles assigned to the user.
roleRefs
array of object
The list of roles to assign to the membership
显示子属性
roleRefs.id
string
必填
roleRefs.type
string
必填
Possible values: organization, managed
roleRefs.workspaces
array of string
requiredSsoAuth
boolean
Indicates if SSO Authentication is required for this membership
requiredMfaAuth
boolean
Indicates if MFA Authentication is required for this membership
attributes
object
Additional attributes for the membership
代码示例
curl -X POST 'https://api.bird.com/me/memberships/{organizationId}' \
-H 'Authorization: AccessKey YOUR_ACCESS_KEY'DELETE
/me/memberships/{organizationId}
Remove the membership from the organization for the current user
代码示例
curl -X DELETE 'https://api.bird.com/me/memberships/{organizationId}' \
-H 'Authorization: AccessKey YOUR_ACCESS_KEY'