Get user privileges APIedit

Retrieves the security privileges for the logged in user.

Requestedit

GET /_security/user/_privileges

Prerequisitesedit

Descriptionedit

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

Examplesedit

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