---
title: "Get a list of kubernetes role bindings"
method: GET
path: "/kubernetes/{id}/rolebindings"
tags: ["kubernetes"]
---

# Get a list of kubernetes role bindings

`GET /kubernetes/{id}/rolebindings`

Get a list of kubernetes role bindings that the user has access to.
**Access policy**: Authenticated user.

## Path parameters

- `id` integer, required

## Response `200`

Success

- KubernetesK8sRoleBinding[]
  - `creationDate` string
  - `isSystem` boolean
  - `name` string
  - `namespace` string
  - `roleRef` V1RoleRef
    - `apiGroup` string — APIGroup is the group for the resource being referenced
    - `kind` string — Kind is the type of resource being referenced
    - `name` string — Name is the name of resource being referenced +required +k8s:required
  - `subjects` K8sIoApiRbacV1Subject[]
    - `apiGroup` string — APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects. +optional
    - `kind` string — Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.
    - `name` string — Name of the object being referenced. +required +k8s:required
    - `namespace` string — Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error. +optional
  - `uid` string

## Other responses

- `400` — Invalid request payload, such as missing required fields or fields not meeting validation criteria.
- `401` — Unauthorized access - the user is not authenticated or does not have the necessary permissions. Ensure that you have provided a valid API key or JWT token, and that you have the required permissions.
- `403` — Permission denied - the user is authenticated but does not have the necessary permissions to access the requested resource or perform the specified operation. Check your user roles and permissions.
- `404` — Unable to find an environment with the specified identifier.
- `500` — Server error occurred while attempting to retrieve the list of role bindings.

---

[API](https://skmtc.net/portainer/apis/portainerce-api.md) · [All operations](https://skmtc.net/portainer/apis/portainerce-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/portainer/portainerce-api/versions/c0b0975cd11b/schema)
