Skip to main content

rbac_roles_create

POST 

/api/v3//rbac/roles/

Role viewset

Request

Bodyrequired

    namestringrequired

    Possible values: non-empty and <= 150 characters

Responses

Schema
    pkuuidrequired
    namestringrequired

    Possible values: <= 150 characters

Authorization: http

name: authentiktype: httpscheme: bearer
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "/api/v3/rbac/roles/");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"name\": \"string\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
/api/v3
Auth
Body required
{
  "name": "string"
}