> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://nemo-platform.docs.buildwithfern.com/nemo/platform/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://nemo-platform.docs.buildwithfern.com/nemo/platform/_mcp/server.

# List role bindings

GET https://host.com/apis/auth/v2/iam/role-bindings

List all role bindings (Platform Admin only)

Reference: https://nemo-platform.docs.buildwithfern.com/nemo/platform/nemo/platform/documentation/reference/api-reference/iam/list-role-bindings-apis-auth-v-2-iam-role-bindings-get

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Nemo Platform API
  version: 1.0.0
paths:
  /apis/auth/v2/iam/role-bindings:
    get:
      operationId: list-role-bindings-apis-auth-v-2-iam-role-bindings-get
      summary: List role bindings
      description: List all role bindings (Platform Admin only)
      tags:
        - subpackage_iam
      parameters:
        - name: page
          in: query
          description: Page number.
          required: false
          schema:
            type: integer
            default: 1
        - name: page_size
          in: query
          description: Page size.
          required: false
          schema:
            type: integer
            default: 10
        - name: sort
          in: query
          description: >-
            The field to sort by. To sort in decreasing order, use `-` in front
            of the field name.
          required: false
          schema:
            type: string
            default: created_at
        - name: filter
          in: query
          description: >-
            Filter role bindings by principal, workspace, role, granted_by,
            is_active, granted_at, and revoked_at.
          required: false
          schema:
            $ref: '#/components/schemas/RoleBindingFilter'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleBindingsPage'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
servers:
  - url: https://host.com
    description: Default
components:
  schemas:
    DateRangeFilter:
      type: object
      properties:
        gte:
          type: string
          format: date-time
          description: Greater than or equal to this date
        lte:
          type: string
          format: date-time
          description: Less than or equal to this date
      description: Filter for date ranges.
      title: DateRangeFilter
    RoleBindingFilter:
      type: object
      properties:
        principal:
          type: string
          description: Filter by principal ID
        workspace:
          type: string
          description: Filter by workspace
        role:
          type: string
          description: Filter by role
        granted_by:
          type: string
          description: Filter by who granted the role
        is_active:
          type: boolean
          description: Filter for active (True) or revoked (False) bindings
        granted_at:
          $ref: '#/components/schemas/DateRangeFilter'
          description: Filter by granted date range
        revoked_at:
          $ref: '#/components/schemas/DateRangeFilter'
          description: Filter by revoked date range
      description: Filter for role bindings.
      title: RoleBindingFilter
    RoleBinding:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        principal:
          type: string
        workspace:
          type: string
        role:
          type: string
        granted_by:
          type: string
        granted_at:
          type: string
          format: date-time
        revoked_at:
          type: string
          format: date-time
      required:
        - id
        - name
        - principal
        - workspace
        - role
        - granted_by
        - granted_at
        - revoked_at
      description: Role binding response model.
      title: RoleBinding
    PaginationData:
      type: object
      properties:
        page:
          type: integer
          description: The current page number.
        page_size:
          type: integer
          description: The page size used for the query.
        current_page_size:
          type: integer
          description: The size for the current page.
        total_pages:
          type: integer
          description: The total number of pages.
        total_results:
          type: integer
          description: The total number of results.
      required:
        - page
        - page_size
        - current_page_size
        - total_pages
        - total_results
      title: PaginationData
    RoleBindingsPage:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/RoleBinding'
        pagination:
          $ref: '#/components/schemas/PaginationData'
          description: Pagination information.
        sort:
          type: string
          description: The field on which the results are sorted.
        filter:
          type: object
          additionalProperties:
            description: Any type
          description: Filtering information.
      required:
        - data
      title: RoleBindingsPage
    ValidationErrorLocItems:
      oneOf:
        - type: string
        - type: integer
      title: ValidationErrorLocItems
    ValidationError:
      type: object
      properties:
        loc:
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorLocItems'
        msg:
          type: string
        type:
          type: string
        input:
          description: Any type
        ctx:
          type: object
          additionalProperties:
            description: Any type
      required:
        - loc
        - msg
        - type
      title: ValidationError
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
      title: HTTPValidationError

```

## Examples



**Request**

```json
{}
```

**Response**

```json
{
  "data": [
    {
      "id": "rb-9f8c7d6e5b4a3c2d1e0f",
      "name": "Workspace Admin Binding",
      "principal": "user-123e4567-e89b-12d3-a456-426614174000",
      "workspace": "workspace-9876abcd-4321-efgh-5678-ijklmnopqrst",
      "role": "admin",
      "granted_by": "user-abcdef12-3456-7890-abcd-ef1234567890",
      "granted_at": "2024-01-15T09:30:00Z",
      "revoked_at": "2024-02-20T17:45:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "page_size": 10,
    "current_page_size": 1,
    "total_pages": 1,
    "total_results": 1
  },
  "sort": "created_at",
  "filter": {}
}
```

**SDK Code**

```python
import requests

url = "https://host.com/apis/auth/v2/iam/role-bindings"

payload = {}
headers = {"Content-Type": "application/json"}

response = requests.get(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://host.com/apis/auth/v2/iam/role-bindings';
const options = {method: 'GET', headers: {'Content-Type': 'application/json'}, body: '{}'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://host.com/apis/auth/v2/iam/role-bindings"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://host.com/apis/auth/v2/iam/role-bindings")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://host.com/apis/auth/v2/iam/role-bindings")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://host.com/apis/auth/v2/iam/role-bindings', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://host.com/apis/auth/v2/iam/role-bindings");
var request = new RestRequest(Method.GET);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://host.com/apis/auth/v2/iam/role-bindings")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```