---
title: "Search Role"
method: POST
path: "/management/v1/search/role"
tags: ["role"]
---

# Search Role

`POST /management/v1/search/role`

## Request

- Base URL: `https://localhost`
- URL: `https://localhost/management/v1/search/role`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/lakekeeper/apis/lakekeeper-management-api/docs/management/v1/search/role/post.ts> (a function with typed inputs; its response is checked against the schema)

Performs a fuzzy search for roles based on the provided criteria.

## Headers

- `x-project-id` string, nullable

## Request body

- SearchRoleRequest
  - `project-id` string, nullable: Deprecated: Please use the `x-project-id` header instead. Project ID in which the role is created.
  - `search` string, required: Search string for fuzzy search. Length is truncated to 64 characters.

## Response `200`

List of roles

- SearchRoleResponse
  - `roles` Role[], required: List of roles matching the search criteria
    - `created-at` string, date-time, required: Timestamp when the role was created
    - `description` string, nullable: Description of the role
    - `id` string, uuid, required: Globally unique UUID identifier
    - `ident` string, required: Composite project-scoped identifier (`provider~source_id`). Unique within a project.
    - `name` string, required: Name of the role
    - `project-id` string, required: Project ID in which the role is created.
    - `provider-id` string, required: Provider that owns this role (e.g. `"lakekeeper"`, `"oidc"`).
    - `source-id` string, required: Identifier of the role in the provider.
    - `updated-at` string, date-time, nullable: Timestamp when the role was last updated

## Other responses

- `4XX`

---

[API](https://skmtc.dev/lakekeeper/apis/lakekeeper-management-api.md) - [All operations](https://skmtc.dev/lakekeeper/apis/lakekeeper-management-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lakekeeper/apis/lakekeeper-management-api/revisions/c5cb9a12a98c?raw)
