REST API

edit

Info API

edit

The Info API returns basic information about the Shield installation.

To get Shield info, submit a GET request to the _shield endpoint:

GET _shield

A successful call returns a JSON structure that contains information such as the plugin version and status:

{
  "status": "enabled",
  "name": "Golden Archer",
  "cluster_name": "elasticsearch",
  "version": {
    "number": "2.2.0",
    "build_hash": "1f974b97ad2a18ed1999edb78575ad73e564ce57",
    "build_timestamp": "2016-01-06T22:39:20Z",
    "build_snapshot": false
  },
  "tagline": "You Know, for Security"
}

Clear Cache API

edit

The Clear Cache API evicts users from the user cache. You can completely clear the cache or evict specific users.

For example, to evict all users cached by the default esusers realm:

POST _shield/realm/default_esusers/_cache/clear

To evict selected users, specify the usernames parameter:

POST _shield/realm/default_esusers/_cache/clear?usernames=rdeniro,alpacino'

To clear the caches for multiple realms, specify the realms as a comma-delimited list:

$ curl -XPOST 'http://localhost:9200/_shield/realm/default_esusers,ldap1/_cache/clear'

For more information, see Controlling the User Cache.