Get user privileges API

edit

Retrieves the security privileges for the logged in user.

Request

edit

GET /_security/user/_privileges

Prerequisites

edit

Description

edit

To check whether a user has a specific list of privileges, use the has privileges API.

Examples

edit
GET /_security/user/_privileges
{
  "cluster" : [
    "all"
  ],
  "global" : [ ],
  "indices" : [
    {
      "names" : [
        "*"
      ],
      "privileges" : [
        "all"
      ],
      "allow_restricted_indices" : true
    }
  ],
  "applications" : [
    {
      "application" : "*",
      "privileges" : [
        "*"
      ],
      "resources" : [
        "*"
      ]
    }
  ],
  "run_as" : [
    "*"
  ]
}