---
title: "POST /get-role"
method: POST
path: "/get-role"
tags: ["v2"]
---

# POST /get-role

`POST /get-role`

## Request body

- GetRole
  - `json` boolean — Set output format to JSON
  - `name` string, required — Role name
  - `token` string — Authentication token (see `/auth` and `/configure`)
  - `uid-token` string — The universal identity token, Required only for universal_identity authentication

## Response `200`

getRoleResponse wraps response body.

- Role
  - `access_date` string, date-time
  - `access_date_display` string
  - `client_permissions` string[]
  - `comment` string
  - `creation_date` string, date-time
  - `delete_protection` boolean
  - `modification_date` string, date-time
  - `role_auth_methods_assoc` RoleAuthMethodAssociation[]
    - `assoc_id` string
    - `auth_method_access_id` string
    - `auth_method_id` integer
    - `auth_method_name` string
    - `auth_method_sub_claims` object
    - `is_subclaims_with_operator` boolean
    - `sub_claims_case_sensitive` boolean
  - `role_id` integer
  - `role_name` string
  - `rules` Rules
    - `admin` boolean — Is admin
    - `path_rules` PathRule[] — The path the rules refers to
      - `assigners` RuleAssigner[]
        - `access_id` string
        - `unique_id` string
      - `capabilities` string[] — The approved/denied capabilities in the path
      - `cb` integer
      - `is_limit_access` boolean — flag that indicate that this rule is allowed to be access RemainingAccess of times.
      - `item_id` integer — The item id this rule directly refers to (when applicable)
      - `number_of_access_used` integer
      - `number_of_allowed_access` integer
      - `path` string — The path the rule refers to
      - `start_time` integer
      - `ttl` integer
      - `type` string

## Other responses

- `default` — errorResponse wraps any error to return it as a JSON object with one "error" field.

---

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