Resources related to accounts.
The Users resource represents all unix users.
Returns a list of all current users.
Example request:
GET /api/v1.0/account/users/ HTTP/1.1
Content-Type: application/json
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
[
{
"bsdusr_builtin": true,
"bsdusr_email": "",
"bsdusr_full_name": "root",
"bsdusr_group": 0,
"bsdusr_home": "/root",
"bsdusr_locked": false,
"bsdusr_password_disabled": false,
"bsdusr_shell": "/bin/csh",
"bsdusr_smbhash": "root:0:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:E6FCEFB62A365065CE5B5F04AB12B455:[U ]:LCT-52272D9E:",
"bsdusr_uid": 0,
"bsdusr_sshpubkey": "",
"bsdusr_unixhash": "$6$d8doVGxjhDhL4feI$YpTtmlhCmbc6BJ4MQcBsPvZA0Ge4SMnAyZn9CfZLpkuP71g8bPq6DkKJBmcN61z2oQSj0K8RtaqmKltc9HsMg0",
"bsdusr_username": "root",
"bsdusr_sudo": false,
"id": 1
}
]
Query Parameters: | |
---|---|
|
|
Response Headers: | |
|
|
Status Codes: |
|
Creates a new user and returns the new user object.
Example request:
POST /api/v1.0/account/users/ HTTP/1.1
Content-Type: application/json
{
"bsdusr_username": "myuser",
"bsdusr_creategroup": true,
"bsdusr_full_name": "haha",
"bsdusr_password": "aa",
"bsdusr_uid": 1111
}
Example response:
HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json
{
"bsdusr_builtin": false,
"bsdusr_email": "",
"bsdusr_full_name": "My User",
"bsdusr_group": 0,
"bsdusr_home": "/nonexistent",
"bsdusr_locked": false,
"bsdusr_password_disabled": false,
"bsdusr_shell": "/bin/csh",
"bsdusr_smbhash": "myuser:0:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:E6FCEFB62A365065CE5B5F04AB12B455:[U ]:LCT-52272D9E:",
"bsdusr_uid": 1111,
"bsdusr_sshpubkey": "",
"bsdusr_unixhash": "$6$d8doVGxjhDhL4feI$YpTtmlhCmbc6BJ4MQcBsPvZA0Ge4SMnAyZn9CfZLpkuP71g8bPq6DkKJBmcN61z2oQSj0K8RtaqmKltc9HsMg0",
"bsdusr_username": "myuser",
"bsdusr_sudo": false,
"id": 25
}
Json Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
Creates a new user and returns the new user object.
Example request:
PUT /api/v1.0/account/users/25/ HTTP/1.1
Content-Type: application/json
{
"bsdusr_full_name": "My Name",
"bsdusr_shell": "/bin/bash",
}
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
{
"bsdusr_builtin": false,
"bsdusr_email": "",
"bsdusr_full_name": "My Name",
"bsdusr_group": 0,
"bsdusr_home": "/nonexistent",
"bsdusr_locked": false,
"bsdusr_password_disabled": false,
"bsdusr_shell": "/bin/bash",
"bsdusr_smbhash": "myuser:0:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:E6FCEFB62A365065CE5B5F04AB12B455:[U ]:LCT-52272D9E:",
"bsdusr_uid": 1111,
"bsdusr_sshpubkey": "",
"bsdusr_unixhash": "$6$d8doVGxjhDhL4feI$YpTtmlhCmbc6BJ4MQcBsPvZA0Ge4SMnAyZn9CfZLpkuP71g8bPq6DkKJBmcN61z2oQSj0K8RtaqmKltc9HsMg0",
"bsdusr_username": "myuser",
"bsdusr_sudo": false,
"id": 25
}
Json Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
Delete user id.
Example request:
DELETE /api/v1.0/account/users/25/ HTTP/1.1
Content-Type: application/json
Example response:
HTTP/1.1 204 No Response
Vary: Accept
Content-Type: application/json
Status Codes: |
|
---|
Change password of user id.
Example request:
POST /api/v1.0/account/users/25/password/ HTTP/1.1
Content-Type: application/json
{
"bsdusr_password": "newpasswd"
}
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
{
"bsdusr_builtin": false,
"bsdusr_email": "",
"bsdusr_full_name": "My User",
"bsdusr_group": 0,
"bsdusr_home": "/nonexistent",
"bsdusr_locked": false,
"bsdusr_password_disabled": false,
"bsdusr_shell": "/bin/csh",
"bsdusr_smbhash": "myuser:0:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:E6FCEFB62A365065CE5B5F04AB12B455:[U ]:LCT-52272D9E:",
"bsdusr_uid": 0,
"bsdusr_unixhash": "$6$d8doVGxjhDhL4feI$YpTtmlhCmbc6BJ4MQcBsPvZA0Ge4SMnAyZn9CfZLpkuP71g8bPq6DkKJBmcN61z2oQSj0K8RtaqmKltc9HsMg0",
"bsdusr_username": "myuser",
"bsdusr_sudo": false,
"id": 25
}
Json Parameters: | |
---|---|
|
|
Status Codes: |
|
Get a list of groups of user id.
Example request:
GET /api/v1.0/account/users/25/groups/ HTTP/1.1
Accept: application/json, text/javascript
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript
[]
Status Codes: |
|
---|
Set a list of groups of user id.
Example request:
POST /api/v1.0/account/users/25/groups/ HTTP/1.1
Accept: application/json, text/javascript
[
"wheel",
"ftp"
]
Example response:
HTTP/1.1 202 Accepted
Vary: Accept
Content-Type: text/javascript
[
"wheel",
"ftp"
]
Status Codes: |
|
---|
The Groups resource represents all unix groups.
Returns a list of all current groups.
Example request:
GET /api/v1.0/account/groups/ HTTP/1.1
Content-Type: application/json
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
[
{
"bsdgrp_builtin": False,
"bsdgrp_gid": 1111,
"bsdgrp_group": "myuser",
"bsdgrp_sudo": false,
"id": 33
},
{
"bsdgrp_builtin": true,
"bsdgrp_gid": 0,
"bsdgrp_group": "wheel",
"bsdgrp_sudo": false,
"id": 1
},
{
"bsdgrp_builtin": true,
"bsdgrp_gid": 1,
"bsdgrp_group": "daemon",
"bsdgrp_sudo": false,
"id": 2
}
]
Query Parameters: | |
---|---|
|
|
Response Headers: | |
|
|
Status Codes: |
|
Creates a new group and returns the new group object.
Example request:
POST /api/v1.0/account/groups/ HTTP/1.1
Content-Type: application/json
{
"bsdgrp_gid": 1200,
"bsdgrp_group": "mygroup"
}
Example response:
HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json
{
"bsdgrp_builtin": false,
"bsdgrp_gid": 1200,
"bsdgrp_group": "mygroup",
"bsdgrp_sudo": false,
"id": 34
}
Json Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
Update group id.
Example request:
PUT /api/v1.0/account/groups/34/ HTTP/1.1
Content-Type: application/json
{
"bsdgrp_group": "newgroup"
}
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
{
"bsdgrp_builtin": false,
"bsdgrp_gid": 1200,
"bsdgrp_group": "newgroup",
"bsdgrp_sudo": false,
"id": 34
}
Json Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|