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.
Example Project Members
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
kind
required string
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
kind
required string apiVersion
required string
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
apiVersion
required string metadata
required object
metadata
required object teams
required object[]
Teams holds all the teams that have access to the cluster
teams
required object[] users
required object[]
Users holds all the users that have access to the cluster
users
required object[] 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"