-
Notifications
You must be signed in to change notification settings - Fork 88
RESTful API For ACL
Echo edited this page Mar 19, 2018
·
4 revisions
Request
GET /saltshaker/api/v1.0/acl/a-977a2b3a2b2d11e886cb000c298454d8
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"acl": {
"id": "a-977a2b3a2b2d11e886cb000c298454d8",
"deny": "rm -rf *;rm -rf /",
"name": "safe",
"allow": "",
"description": "不允许使用rm相关命令"
}
}
Request
GET /saltshaker/api/v1.0/role
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"acls": {
"acl": [
{
"id": "a-977a2b3a2b2d11e886cb000c298454d8",
"deny": "rm -rf *;'rm -rf /",
"name": "safjjjjjjje",
"allow": "",
"description": "不允许使用rm相关命令"
},
{
"id": "a-f710926a2b3611e886cb000c298454d8",
"deny": "",
"name": "danger",
"allow": "*",
"description": "任何命名"
}
]
}
}
Request
POST /saltshaker/api/v1.0/acl
POST Body
{
"name":"denger",
"allow": "*",
"deny":"",
"description":"任何命名"
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"status": true,
"message": ""
}
Request
DELETE /saltshaker/api/v1.0/acl/a-4d1e3d2c2b2a11e886cb000c298454d8
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"status": true,
"message": ""
}
Request
PUT /saltshaker/api/v1.0/acl/a-977a2b3a2b2d11e886cb000c298454d8
PUT Body
{
"id": "a-977a2b3a2b2d11e886cb000c298454d8",
"deny": "rm -rf *;'rm -rf /",
"name": "safe",
"description": "不允许使用rm相关命令"
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"status": true,
"message": ""
}