Resources related to system.
The Advanced resource represents the advanced settings.
Returns the advanced dictionary.
Example request:
GET /api/v1.0/ssytem/advanced/ HTTP/1.1
Content-Type: application/json
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
{
"adv_serialconsole": false,
"adv_traceback": true,
"adv_uploadcrash": true,
"adv_consolescreensaver": false,
"adv_debugkernel": false,
"adv_advancedmode": false,
"adv_consolemsg": false,
"adv_anonstats": true,
"adv_autotune": false,
"adv_powerdaemon": false,
"adv_swapondrive": 2,
"adv_anonstats_token": "",
"adv_motd": "Welcome to FreeNAS",
"adv_consolemenu": true,
"id": 1,
"adv_serialport": "0x2f8"
"adv_serialspeed": "9600"
}
Response Headers: | |
---|---|
|
|
Status Codes: |
|
Update advanced.
Example request:
PUT /api/v1.0/system/advanced/ HTTP/1.1
Content-Type: application/json
{
"adv_powerdaemon": true
}
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
{
"adv_serialconsole": false,
"adv_traceback": true,
"adv_uploadcrash": true,
"adv_consolescreensaver": false,
"adv_debugkernel": false,
"adv_advancedmode": false,
"adv_consolemsg": false,
"adv_anonstats": true,
"adv_autotune": false,
"adv_powerdaemon": true,
"adv_swapondrive": 2,
"adv_anonstats_token": "",
"adv_motd": "Welcome to FreeNAS",
"adv_consolemenu": true,
"id": 1,
"adv_serialport": "0x2f8"
"adv_serialspeed": "9600"
}
Json Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
The Alert resource represents system alerts.
Returns a list of system alerts.
Example request:
GET /api/v1.0/system/alert/ HTTP/1.1
Content-Type: application/json
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
[{
"id": "256ad2f48e5e541e28388701e34409cc",
"level": "OK",
"message": "The volume tank (ZFS) status is HEALTHY"
}]
Response Headers: | |
---|---|
|
|
Status Codes: |
|
The CronJob resource represents cron(8) to execute scheduled commands.
Returns a list of all cronjobs.
Example request:
GET /api/v1.0/system/cronjob/ HTTP/1.1
Content-Type: application/json
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
[
{
"cron_command": "touch /tmp/xx",
"cron_daymonth": "*",
"cron_dayweek": "*",
"cron_description": "",
"cron_enabled": true,
"cron_hour": "*",
"cron_minute": "*",
"cron_month": "1,2,3,4,6,7,8,9,10,11,12",
"cron_stderr": false,
"cron_stdout": true,
"cron_user": "root",
"id": 1
}
]
Query Parameters: | |
---|---|
|
|
Response Headers: | |
|
|
Status Codes: |
|
Creates a new cronjob and returns the new cronjob object.
Example request:
POST /api/v1.0/system/cronjob/ HTTP/1.1
Content-Type: application/json
{
"cron_user": "root",
"cron_command": "/data/myscript.sh",
"cron_minute": "*/20",
"cron_hour": "*",
"cron_daymonth": "*",
"cron_month": "*",
"cron_dayweek": "*",
}
Example response:
HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json
{
"cron_command": "/data/myscript.sh",
"cron_daymonth": "*",
"cron_dayweek": "*",
"cron_description": "",
"cron_enabled": true,
"cron_hour": "*",
"cron_minute": "*/20",
"cron_month": "*",
"cron_stderr": false,
"cron_stdout": true,
"cron_user": "root",
"id": 2
}
Json Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
Update cronjob id.
Example request:
PUT /api/v1.0/system/cronjob/2/ HTTP/1.1
Content-Type: application/json
{
"cron_enabled": false,
"cron_stderr": true
}
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
{
"cron_command": "/data/myscript.sh",
"cron_daymonth": "*",
"cron_dayweek": "*",
"cron_description": "",
"cron_enabled": false,
"cron_hour": "*",
"cron_minute": "*/20",
"cron_month": "*",
"cron_stderr": true,
"cron_stdout": true,
"cron_user": "root",
"id": 2
}
Json Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
The InitShutdown resource represents Init and Shutdown scripts.
Returns a list of all init shutdown scripts.
Example request:
GET /api/v1.0/system/initshutdown/ HTTP/1.1
Content-Type: application/json
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
[
{
"id": 1
"ini_type": "command",
"ini_command": "rm /mnt/tank/temp*",
"ini_when": "postinit"
}
]
Query Parameters: | |
---|---|
|
|
Response Headers: | |
|
|
Status Codes: |
|
Creates a new initshutdown and returns the new initshutdown object.
Example request:
POST /api/v1.0/system/initshutdown/ HTTP/1.1
Content-Type: application/json
{
"ini_type": "command",
"ini_command": "rm /mnt/tank/temp*",
"ini_when": "postinit"
}
Example response:
HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json
{
"id": 1,
"ini_command": "rm /mnt/tank/temp*",
"ini_script": null,
"ini_type": "command",
"ini_when": "postinit"
}
Json Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
Update initshutdown id.
Example request:
PUT /api/v1.0/system/initshutdown/1/ HTTP/1.1
Content-Type: application/json
{
"ini_when": "preinit"
}
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
{
"id": 1,
"ini_command": "rm /mnt/tank/temp*",
"ini_script": null,
"ini_type": "command",
"ini_when": "preinit"
}
Json Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
Delete initshutdown id.
Example request:
DELETE /api/v1.0/system/initshutdown/1/ HTTP/1.1
Content-Type: application/json
Example response:
HTTP/1.1 204 No Response
Vary: Accept
Content-Type: application/json
Status Codes: |
|
---|
The NTPServer resource represents ntp.conf(5) to configure Network Time Protocol (NTP).
Returns a list of all ntpservers.
Example request:
GET /api/v1.0/system/ntpserver/ HTTP/1.1
Content-Type: application/json
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
[
{
"ntp_minpoll": 6,
"ntp_maxpoll": 9,
"ntp_prefer": false,
"ntp_address": "0.freebsd.pool.ntp.org",
"ntp_burst": false,
"id": 1,
"ntp_iburst": true
},
{
"ntp_minpoll": 6,
"ntp_maxpoll": 9,
"ntp_prefer": false,
"ntp_address": "1.freebsd.pool.ntp.org",
"ntp_burst": false,
"id": 2,
"ntp_iburst": true
},
{
"ntp_minpoll": 6,
"ntp_maxpoll": 9,
"ntp_prefer": false,
"ntp_address": "2.freebsd.pool.ntp.org",
"ntp_burst": false,
"id": 3,
"ntp_iburst": true
}
]
Query Parameters: | |
---|---|
|
|
Response Headers: | |
|
|
Status Codes: |
|
Creates a new ntpserver and returns the new ntpserver object.
Example request:
POST /api/v1.0/system/ntpserver/ HTTP/1.1
Content-Type: application/json
{
"ntp_address": "br.pool.ntp.org"
}
Example response:
HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json
{
"ntp_minpoll": 6,
"ntp_maxpoll": 10,
"ntp_prefer": false,
"ntp_address": "br.pool.ntp.org",
"ntp_burst": false,
"id": 4,
"ntp_iburst": true
}
Json Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
Update ntpserver id.
Example request:
PUT /api/v1.0/system/ntpserver/2/ HTTP/1.1
Content-Type: application/json
{
"ntp_prefer": true,
}
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
{
"ntp_minpoll": 6,
"ntp_maxpoll": 10,
"ntp_prefer": true,
"ntp_address": "br.pool.ntp.org",
"ntp_burst": false,
"id": 4,
"ntp_iburst": true
}
Json Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
The Rsync resource represents rsync(1) to execute scheduled commands.
Returns a list of all rsyncs.
Example request:
GET /api/v1.0/system/rsync/ HTTP/1.1
Content-Type: application/json
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
[
{
"rsync_user": "root",
"rsync_minute": "*/20",
"rsync_enabled": true,
"rsync_daymonth": "*",
"rsync_path": "/mnt/tank",
"rsync_delete": false,
"rsync_hour": "*",
"id": 1,
"rsync_extra": "",
"rsync_archive": false,
"rsync_compress": true,
"rsync_dayweek": "*",
"rsync_desc": "",
"rsync_direction": "push",
"rsync_times": true,
"rsync_preserveattr": false,
"rsync_remotehost": "testhost",
"rsync_mode": "module",
"rsync_remotemodule": "testmodule",
"rsync_remotepath": "",
"rsync_quiet": false,
"rsync_recursive": true,
"rsync_month": "*",
"rsync_preserveperm": false,
"rsync_remoteport": 22
}
]
Query Parameters: | |
---|---|
|
|
Response Headers: | |
|
|
Status Codes: |
|
Creates a new rsync and returns the new rsync object.
Example request:
POST /api/v1.0/system/rsync/ HTTP/1.1
Content-Type: application/json
{
"rsync_path": "/mnt/tank",
"rsync_user": "root",
"rsync_mode": "module",
"rsync_remotemodule": "testmodule",
"rsync_remotehost": "testhost",
"rsync_direction": "push",
"rsync_minute": "*/20",
"rsync_hour": "*",
"rsync_daymonth": "*",
"rsync_month": "*",
"rsync_dayweek": "*",
}
Example response:
HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json
{
"rsync_user": "root",
"rsync_minute": "*/20",
"rsync_enabled": true,
"rsync_daymonth": "*",
"rsync_path": "/mnt/tank",
"rsync_delete": false,
"rsync_hour": "*",
"id": 1,
"rsync_extra": "",
"rsync_archive": false,
"rsync_compress": true,
"rsync_dayweek": "*",
"rsync_desc": "",
"rsync_direction": "push",
"rsync_times": true,
"rsync_preserveattr": false,
"rsync_remotehost": "testhost",
"rsync_mode": "module",
"rsync_remotemodule": "testmodule",
"rsync_remotepath": "",
"rsync_quiet": false,
"rsync_recursive": true,
"rsync_month": "*",
"rsync_preserveperm": false,
"rsync_remoteport": 22
}
Json Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
Update rsync id.
Example request:
PUT /api/v1.0/system/rsync/1/ HTTP/1.1
Content-Type: application/json
{
"rsync_archive": true
}
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
{
"rsync_user": "root",
"rsync_minute": "*/20",
"rsync_enabled": true,
"rsync_daymonth": "*",
"rsync_path": "/mnt/tank",
"rsync_delete": false,
"rsync_hour": "*",
"id": 1,
"rsync_extra": "",
"rsync_archive": true,
"rsync_compress": true,
"rsync_dayweek": "*",
"rsync_desc": "",
"rsync_direction": "push",
"rsync_times": true,
"rsync_preserveattr": false,
"rsync_remotehost": "testhost",
"rsync_mode": "module",
"rsync_remotemodule": "testmodule",
"rsync_remotepath": "",
"rsync_quiet": false,
"rsync_recursive": true,
"rsync_month": "*",
"rsync_preserveperm": false,
"rsync_remoteport": 22
}
Json Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
The Settings resource represents the system settings.
Returns the settings dictionary.
Example request:
GET /api/v1.0/services/settings/ HTTP/1.1
Content-Type: application/json
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
{
"stg_timezone": "America/Los_Angeles",
"stg_guiport": null,
"stg_guihttpsport": null,
"stg_guiprotocol": "http",
"stg_guiv6address": "::",
"stg_syslogserver": "",
"stg_language": "en",
"stg_directoryservice": "",
"stg_guiaddress": "0.0.0.0",
"stg_kbdmap": "",
"id": 1
}
Response Headers: | |
---|---|
|
|
Status Codes: |
|
Update settings.
Example request:
PUT /api/v1.0/services/settings/ HTTP/1.1
Content-Type: application/json
{
"stg_timezone": "America/Sao_Paulo"
}
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
{
"stg_timezone": "America/Sao_Paulo",
"stg_guiport": null,
"stg_guihttpsport": null,
"stg_guiprotocol": "http",
"stg_guiv6address": "::",
"stg_syslogserver": "",
"stg_language": "en",
"stg_directoryservice": "",
"stg_guiaddress": "0.0.0.0",
"stg_kbdmap": "",
"id": 1
}
Json Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
The SMARTTest resource represents schedule of SMART tests using smartd(8).
Returns a list of all smarttests.
Example request:
GET /api/v1.0/system/smarttest/ HTTP/1.1
Content-Type: application/json
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
[
{
"smarttest_dayweek": "*",
"smarttest_daymonth": "*",
"smarttest_disks": [
2,
3
],
"smarttest_month": "*",
"smarttest_type": "L",
"id": 1,
"smarttest_hour": "*",
"smarttest_desc": ""
}
]
Query Parameters: | |
---|---|
|
|
Response Headers: | |
|
|
Status Codes: |
|
Creates a new smarttest and returns the new smarttest object.
Example request:
POST /api/v1.0/system/smarttest/ HTTP/1.1
Content-Type: application/json
{
"smarttest_disks": [2, 3],
"smarttest_type": "L",
"smarttest_hour": "*",
"smarttest_daymonth": "*",
"smarttest_month": "*",
"smarttest_dayweek": "*",
}
Example response:
HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json
{
"smarttest_dayweek": "*",
"smarttest_daymonth": "*",
"smarttest_disks": [
2,
3
],
"smarttest_month": "*",
"smarttest_type": "L",
"id": 1,
"smarttest_hour": "*",
"smarttest_desc": ""
}
Json Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
Update smarttest id.
Example request:
PUT /api/v1.0/system/smarttest/1/ HTTP/1.1
Content-Type: application/json
{
"smarttest_type": "S",
"smarttest_disks": [2, 3]
}
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
{
"smarttest_dayweek": "*",
"smarttest_daymonth": "*",
"smarttest_disks": [
2,
3
],
"smarttest_month": "*",
"smarttest_type": "L",
"id": 1,
"smarttest_hour": "*",
"smarttest_desc": ""
}
Json Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
The Sysctl resource represents sysctl(8), get or set kernel state.
Returns a list of all sysctls.
Example request:
GET /api/v1.0/system/sysctl/ HTTP/1.1
Content-Type: application/json
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
[
{
"sysctl_mib": "net.inet.tcp.rfc1323",
"sysctl_comment": "",
"sysctl_value": "0",
"sysctl_enabled": true
"id": 1,
}
]
Query Parameters: | |
---|---|
|
|
Response Headers: | |
|
|
Status Codes: |
|
Creates a new sysctl and returns the new sysctl object.
Example request:
POST /api/v1.0/system/sysctl/ HTTP/1.1
Content-Type: application/json
{
"sysctl_mib": "net.inet.tcp.rfc1323",
"sysctl_value": "0",
}
Example response:
HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json
{
"sysctl_mib": "net.inet.tcp.rfc1323",
"sysctl_comment": "",
"sysctl_value": "0",
"sysctl_enabled": true
"id": 1,
}
Json Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
Update sysctl id.
Example request:
PUT /api/v1.0/system/sysctl/1/ HTTP/1.1
Content-Type: application/json
{
"sysctl_value": "1",
}
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
{
"sysctl_mib": "net.inet.tcp.rfc1323",
"sysctl_comment": "",
"sysctl_value": "1",
"sysctl_enabled": true
"id": 1,
}
Json Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
The Tunable resource represents loader.conf(5).
Returns a list of all tunables.
Example request:
GET /api/v1.0/system/tunable/ HTTP/1.1
Content-Type: application/json
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
[
{
"tun_var": "xhci_load",
"tun_comment": "",
"tun_value": "YES",
"tun_enabled": true
"id": 1,
}
]
Query Parameters: | |
---|---|
|
|
Response Headers: | |
|
|
Status Codes: |
|
Creates a new tunable and returns the new tunable object.
Example request:
POST /api/v1.0/system/tunable/ HTTP/1.1
Content-Type: application/json
{
"tun_var": "xhci_load",
"tun_value": "YES",
}
Example response:
HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json
{
"tun_var": "xhci_load",
"tun_comment": "",
"tun_value": "YES",
"tun_enabled": true
"id": 1,
}
Json Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
Update tunable id.
Example request:
PUT /api/v1.0/system/tunable/1/ HTTP/1.1
Content-Type: application/json
{
"tun_enabled": false
}
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
{
"tun_var": "xhci_load",
"tun_comment": "",
"tun_value": "YES",
"tun_enabled": false
"id": 1,
}
Json Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|