Bulk create or update roles
POST
/_security/role The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. The bulk create or update roles API cannot update roles that are defined in roles files.
Required authorization
- Cluster privileges:
manage_security
Parameters
query Query Parameters
| Name | Type |
|---|---|
refresh If | type TypesRefresh = "true" | "false" | "wait_for" |
Request Body
application/json
required
{ roles: { }; }
Responses
200 application/json
{
created?: string[];
updated?: string[];
noop?: string[];
errors?:SecurityTypesBulkError ;
}
created?: string[];
updated?: string[];
noop?: string[];
errors?:
}