Services

Resources related to services.

Services

The Services resource is used to control services.

List resource

GET /api/v1.0/services/services/

Returns a list of all available services.

Example request:

GET /api/v1.0/services/services/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

[
  {
          "srv_service": "rsync",
          "id": 16,
          "srv_enable": false
  },
  {
          "srv_service": "directoryservice",
          "id": 17,
          "srv_enable": false
  },
  {
          "srv_service": "smartd",
          "id": 18,
          "srv_enable": false
  }
]
Query Parameters:
 
  • offset – offset number. default is 0
  • limit – limit number. default is 20
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Update resource

PUT /api/v1.0/services/services/(int:id|string:srv_service)/

Update service with id id or name srv_service.

Example request:

PUT /api/v1.0/services/services/cifs/ HTTP/1.1
Content-Type: application/json

  {
          "srv_enable": true
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "srv_service": "cifs",
          "id": 4,
          "srv_enable": true
  }
JSON Parameters:
 
  • srv_service (string) – name of the service
  • srv_enable (boolean) – service enable
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 200 – no error

AFP

The AFP resource represents the configuration settings for Apple Filing Protocol (AFP).

List resource

GET /api/v1.0/services/afp/

Returns the AFP settings dictionary.

Example request:

GET /api/v1.0/services/afp/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "afp_srv_guest_user": "nobody",
          "afp_srv_guest": false,
          "id": 1,
          "afp_srv_bindip": [],
          "afp_srv_connections_limit": 50,
          "afp_srv_homedir": null,
          "afp_srv_homedir_enable": false,
          "afp_srv_global_aux": "",
          "afp_srv_dbpath": ""
  }
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Update resource

PUT /api/v1.0/services/afp/

Update AFP.

Example request:

PUT /api/v1.0/services/afp/ HTTP/1.1
Content-Type: application/json

  {
          "afp_srv_guest": true
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "afp_srv_guest_user": "nobody",
          "afp_srv_guest": true,
          "id": 1,
          "afp_srv_bindip": [],
          "afp_srv_connections_limit": 50,
          "afp_srv_homedir": null,
          "afp_srv_homedir_enable": false,
          "afp_srv_global_aux": "",
          "afp_srv_dbpath": ""
  }
JSON Parameters:
 
  • afp_srv_guest_user (string) – guest account
  • afp_srv_guest (boolean) – allow guest access
  • afp_srv_bindip (list(string)) – list of ip addresses to listen and advertise
  • afp_srv_connections_limit (integer) – maximum number of connections permitted
  • afp_srv_homedir (string) – path to home directory
  • afp_srv_homedir_enable (boolean) – enable to home directory feature
  • afp_srv_dbpath (string) – database information to be stored in path
  • afp_srv_global_aux (string) – auxiliary parameters in Global section
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 200 – no error

CIFS

The CIFS resource represents the configuration settings for Server Message Block Protocol (CIFS).

List resource

GET /api/v1.0/services/cifs/

Returns the CIFS settings dictionary.

Example request:

GET /api/v1.0/services/cifs/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "cifs_srv_dirmask": "",
          "cifs_srv_description": "FreeNAS Server",
          "cifs_srv_loglevel": "0",
          "cifs_srv_guest": "nobody",
          "cifs_srv_filemask": "",
          "cifs_srv_smb_options": "",
          "id": 1,
          "cifs_srv_aio_ws": 4096,
          "cifs_srv_allow_execute_always": true,
          "cifs_srv_max_protocol": "SMB2",
          "cifs_srv_min_protocol": "",
          "cifs_srv_syslog": false,
          "cifs_srv_unixext": true,
          "cifs_srv_obey_pam_restrictions": true,
          "cifs_srv_domain_logons": false,
          "cifs_srv_aio_enable": false,
          "cifs_srv_aio_rs": 4096,
          "cifs_srv_localmaster": true,
          "cifs_srv_timeserver": true,
          "cifs_srv_workgroup": "WORKGROUP",
          "cifs_srv_doscharset": "CP437",
          "cifs_srv_hostlookup": true,
          "cifs_srv_netbiosname": "freenas",
          "cifs_srv_nullpw": false,
          "cifs_srv_zeroconf": true,
          "cifs_srv_authmodel": "user",
          "cifs_srv_unixcharset": "UTF-8"
  }
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Update resource

PUT /api/v1.0/services/cifs/

Update CIFS.

Example request:

PUT /api/v1.0/services/cifs/ HTTP/1.1
Content-Type: application/json

  {
          "cifs_srv_hostlookup": false
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "cifs_srv_dirmask": "",
          "cifs_srv_description": "FreeNAS Server",
          "cifs_srv_loglevel": "0",
          "cifs_srv_guest": "nobody",
          "cifs_srv_filemask": "",
          "cifs_srv_smb_options": "",
          "id": 1,
          "cifs_srv_aio_ws": 4096,
          "cifs_srv_allow_execute_always": true,
          "cifs_srv_max_protocol": "SMB3",
          "cifs_srv_min_protocol": "",
          "cifs_srv_syslog": false,
          "cifs_srv_unixext": true,
          "cifs_srv_obey_pam_restrictions": true,
          "cifs_srv_domain_logons": false,
          "cifs_srv_aio_enable": false,
          "cifs_srv_aio_rs": 4096,
          "cifs_srv_localmaster": true,
          "cifs_srv_timeserver": true,
          "cifs_srv_workgroup": "WORKGROUP",
          "cifs_srv_doscharset": "CP437",
          "cifs_srv_hostlookup": false,
          "cifs_srv_netbiosname": "freenas",
          "cifs_srv_nullpw": false,
          "cifs_srv_zeroconf": true,
          "cifs_srv_authmodel": "user",
          "cifs_srv_unixcharset": "UTF-8"
  }
JSON Parameters:
 
  • cifs_srv_authmodel (string) – user, share
  • cifs_srv_netbiosname (string) – netbios name
  • cifs_srv_workgroup (string) – workgroup
  • cifs_srv_description (string) – server description
  • cifs_srv_doscharset (string) – CP437, CP850, CP852, CP866, CP932, CP949, CP950, CP1026, CP1251, ASCII
  • cifs_srv_unixcharset (string) – UTF-8, iso-8859-1, iso-8859-15, gb2312, EUC-JP, ASCII
  • cifs_srv_loglevel (string) – 1, 2, 3, 10
  • cifs_srv_localmaster (boolean) – local master
  • cifs_srv_timeserver (boolean) – time server for domain
  • cifs_srv_guest (string) – guest account
  • cifs_srv_filemask (string) – file mask
  • cifs_srv_dirmask (string) – directory mask
  • cifs_srv_nullpw (boolean) – allow empty password
  • cifs_srv_allow_execute_always (boolean) – controls the behaviour of smbd(8) when receiving a protocol request of “open for execution”
  • cifs_srv_max_protocol (string) – highest protocol version that will be supported by the server
  • cifs_srv_min_protocol (string) – lowest protocol version that will be supported by the server
  • cifs_srv_syslog (boolean) – use syslog
  • cifs_srv_smb_options (string) – auxiliary parameters added to [global] section
  • cifs_srv_unixext (boolean) – unix extensions
  • cifs_srv_obey_pam_restrictions (boolean) – obey pam restrictions
  • cifs_srv_domain_logons (boolean) – domains logons
  • cifs_srv_aio_enable (boolean) – enable aio
  • cifs_srv_aio_rs (integer) – minimum aio read size
  • cifs_srv_aio_ws (integer) – minimum aio write size
  • cifs_srv_zeroconf (boolean) – zeroconf share discovery
  • cifs_srv_hostlookup (boolean) – hostname lookups
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 200 – no error

Domain Controller

The Domain Controller resource represents the configuration settings for FreeNAS Domain Controller service.

List resource

GET /api/v1.0/services/domaincontroller/

Returns the Domain Controller settings dictionary.

Example request:

GET /api/v1.0/services/domaincontroller/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "dc_dns_backend": "SAMBA_INTERNAL",
          "dc_dns_forwarder": "",
          "dc_domain": "",
          "dc_forest_level": "2003",
          "dc_passwd": "",
          "dc_realm": "",
          "dc_role": "dc",
          "id": 1
  }
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Update resource

PUT /api/v1.0/services/domaincontroller/

Update Domain Controller.

Example request:

PUT /api/v1.0/services/domaincontroller/ HTTP/1.1
Content-Type: application/json

  {
          "dc_forest_level": "2008",
          "dc_dns_forwarder": "192.168.1.1",
          "dc_domain": "example",
          "dc_kerberos_realm": "",
          "dc_passwd": "newpasswd",
          "dc_realm": "example.org"

  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "dc_dns_backend": "SAMBA_INTERNAL",
          "dc_dns_forwarder": "192.168.1.1",
          "dc_domain": "example",
          "dc_forest_level": "2008",
          "dc_passwd": "newpasswd",
          "dc_realm": "example.org",
          "dc_role": "dc",
          "id": 1
  }
JSON Parameters:
 
  • dc_realm (string) – Realm Name, eg EXAMPLE.ORG
  • dc_domain (string) – Domain Name in old format, eg EXAMPLE
  • dc_role (string) – Server Role (dc)
  • dc_dns_backend (string) – DNS Backend (SAMBA_INTERNAL/BIND9_FLATFILE/BIND9_DLZ/NONE)
  • dc_dns_forwarder (string) – DNS Forwarder IP Address
  • dc_forest_level (string) – Domain and Forest Level (2000/2003/2008/2008_R2)
  • dc_passwd (string) – Administrator Password
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 200 – no error

DynamicDNS

The DynamicDNS resource represents the configuration settings for DynamicDNS.

List resource

GET /api/v1.0/services/dynamicdns/

Returns the DynamicDNS settings dictionary.

Example request:

GET /api/v1.0/services/dynamicdns/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "ddns_provider": "dyndns@dyndns.org",
          "ddns_checkip_ssl": false,
          "ddns_checkip_server": "",
          "ddns_checkip_path": "",
          "ddns_ssl": false,
          "ddns_custom_ddns_server": "",
          "ddns_custom_ddns_path": "",
          "ddns_domain": "",
          "ddns_username": "admin",
          "ddns_password": "freenas",
          "ddns_period": 300,
          "id": 1
  }
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Update resource

PUT /api/v1.0/services/dynamicdns/

Update DynamicDNS.

Example request:

PUT /api/v1.0/services/dynamicdns/ HTTP/1.1
Content-Type: application/json

  {
          "ddns_provider": "default@no-ip.com"
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "ddns_provider": "default@no-ip.com",
          "ddns_checkip_ssl": false,
          "ddns_checkip_server": "",
          "ddns_checkip_path": "",
          "ddns_ssl": false,
          "ddns_custom_ddns_server": "",
          "ddns_custom_ddns_path": "",
          "ddns_domain": "",
          "ddns_username": "admin",
          "ddns_password": "freenas",
          "ddns_period": 300,
          "id": 1
  }
JSON Parameters:
 
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 200 – no error

FTP

The FTP resource represents the configuration settings for FTP service.

List resource

GET /api/v1.0/services/ftp/

Returns the FTP settings dictionary.

Example request:

GET /api/v1.0/services/ftp/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "ftp_anonuserbw": 0,
          "ftp_ident": false,
          "ftp_timeout": 600,
          "ftp_resume": false,
          "ftp_options": "",
          "ftp_masqaddress": "",
          "ftp_rootlogin": false,
          "id": 1,
          "ftp_passiveportsmax": 0,
          "ftp_ipconnections": 2,
          "ftp_defaultroot": true,
          "ftp_dirmask": "022",
          "ftp_passiveportsmin": 0,
          "ftp_onlylocal": false,
          "ftp_loginattempt": 1,
          "ftp_localuserbw": 0,
          "ftp_port": 21,
          "ftp_onlyanonymous": false,
          "ftp_reversedns": false,
          "ftp_anonuserdlbw": 0,
          "ftp_clients": 5,
          "ftp_tls": false,
          "ftp_tls_opt_allow_client_renegotiations": false,
          "ftp_tls_opt_allow_dot_login": false,
          "ftp_tls_opt_allow_per_user": false,
          "ftp_tls_opt_common_name_required": false,
          "ftp_tls_opt_dns_name_required": false,
          "ftp_tls_opt_enable_diags": false,
          "ftp_tls_opt_export_cert_data": false,
          "ftp_tls_opt_ip_address_required": false,
          "ftp_tls_opt_no_cert_request": false,
          "ftp_tls_opt_no_empty_fragments": false,
          "ftp_tls_opt_no_session_reuse_required": false,
          "ftp_tls_opt_stdenvvars": false,
          "ftp_tls_opt_use_implicit_ssl": false,
          "ftp_tls_policy": "on",
          "ftp_fxp": false,
          "ftp_filemask": "077",
          "ftp_localuserdlbw": 0,
          "ftp_banner": "",
          "ftp_ssltls_certfile": "",
          "ftp_anonpath": null
  }
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Update resource

PUT /api/v1.0/services/ftp/

Update FTP.

Example request:

PUT /api/v1.0/services/ftp/ HTTP/1.1
Content-Type: application/json

  {
          "ftp_clients": 10
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "ftp_anonuserbw": 0,
          "ftp_ident": false,
          "ftp_timeout": 600,
          "ftp_resume": false,
          "ftp_options": "",
          "ftp_masqaddress": "",
          "ftp_rootlogin": false,
          "id": 1,
          "ftp_passiveportsmax": 0,
          "ftp_ipconnections": 2,
          "ftp_defaultroot": true,
          "ftp_dirmask": "022",
          "ftp_passiveportsmin": 0,
          "ftp_onlylocal": false,
          "ftp_loginattempt": 1,
          "ftp_localuserbw": 0,
          "ftp_port": 21,
          "ftp_onlyanonymous": false,
          "ftp_reversedns": false,
          "ftp_anonuserdlbw": 0,
          "ftp_clients": 5,
          "ftp_tls": false,
          "ftp_tls_opt_allow_client_renegotiations": false,
          "ftp_tls_opt_allow_dot_login": false,
          "ftp_tls_opt_allow_per_user": false,
          "ftp_tls_opt_common_name_required": false,
          "ftp_tls_opt_dns_name_required": false,
          "ftp_tls_opt_enable_diags": false,
          "ftp_tls_opt_export_cert_data": false,
          "ftp_tls_opt_ip_address_required": false,
          "ftp_tls_opt_no_cert_request": false,
          "ftp_tls_opt_no_empty_fragments": false,
          "ftp_tls_opt_no_session_reuse_required": false,
          "ftp_tls_opt_stdenvvars": false,
          "ftp_tls_opt_use_implicit_ssl": false,
          "ftp_tls_policy": "on",
          "ftp_fxp": false,
          "ftp_filemask": "077",
          "ftp_localuserdlbw": 0,
          "ftp_banner": "",
          "ftp_ssltls_certfile": "",
          "ftp_anonpath": null
  }
JSON Parameters:
 
  • ftp_port (integer) – port to bind FTP server
  • ftp_clients (integer) – maximum number of simultaneous clients
  • ftp_ipconnections (integer) – maximum number of connections per IP address
  • ftp_loginattempt (integer) – maximum number of allowed password attempts before disconnection
  • ftp_timeout (integer) – maximum idle time in seconds
  • ftp_rootlogin (boolean) – allow root login
  • ftp_onlyanonymous (boolean) – allow anonymous login
  • ftp_anonpath (string) – path for anonymous login
  • ftp_onlylocal (boolean) – allow only local user login
  • ftp_banner (string) – message which will be displayed to the user when they initially login
  • ftp_filemask (string) – file creation mask
  • ftp_dirmask (string) – directory creation mask
  • ftp_fxp (boolean) – enable fxp
  • ftp_resume (boolean) – allow transfer resumption
  • ftp_defaultroot (boolean) – only allow access to user home unless member of wheel
  • ftp_ident (boolean) – require IDENT authentication
  • ftp_reversedns (boolean) – perform reverse dns lookup
  • ftp_masqaddress (string) – causes the server to display the network information for the specified address to the client
  • ftp_passiveportsmin (integer) – the minimum port to allocate for PASV style data connections
  • ftp_passiveportsmax (integer) – the maximum port to allocate for PASV style data connections
  • ftp_localuserbw (integer) – local user upload bandwidth in KB/s
  • ftp_localuserdlbw (integer) – local user download bandwidth in KB/s
  • ftp_anonuserbw (integer) – anonymous user upload bandwidth in KB/s
  • ftp_anonuserdlbw (integer) – anonymous user download bandwidth in KB/s
  • ftp_tls (boolean) – enable TLS
  • ftp_tls_opt_allow_client_renegotiations (boolean) – allow client renegotiations
  • ftp_tls_opt_allow_dot_login (boolean) – allow dot login
  • ftp_tls_opt_allow_per_user (boolean) – allow per user options
  • ftp_tls_opt_common_name_required (boolean) – certificate common name is required
  • ftp_tls_opt_dns_name_required (boolean) – dns name certificate required
  • ftp_tls_opt_enable_diags (boolean) – enable diags
  • ftp_tls_opt_export_cert_data (boolean) – export certificate data
  • ftp_tls_opt_ip_address_required (boolean) – ip address required
  • ftp_tls_opt_no_cert_request (boolean) – no certificate request
  • ftp_tls_opt_no_empty_fragments (boolean) – no empty fragments
  • ftp_tls_opt_no_session_reuse_required (boolean) – no session reuse requird
  • ftp_tls_opt_stdenvvars (boolean) – standard environment variables
  • ftp_tls_opt_use_implicit_ssl (boolean) – use implicit SSL
  • ftp_ssltls_certfile (string) – certificate and private key
  • ftp_options (string) – these parameters are added to proftpd.conf
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 200 – no error

LLDP

The LLDP resource represents the configuration settings for LLDP service.

List resource

GET /api/v1.0/services/lldp/

Returns the LLDP settings dictionary.

Example request:

GET /api/v1.0/services/lldp/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "id": 1,
          "lldp_country": "",
          "lldp_intdesc": true,
          "lldp_location": ""
  }
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Update resource

PUT /api/v1.0/services/lldp/

Update LLDP.

Example request:

PUT /api/v1.0/services/lldp/ HTTP/1.1
Content-Type: application/json

  {
          "lldp_intdesc": false,
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "id": 1,
          "lldp_country": "",
          "lldp_intdesc": false,
          "lldp_location": ""
  }
JSON Parameters:
 
  • lldp_country (string) – two-letterISO 3166 country code
  • lldp_location (string) – physical location of the host
  • lldp_intdesc (boolean) – save received info in interface description / alias
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 200 – no error

NFS

The NFS resource represents the configuration settings for NFS service.

List resource

GET /api/v1.0/services/nfs/

Returns the NFS settings dictionary.

Example request:

GET /api/v1.0/services/nfs/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "nfs_srv_bindip": [],
          "nfs_srv_mountd_port": null,
          "nfs_srv_allow_nonroot": false,
          "nfs_srv_servers": 4,
          "nfs_srv_udp": false,
          "nfs_srv_rpcstatd_port": null,
          "nfs_srv_rpclockd_port": null,
          "nfs_srv_v4": false,
          "nfs_srv_16": false,
          "nfs_srv_v4_krb": false,
          "id": 1
  }
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Update resource

PUT /api/v1.0/services/nfs/

Update NFS.

Example request:

PUT /api/v1.0/services/nfs/ HTTP/1.1
Content-Type: application/json

  {
          "nfs_srv_servers": 10
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "nfs_srv_bindip": [],
          "nfs_srv_mountd_port": null,
          "nfs_srv_allow_nonroot": false,
          "nfs_srv_servers": 10,
          "nfs_srv_udp": false,
          "nfs_srv_rpcstatd_port": null,
          "nfs_srv_rpclockd_port": null,
          "nfs_srv_v4": false,
          "nfs_srv_16": false,
          "nfs_srv_v4_krb": false,
          "id": 1
  }
JSON Parameters:
 
  • nfs_srv_servers (string) – how many servers to create
  • nfs_srv_allow_nonroot (boolean) – allow non-root mount requests to be served.
  • nfs_srv_udp (boolean) – serve UDP requests
  • nfs_srv_v4 (boolean) – enable NFS v4
  • nfs_srv_v4_krb (boolean) – require Kerberos for NFSv4
  • nfs_srv_16 (boolean) – support >16 groups
  • nfs_srv_bindip (string) – IP addresses (as a list) to bind to for TCP and UDP requests
  • nfs_srv_mountd_port (integer) – force mountd to bind to the specified port
  • nfs_srv_rpcstatd_port (integer) – forces the rpc.statd daemon to bind to the specified port
  • nfs_srv_rpclockd_port (integer) – forces rpc.lockd the daemon to bind to the specified port
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 200 – no error

Rsyncd

The Rsyncd resource represents the configuration settings for Rsyncd service.

List resource

GET /api/v1.0/services/rsyncd/

Returns the Rsyncd settings dictionary.

Example request:

GET /api/v1.0/services/rsyncd/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "rsyncd_auxiliary": "",
          "id": 1,
          "rsyncd_port": 873
  }
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Update resource

PUT /api/v1.0/services/rsyncd/

Update Rsyncd.

Example request:

PUT /api/v1.0/services/rsyncd/ HTTP/1.1
Content-Type: application/json

  {
          "rsyncd_port": 874
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "rsyncd_auxiliary": "",
          "id": 1,
          "rsyncd_port": 874
  }
JSON Parameters:
 
  • rsyncd_port (integer) – alternate TCP port. Default is 873
  • rsyncd_auxiliary (string) – parameters will be added to [global] settings in rsyncd.conf
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 200 – no error

RsyncMod

The RsyncMod resource represents loader.conf(5).

List resource

GET /api/v1.0/services/rsyncmod/

Returns a list of all rsyncmods.

Example request:

GET /api/v1.0/services/rsyncmod/ 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:
 
  • offset – offset number. default is 0
  • limit – limit number. default is 20
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Create resource

POST /api/v1.0/services/rsyncmod/

Creates a new rsyncmod and returns the new rsyncmod object.

Example request:

POST /api/v1.0/services/rsyncmod/ HTTP/1.1
Content-Type: application/json

  {
          "rsyncmod_name": "testmod",
          "rsyncmod_path": "/mnt/tank"
  }

Example response:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json

  {
          "rsyncmod_maxconn": 0,
          "rsyncmod_mode": "rw",
          "rsyncmod_hostsallow": "",
          "rsyncmod_path": "/mnt/tank",
          "id": 1,
          "rsyncmod_user": "nobody",
          "rsyncmod_auxiliary": "",
          "rsyncmod_group": "nobody",
          "rsyncmod_name": "testmod",
          "rsyncmod_comment": "",
          "rsyncmod_hostsdeny": ""
  }
JSON Parameters:
 
  • rsyncmod_name (string) – module name
  • rsyncmod_comment (string) – comment
  • rsyncmod_path (string) – path to share
  • rsyncmod_mode (string) – ro, wo, rw
  • rsyncmod_maxconn (integer) – maximum number of simultaneous connections
  • rsyncmod_user (string) – user name that file transfers to and from that module should take place
  • rsyncmod_group (string) – group name that file transfers to and from that module should take place
  • rsyncmod_hostsallow (string) – comma, space, or tab delimited set of hosts which are permitted to access this module
  • rsyncmod_hostsdeny (string) – comma, space, or tab delimited set of hosts which are NOT permitted to access this module
  • rsyncmod_auxiliary (string) – parameters will be added to the module configuration in rsyncd.conf
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 201 – no error

Update resource

PUT /api/v1.0/services/rsyncmod/(int: id)/

Update rsyncmod id.

Example request:

PUT /api/v1.0/services/rsyncmod/1/ HTTP/1.1
Content-Type: application/json

  {
          "rsyncmod_user": "root"
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "rsyncmod_maxconn": 0,
          "rsyncmod_mode": "rw",
          "rsyncmod_hostsallow": "",
          "rsyncmod_path": "/mnt/tank",
          "id": 1,
          "rsyncmod_user": "root",
          "rsyncmod_auxiliary": "",
          "rsyncmod_group": "nobody",
          "rsyncmod_name": "testmod",
          "rsyncmod_comment": "",
          "rsyncmod_hostsdeny": ""
  }
JSON Parameters:
 
  • rsyncmod_name (string) – module name
  • rsyncmod_comment (string) – comment
  • rsyncmod_path (string) – path to share
  • rsyncmod_mode (string) – ro, wo, rw
  • rsyncmod_maxconn (integer) – maximum number of simultaneous connections
  • rsyncmod_user (string) – user name that file transfers to and from that module should take place
  • rsyncmod_group (string) – group name that file transfers to and from that module should take place
  • rsyncmod_hostsallow (string) – comma, space, or tab delimited set of hosts which are permitted to access this module
  • rsyncmod_hostsdeny (string) – comma, space, or tab delimited set of hosts which are NOT permitted to access this module
  • rsyncmod_auxiliary (string) – parameters will be added to the module configuration in rsyncd.conf
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 200 – no error

Delete resource

DELETE /api/v1.0/services/rsyncmod/(int: id)/

Delete rsyncmod id.

Example request:

DELETE /api/v1.0/services/rsyncmod/1/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 204 No Response
Vary: Accept
Content-Type: application/json
Status Codes:
  • 204 – no error

SMART

The SMART resource represents the configuration settings for SMART service.

List resource

GET /api/v1.0/services/smart/

Returns the SMART settings dictionary.

Example request:

GET /api/v1.0/services/smart/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "smart_critical": 0,
          "smart_interval": 30,
          "smart_powermode": "never",
          "smart_informational": 0,
          "smart_email": "",
          "smart_difference": 0,
          "id": 1
  }
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Update resource

PUT /api/v1.0/services/smart/

Update SMART.

Example request:

PUT /api/v1.0/services/smart/ HTTP/1.1
Content-Type: application/json

  {
          "smart_interval": 60,
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "smart_critical": 0,
          "smart_interval": 60,
          "smart_powermode": "never",
          "smart_informational": 0,
          "smart_email": "",
          "smart_difference": 0,
          "id": 1
  }
JSON Parameters:
 
  • smart_interval (integer) – interval between disk checks in minutes
  • smart_powermode (string) – never, sleep, standby, idle
  • smart_difference (integer) – report if the temperature had changed by at least N degrees Celsius since last report
  • smart_informational (integer) – report as informational if the temperature had changed by at least N degrees Celsius since last report
  • smart_critical (integer) – report as critical if the temperature had changed by at least N degrees Celsius since last report
  • smart_email (string) – destination email address
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 200 – no error

SNMP

The SNMP resource represents the configuration settings for SNMP service.

List resource

GET /api/v1.0/services/snmp/

Returns the SNMP settings dictionary.

Example request:

GET /api/v1.0/services/snmp/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "snmp_options": "",
          "snmp_community": "public",
          "snmp_traps": false,
          "snmp_contact": "",
          "snmp_location": "",
          "id": 1
  }
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Update resource

PUT /api/v1.0/services/snmp/

Update SNMP.

Example request:

PUT /api/v1.0/services/snmp/ HTTP/1.1
Content-Type: application/json

  {
          "snmp_contact": "admin@freenas.org"
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "snmp_options": "",
          "snmp_community": "public",
          "snmp_traps": false,
          "snmp_contact": "admin@freenas.org",
          "snmp_location": "",
          "id": 1
  }
JSON Parameters:
 
  • snmp_location (string) – location information, e.g. physical location of this system
  • snmp_contact (string) – contact information
  • snmp_community (string) – in most cases, “public” is used here
  • snmp_traps (string) – send SNMP traps
  • snmp_options (string) – parameters will be added to /etc/snmpd.config
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 200 – no error

SSH

The SSH resource represents the configuration settings for SSH service.

List resource

GET /api/v1.0/services/ssh/

Returns the SSH settings dictionary.

Example request:

GET /api/v1.0/services/ssh/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "ssh_sftp_log_level": "",
          "ssh_host_rsa_key_pub": "c3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFCQVFEbGY0b2wyeVhrT0RCSTgz MGduMnpxRGJaSXJncDc2ZzBic0ozT2Z6ZUJaU0lZU3NReS9qY012bjNaOUQyd3ZMcnFFWlRS RXZCSUo3bmZwZzgvWXVuM2JmMEwvdC9LTTNqamM4b3ZLMEhHV056bGZFT0IzbkpGZ3VZdjZI SHNDSi9hTC9JYnhyLysxZ3RYZS8yVFJpN2FDTnhOd09ZZGFzakZDYmRteG5lQlhjRDhSS2Zu NlMrVDlneGFGZzdrbDhHYVVRNkEyMnNDTmREL2JoTnJUWkRLaFRGVm9WcDZRc0Nld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ms3cGd6STFGVWhtWnhrN2haL2JqRjhzYlU4RmJSVUV2NHhUWW56RWllZFV3clRP SFRwCmVpdjBzdEVDZ1lFQTdPcXhhWVVBQWlRM2hWTngyZnU1QzVkYXYrZk1Uekcxc1RlZk1x NGFxWGxRYTFGbUtxZksKOStONUF2OE80a2ZGMlZCR3YyVEZNQ2xzUHVYMHBCN2RocEFLZUd0 eEtXc0V6Sld3TDNUUFZVbHlkeklpc09NSApKbXVGQmg2cUlyTzZBM0c1ZVh4LzJ5RWxSdkxS V2lGY2pTWS96M3BpY0U0MzZQd05URlkwdXpjPQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVkt LS0tLQo=",
          "ssh_privatekey": "",
          "ssh_compression": false,
          "ssh_host_key_pub": "MTAyNCA2NTUzNyAxNzg4MzEwMjMwOTgyODIzNTY2OTY1NDk4MjM2NDA4MjUzNjc0MjE1MzUy OTI3OTc2MjExMzYyMDUwMDk1NzY1NjExMTM0ODIxNzIxNzY5OTkyNjUyMzk3MTk3MTAzNTEy MzU2NTk1NzMxMTgzMTEwOTU1NjA5MDk1MTMwMDg1NDY3Mjg4NTEwNzk2MTI3OTQwNTA3MTEz MzQ5NDkxMTc3MTM2MjYzMTk5MDA4MjQ3NTgwMzkzMTA4MTkxMjg0ODA2ODAzNTQ2ODU3ODU4 MzYyNjExNTM2NTYxMTQyMDE3MDU0NDUzMjUzMTQ4MDc2MTU0MjI5ODg3MTQwMTY5MTc1NTAx NTk1MjU3Mzg3NzI4NDY2NDAyNzM0NTcwODgyNDI3OTcyODI1OTgyNDUyOTg3OTYyMTcgcm9v dEBmcmVlbmFzLmxvY2FsCg==",
          "ssh_passwordauth": true,
          "ssh_host_dsa_key_pub": "c3NoLWRzcyBBQUFBQjNOemFDMWtjM01BQUFDQkFLOG82amlVUzdxamltNERmSDJSSkIzeTVI ekNib21GRFRENjNscjk0ZnltMWlnTHlaQ0dFREN1U3Z1V2M5RW5wWFhWUDNaa3phZlBteTFF OFZ4OGhzUVpTTzV3blh0azJCZUFnNVNPelRYcDluZlBmNy94c0o3c1JYQUEzd0RuSjNUNjJB ZlNDRmF2TTVZS2pHQlgzRVZVYjJlaDVOQTRGUDl3Z1RhcWxjVmpBQUFBRlFDOUFlSE51cXY0 WU04UG1TVnNTQUNrU1NNdlBRQUFBSUFVeDBlUTE4M0g2Nlo3OG1RanFvT0VRNW5ROXUwWkhu WVNQZnRvN04veHRHQ0NDdG9ldVZSRnhIN1lrd0VJVzZmWm9DNTVqOTRVN2JnR1NaZkJEMzJo YklBbXRnVUFMU0lMVlZaVUJ2aWJjQW5vSEpqY3hlMnRsL09YT05zdi8yVkRLWWt1OTBRZDdD YkFsNlVVOStxQ3FjV3JVVlAzZ3pEOGdSWk9qcU1LZWdBQUFJQXhvbnlndVN6VW54WXh4VC9Y MzhIckIvOXRSeXhZNHBKalFsbVFLcmZveXhSL0ZtWWt2Wk9CL05UTjE5SEpJVExuMDBRZTF4 UkIyTUU1SVJGeXJmTGd2UGRJaUozczJONUQyRERmM3dBVmR0M3ZyQXJRR0t0RnRzL29nRStF dkthd25jQzAvallkaGJmSzNidlRVTFZ5dk11cEpKYzdabjhBNE9rNC9IWlVpUT09IHJvb3RA ZnJlZW5hcy5sb2NhbAo=",
          "ssh_tcpfwd": false,
          "ssh_sftp_log_facility": "",
          "ssh_bindiface": [],
          "ssh_tcpport": 22,
          "ssh_host_ecdsa_key_pub": "ZWNkc2Etc2hhMi1uaXN0cDI1NiBBQUFBRTJWalpITmhMWE5vWVRJdGJtbHpkSEF5TlRZQUFB QUlibWx6ZEhBeU5UWUFBQUJCQk1kMGQ0Z2MvTXR0Q2U1a3VLTXRMK2h6TmNhNER6N0djUjE2 NDNqQWhkVHp2eHBJL20vSFkrRGdhK3did0N1QWV2dWRYS3BpSU02b2pBRllFTzVZQ3NvPSBy b290QGZyZWVuYXMubG9jYWwK",
          "id": 1,
          "ssh_host_dsa_key": "LS0tLS1CRUdJTiBEU0EgUFJJVkFURSBLRVktLS0tLQpNSUlCdXdJQkFBS0JnUUN2S09vNGxF dTZvNHB1QTN4OWtTUWQ4dVI4d202SmhRMHcrdDVhL2VIOHB0WW9DOG1RCmhoQXdya3I3bG5Q Uko2VjExVDkyWk0ybno1c3RSUEZjZkliRUdVanVjSjE3Wk5nWGdJT1VqczAxNmZaM3ozKy8K OGJDZTdFVndBTjhBNXlkMCt0Z0gwZ2hXcnpPV0NveGdWOXhGVkc5bm9lVFFPQlQvY0lFMnFw WEZZd0lWQUwwQgo0YzI2cS9oZ3p3K1pKV3hJQUtSSkl5ODlBb0dBRk1kSGtOZk54K3VtZS9K a0k2cURoRU9aMFBidEdSNTJFajM3CmFPemY4YlJnZ2dyYUhybFVSY1IrMkpNQkNGdW4yYUF1 ZVkvZUZPMjRCa21Yd1E5OW9XeUFKcllGQUMwaUMxVlcKVkFiNG0zQUo2QnlZM01YdHJaZnps empiTC85bFF5bUpMdmRFSGV3bXdKZWxGUGZxZ3FuRnExRlQ5NE13L0lFVwpUbzZqQ25vQ2dZ QXhvbnlndVN6VW54WXh4VC9YMzhIckIvOXRSeXhZNHBKalFsbVFLcmZveXhSL0ZtWWt2Wk9C Ci9OVE4xOUhKSVRMbjAwUWUxeFJCMk1FNUlSRnlyZkxndlBkSWlKM3MyTjVEMkREZjN3QVZk dDN2ckFyUUdLdEYKdHMvb2dFK0V2S2F3bmNDMC9qWWRoYmZLM2J2VFVMVnl2TXVwSkpjN1pu OEE0T2s0L0haVWlRSVZBSmJuekFlVQpjSzZzdHBmMnFCUnlOZVMvOERWNAotLS0tLUVORCBE U0EgUFJJVkFURSBLRVktLS0tLQo=",
          "ssh_rootlogin": false
  }
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Update resource

PUT /api/v1.0/services/ssh/

Update SSH.

Example request:

PUT /api/v1.0/services/ssh/ HTTP/1.1
Content-Type: application/json

  {
          "ssh_rootlogin": true
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "ssh_sftp_log_level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ODAzNTQ2ODU3ODU4 MzYyNjExNTM2NTYxMTQyMDE3MDU0NDUzMjUzMTQ4MDc2MTU0MjI5ODg3MTQwMTY5MTc1NTAx NTk1MjU3Mzg3NzI4NDY2NDAyNzM0NTcwODgyNDI3OTcyODI1OTgyNDUyOTg3OTYyMTcgcm9v dEBmcmVlbmFzLmxvY2FsCg==",
          "ssh_passwordauth": true,
          "ssh_host_dsa_key_pub": "c3NoLWRzcyBBQUFBQjNOemFDMWtjM01BQUFDQkFLOG82amlVUzdxamltNERmSDJSSkIzeTVI ekNib21GRFRENjNscjk0ZnltMWlnTHlaQ0dFREN1U3Z1V2M5RW5wWFhWUDNaa3phZlBteTFF OFZ4OGhzUVpTTzV3blh0azJCZUFnNVNPelRYcDluZlBmNy94c0o3c1JYQUEzd0RuSjNUNjJB ZlNDRmF2TTVZS2pHQlgzRVZVYjJlaDVOQTRGUDl3Z1RhcWxjVmpBQUFBRlFDOUFlSE51cXY0 WU04UG1TVnNTQUNrU1NNdlBRQUFBSUFVeDBlUTE4M0g2Nlo3OG1RanFvT0VRNW5ROXUwWkhu WVNQZnRvN04veHRHQ0NDdG9ldVZSRnhIN1lrd0VJVzZmWm9DNTVqOTRVN2JnR1NaZkJEMzJo YklBbXRnVUFMU0lMVlZaVUJ2aWJjQW5vSEpqY3hlMnRsL09YT05zdi8yVkRLWWt1OTBRZDdD YkFsNlVVOStxQ3FjV3JVVlAzZ3pEOGdSWk9qcU1LZWdBQUFJQXhvbnlndVN6VW54WXh4VC9Y MzhIckIvOXRSeXhZNHBKalFsbVFLcmZveXhSL0ZtWWt2Wk9CL05UTjE5SEpJVExuMDBRZTF4 UkIyTUU1SVJGeXJmTGd2UGRJaUozczJONUQyRERmM3dBVmR0M3ZyQXJRR0t0RnRzL29nRStF dkthd25jQzAvallkaGJmSzNidlRVTFZ5dk11cEpKYzdabjhBNE9rNC9IWlVpUT09IHJvb3RA ZnJlZW5hcy5sb2NhbAo=",
          "ssh_tcpfwd": false,
          "ssh_sftp_log_facility": "",
          "ssh_bindiface": [],
          "ssh_tcpport": 22,
          "ssh_host_ecdsa_key_pub": "ZWNkc2Etc2hhMi1uaXN0cDI1NiBBQUFBRTJWalpITmhMWE5vWVRJdGJtbHpkSEF5TlRZQUFB QUlibWx6ZEhBeU5UWUFBQUJCQk1kMGQ0Z2MvTXR0Q2U1a3VLTXRMK2h6TmNhNER6N0djUjE2 NDNqQWhkVHp2eHBJL20vSFkrRGdhK3did0N1QWV2dWRYS3BpSU02b2pBRllFTzVZQ3NvPSBy b290QGZyZWVuYXMubG9jYWwK",
          "id": 1,
          "ssh_host_dsa_key": "LS0tLS1CRUdJTiBEU0EgUFJJVkFURSBLRVktLS0tLQpNSUlCdXdJQkFBS0JnUUN2S09vNGxF dTZvNHB1QTN4OWtTUWQ4dVI4d202SmhRMHcrdDVhL2VIOHB0WW9DOG1RCmhoQXdya3I3bG5Q Uko2VjExVDkyWk0ybno1c3RSUEZjZkliRUdVanVjSjE3Wk5nWGdJT1VqczAxNmZaM3ozKy8K OGJDZTdFVndBTjhBNXlkMCt0Z0gwZ2hXcnpPV0NveGdWOXhGVkc5bm9lVFFPQlQvY0lFMnFw WEZZd0lWQUwwQgo0YzI2cS9oZ3p3K1pKV3hJQUtSSkl5ODlBb0dBRk1kSGtOZk54K3VtZS9K a0k2cURoRU9aMFBidEdSNTJFajM3CmFPemY4YlJnZ2dyYUhybFVSY1IrMkpNQkNGdW4yYUF1 ZVkvZUZPMjRCa21Yd1E5OW9XeUFKcllGQUMwaUMxVlcKVkFiNG0zQUo2QnlZM01YdHJaZnps empiTC85bFF5bUpMdmRFSGV3bXdKZWxGUGZxZ3FuRnExRlQ5NE13L0lFVwpUbzZqQ25vQ2dZ QXhvbnlndVN6VW54WXh4VC9YMzhIckIvOXRSeXhZNHBKalFsbVFLcmZveXhSL0ZtWWt2Wk9C Ci9OVE4xOUhKSVRMbjAwUWUxeFJCMk1FNUlSRnlyZkxndlBkSWlKM3MyTjVEMkREZjN3QVZk dDN2ckFyUUdLdEYKdHMvb2dFK0V2S2F3bmNDMC9qWWRoYmZLM2J2VFVMVnl2TXVwSkpjN1pu OEE0T2s0L0haVWlRSVZBSmJuekFlVQpjSzZzdHBmMnFCUnlOZVMvOERWNAotLS0tLUVORCBE U0EgUFJJVkFURSBLRVktLS0tLQo=",
          "ssh_rootlogin": true
  }
JSON Parameters:
 
  • ssh_bindiface (array) – list of interfaces to bind to
  • ssh_tcpport (string) – alternate TCP port. Default is 22
  • ssh_rootlogin (string) – Disabled: Root can only login via public key authentication; Enabled: Root login permitted with password
  • ssh_passwordauth (string) – Allow Password Authentication
  • ssh_tcpfwd (string) – Allow TCP Port Forwarding
  • ssh_compression (string) – Compress Connections
  • ssh_privatekey (string) – RSA PRIVATE KEY in PEM format
  • ssh_sftp_log_level (string) – QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG2, DEBUG3
  • ssh_sftp_log_facility (string) – DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7
  • ssh_options (string) – extra options to /etc/ssh/sshd_config
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 200 – no error

TFTP

The TFTP resource represents the configuration settings for TFTP service.

List resource

GET /api/v1.0/services/tftp/

Returns the TFTP settings dictionary.

Example request:

GET /api/v1.0/services/tftp/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "tftp_umask": "022",
          "tftp_username": "nobody",
          "tftp_directory": "/mnt/tank/tftproot",
          "tftp_port": 69,
          "tftp_options": "",
          "id": 1,
          "tftp_newfiles": false
  }
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Update resource

PUT /api/v1.0/services/tftp/

Update TFTP.

Example request:

PUT /api/v1.0/services/tftp/ HTTP/1.1
Content-Type: application/json

  {
          "tftp_contact": "admin@freenas.org"
          "tftp_directory": "/mnt/tank/tftproot",
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "tftp_umask": "022",
          "tftp_username": "nobody",
          "tftp_directory": "/mnt/tank/tftproot",
          "tftp_port": 69,
          "tftp_options": "",
          "id": 1,
          "tftp_newfiles": false
  }
JSON Parameters:
 
  • tftp_directory (string) – the directory containing the files you want to publish
  • tftp_newfiles (boolean) – Allow New Files
  • tftp_port (integer) – port to listen to
  • tftp_username (string) – username which the service will run as
  • tftp_umask (string) – umask for newly created files
  • tftp_options (string) – extra command line options
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 200 – no error

UPS

The UPS resource represents the configuration settings for UPS service.

List resource

GET /api/v1.0/services/ups/

Returns the UPS settings dictionary.

Example request:

GET /api/v1.0/services/ups/ HTTP/1.1
Content-Type: application/json

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "ups_monpwd": "fixmepass",
          "ups_port": "/dev/ugen0.1",
          "ups_options": "",
          "ups_remotehost": "",
          "ups_rmonitor": false,
          "ups_toemail": "",
          "ups_shutdowntimer": 30,
          "ups_extrausers": "",
          "ups_driver": "",
          "ups_mode": "master",
          "ups_identifier": "ups",
          "ups_emailnotify": false,
          "ups_remoteport": 3493,
          "ups_subject": "UPS report generated by %h",
          "ups_shutdown": "batt",
          "ups_nocommwarntime": null,
          "id": 1,
          "ups_description": "",
          "ups_monuser": "upsmon"
  }
Response Headers:
 
  • Content-Type – content type of the response
Status Codes:
  • 200 – no error

Update resource

PUT /api/v1.0/services/ups/

Update UPS.

Example request:

PUT /api/v1.0/services/ups/ HTTP/1.1
Content-Type: application/json

  {
          "ups_port": "/dev/ugen0.1",
          "ups_rmonitor": true
  }

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json

  {
          "ups_monpwd": "fixmepass",
          "ups_port": "/dev/ugen0.1",
          "ups_options": "",
          "ups_remotehost": "",
          "ups_rmonitor": true,
          "ups_toemail": "",
          "ups_shutdowntimer": 30,
          "ups_extrausers": "",
          "ups_driver": "",
          "ups_mode": "master",
          "ups_identifier": "ups",
          "ups_emailnotify": false,
          "ups_remoteport": 3493,
          "ups_subject": "UPS report generated by %h",
          "ups_shutdown": "batt",
          "ups_nocommwarntime": null,
          "id": 1,
          "ups_description": "",
          "ups_monuser": "upsmon"
  }
JSON Parameters:
 
  • ups_mode (string) – master, slave
  • ups_identifier (string) – name is used to uniquely identify your UPS
  • ups_remotehost (string) – Remote Host
  • ups_remoteport (integer) – Remote Port
  • ups_driver (string) – see /usr/local/etc/nut/driver.list
  • ups_port (string) – path to serial or USB port where your UPS is connected
  • ups_options (string) – auxiliary parameters (ups.conf)
  • ups_description (string) – Description
  • ups_shutdown (string) – lowbatt, batt
  • ups_shutdowntimer (integer) – time in seconds until shutdown is initiated
  • ups_nocommwarntime (integer) – no communication warning time
  • ups_monuser (string) – Monitor User
  • ups_monpwd (string) – Monitor Password
  • ups_extrausers (string) – Extra users (upsd.users)
  • ups_rmonitor (boolean) – Remote Monitor
  • ups_emailnotify (boolean) – Send Email Status Updates
  • ups_toemail (string) – destination email address
  • ups_subject (string) – subject of the email. You can use the following: %d - Date; %h - Hostname
Request Headers:
 
  • Content-Type – the request content type
Response Headers:
 
  • Content-Type – the response content type
Status Codes:
  • 200 – no error