-
Notifications
You must be signed in to change notification settings - Fork 88
RESTful API For User
Echo edited this page Apr 6, 2018
·
13 revisions
Request
GET /saltshaker/api/v1.0/user/u-3d48618a283111e8a7e3000c298454d8
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"user": {
"id": "u-3d48618a283111e8a7e3000c298454d8",
"acl": [
"a-977a2b3a2b2d11e886cb000c298454d8"
],
"role": [
"r-4f24769c28c611e8a7e3000c298454d8"
],
"groups": [
"g-60e2f3f22b1b11e886cb000c298454d8",
"g-60e2f3f22b1b11e886cb000c298454d8"
],
"product": [
"p-bbfc8b5221d611e894b0000c298454d8"
],
"username": "salt"
},
"status": true,
"message": ""
}
Request
GET /saltshaker/api/v1.0/user
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"users": {
"user": [
{
"id": "u-3d48618a283111e8a7e3000c298454d8",
"acl": [
"a-977a2b3a2b2d11e886cb000c298454d8"
],
"role": [
"r-4f24769c28c611e8a7e3000c298454d8"
],
"groups": [
"g-60e2f3f22b1b11e886cb000c298454d8",
"g-60e2f3f22b1b11e886cb000c298454d8"
],
"product": [
"p-bbfc8b5221d611e894b0000c298454d8"
],
"username": "salt"
},
{
"id": "u-d5cce6862b3f11e886cb000c298454d8",
"acl": [
"a-977a2b3a2b2d11e886cb000c298454d8"
],
"role": [
"r-4f24769c28c611e8a7e3000c298454d8",
"r-hf24769c28c611e8a7e3000c298454d8"
],
"groups": [
"g-60e2f3f22b1b11e886cb000c298454d8",
"g-60e2f3f22b1b11e886cb000c298454d8"
],
"product": [
"p-bbfc8b5221d611e894b0000c298454d8"
],
"username": "admin"
}
]
},
"status": true,
"message": ""
}
Request
POST /saltshaker/api/v1.0/user
POST Body
{
"username": "salt1",
"password": "salt"
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"status": true,
"message": ""
}
Request
DELETE /saltshaker/api/v1.0/user/u-b0175be62b1d11e886cb000c298454d8
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"status": true,
"message": ""
}
Request
PUT /saltshaker/api/v1.0/user/u-feef9dfc28e611e8a7e3000c298454d8
PUT Body
{
"acl": ["a-897e48cc31b811e8ab56000c298454d8"],
"role": ["r-35d85a1a333311e8aa5f000c298454d8"],
"groups": ["g-142120c8323411e8ab56000c298454d8","g-191b9cc0323411e8ab56000c298454d8"],
"product": [],
"username": "admin",
"password": ""
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"status": true,
"message": ""
}