application/json

Body Required

CreateRoleRequest is the request of CreateRole.

  • role object
    Hide role attributes Show role attributes object
    • description string

      The description of the role.

    • name string

      The unique name of the role.

    • permissions array[string]

Responses

  • 201 application/json

    Role Created

    Hide response attribute Show response attribute object
    • role object
      Hide role attributes Show role attributes object
      • created_at string(date-time)
      • description string

        The description of the role.

      • id string
      • is_builtin boolean

        Whether the role is a built-in role. Built-in roles cannot be modified or deleted.

      • name string

        The unique name of the role.

      • permissions array[string]
      • updated_at string(date-time)
  • 500 application/json

    Internal Server Error. Reach out to support.

    Hide response attributes Show response attributes object
    • code string(int32)

      RPC status code, as described here.

      Values are OK, CANCELLED, UNKNOWN, INVALID_ARGUMENT, DEADLINE_EXCEEDED, NOT_FOUND, ALREADY_EXISTS, PERMISSION_DENIED, UNAUTHENTICATED, RESOURCE_EXHAUSTED, FAILED_PRECONDITION, ABORTED, OUT_OF_RANGE, UNIMPLEMENTED, INTERNAL, UNAVAILABLE, or DATA_LOSS.

    • details array[object]

      A list of messages that carries the error details.

      Details of the error.

      Details of the error.

      One of:
    • message string

      Detailed error message. No compatibility guarantees are given for the text contained in this message.

  • default application/json

    An unexpected error response.

    Hide response attributes Show response attributes object
    • code string(int32)

      RPC status code, as described here.

      Values are OK, CANCELLED, UNKNOWN, INVALID_ARGUMENT, DEADLINE_EXCEEDED, NOT_FOUND, ALREADY_EXISTS, PERMISSION_DENIED, UNAUTHENTICATED, RESOURCE_EXHAUSTED, FAILED_PRECONDITION, ABORTED, OUT_OF_RANGE, UNIMPLEMENTED, INTERNAL, UNAVAILABLE, or DATA_LOSS.

    • details array[object]

      A list of messages that carries the error details.

      Details of the error.

      Details of the error.

      One of:
    • message string

      Detailed error message. No compatibility guarantees are given for the text contained in this message.

POST /v1/roles
curl \
 --request POST 'https://api.redpanda.com/v1/roles' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"role":{"description":"Billing Admins have access to billing information.","name":"billing_admin","permissions":["string"]}}'
Request examples
{
  "role": {
    "description": "Billing Admins have access to billing information.",
    "name": "billing_admin",
    "permissions": [
      "string"
    ]
  }
}
Response examples (201)
{
  "role": {
    "created_at": "2025-05-04T09:42:00Z",
    "description": "Billing Admins have access to billing information.",
    "id": "string",
    "is_builtin": true,
    "name": "billing_admin",
    "permissions": [
      "string"
    ],
    "updated_at": "2025-05-04T09:42:00Z"
  }
}
Response examples (500)
{
  "code": "OK",
  "details": [
    {
      "@type": "type.googleapis.com/google.rpc.BadRequest",
      "field_violations": [
        {
          "description": "string",
          "field": "string",
          "localized_message": {
            "locale": "string",
            "message": "string"
          },
          "reason": "string"
        }
      ]
    }
  ],
  "message": "string"
}
Response examples (default)
{
  "code": "OK",
  "details": [
    {
      "@type": "type.googleapis.com/google.rpc.BadRequest",
      "field_violations": [
        {
          "description": "string",
          "field": "string",
          "localized_message": {
            "locale": "string",
            "message": "string"
          },
          "reason": "string"
        }
      ]
    }
  ],
  "message": "string"
}

Documentation preview

will expire on December 14 at 02:50

This is a preview of your version @2025-12-07.