Retrieve Project Members
This API can be used to retrieve all users and teams that are members of this project. Does not include loft wide admins.
Project Members example​
An example Project Members:
apiVersion: management.loft.sh/v1
kind: ProjectMembers
metadata:
  creationTimestamp: null
teams:
- info:
    displayName: My Team
    name: my-team
users:
- info:
    displayName: My User
    email: my-email
    name: my-user
Project Members reference​
teams required object[]  ​
Teams holds all the teams that have access to the cluster
teams required object[]  ​info required object  ​
Info about the user or team
info required object  ​name required string  ​
Name is the kubernetes name of the object
name required string  ​displayName required string  ​
The display name shown in the UI
displayName required string  ​icon required string  ​
Icon is the icon of the user / team
icon required string  ​username required string  ​
The username that is used to login
username required string  ​email required string  ​
The users email address
email required string  ​subject required string  ​
The user subject
subject required string  ​users required object[]  ​
Users holds all the users that have access to the cluster
users required object[]  ​info required object  ​
Info about the user or team
info required object  ​name required string  ​
Name is the kubernetes name of the object
name required string  ​displayName required string  ​
The display name shown in the UI
displayName required string  ​icon required string  ​
Icon is the icon of the user / team
icon required string  ​username required string  ​
The username that is used to login
username required string  ​email required string  ​
The users email address
email required string  ​subject required string  ​
The user subject
subject required string  ​Project Members (Get)​
You can retrieve all project users and teams through this API.
- kubectl
- curl
Run the following command:
# Exchange my-object in the url below with the name of the Project Members
kubectl get --raw "/kubernetes/management/apis/management.loft.sh/v1/projects/my-object/members"
Run the following curl command:
# Exchange my-object in the url below with the name of the Project Members
curl -s -X GET --insecure \
     "https://$LOFT_DOMAIN/kubernetes/management/apis/management.loft.sh/v1/projects/my-object/members" \
     -H "Authorization: Bearer $ACCESS_KEY"