Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 466 Bytes

create-role.md

File metadata and controls

30 lines (24 loc) · 466 Bytes

建立一个能够读取,写入 test_index_1 的角色

request:
PUT /_xpack/security/role/read_test_index_1 HTTP/1.1
Host: localhost:9200
Content-Type: application/json
Authorization: Basic ZWxhc3RpYzpjaGFuY2UxMjM=
Cache-Control: no-cache
Postman-Token: 6c971717-aa46-011d-a523-f4a4da5a2414

{
  "indices": [
    {
      "names": [ "test_index_1"],
      "privileges": ["write"]
    }
  ]
}

response:
{
    "role": {
        "created": true
    }
}