Table Of Contents
- JSON-RPC 2.0 over WebSocket API
- Changelog
- API Methods
- acme.dns.authenticator
- alert
- alertclasses
- alertservice
- api_key
- app
- app.available_space
- app.categories
- app.certificate_choices
- app.config
- app.container_console_choices
- app.container_ids
- app.convert_to_custom
- app.create
- app.delete
- app.get_instance
- app.gpu_choices
- app.ip_choices
- app.outdated_docker_images
- app.pull_images
- app.query
- app.redeploy
- app.rollback
- app.rollback_versions
- app.similar
- app.start
- app.stop
- app.update
- app.upgrade
- app.upgrade_bulk
- app.upgrade_summary
- app.used_host_ips
- app.used_ports
- app.image
- app.ix_volume
- app.registry
- audit
- auth
- auth.twofactor
- boot
- boot.environment
- catalog
- certificate
- cloud_backup
- cloudsync
- cloudsync.credentials
- config
- container
- container.device
- container.image
- core
- cronjob
- device
- directoryservices
- disk
- dns
- docker
- docker.network
- enclosure.label
- enclosure2
- failover
- failover.disabled
- failover.reboot
- fc
- fc.fc_host
- fcport
- filesystem
- filesystem.acltemplate
- ftp
- group
- hardware.virtualization
- idmap
- initshutdownscript
- interface
- interface.available_fec_modes
- interface.bridge_members_choices
- interface.cancel_rollback
- interface.checkin
- interface.checkin_waiting
- interface.choices
- interface.commit
- interface.create
- interface.delete
- interface.get_instance
- interface.has_pending_changes
- interface.ip_in_use
- interface.lacpdu_rate_choices
- interface.lag_ports_choices
- interface.network_config_to_be_removed
- interface.query
- interface.rollback
- interface.save_network_config
- interface.services_restarted_on_sync
- interface.update
- interface.vlan_parent_interface_choices
- interface.websocket_interface
- interface.websocket_local_ip
- interface.xmit_hash_policy_choices
- ipmi
- ipmi.chassis
- ipmi.lan
- ipmi.sel
- iscsi.auth
- iscsi.extent
- iscsi.global
- iscsi.initiator
- iscsi.portal
- iscsi.target
- iscsi.targetextent
- jbof
- kerberos
- kerberos.keytab
- kerberos.realm
- keychaincredential
- keychaincredential.create
- keychaincredential.delete
- keychaincredential.generate_ssh_key_pair
- keychaincredential.get_instance
- keychaincredential.query
- keychaincredential.remote_ssh_host_key_scan
- keychaincredential.remote_ssh_semiautomatic_setup
- keychaincredential.setup_ssh_connection
- keychaincredential.update
- keychaincredential.used_by
- kmip
- lxc
- network.configuration
- network.general
- nfs
- nvmet.global
- nvmet.host
- nvmet.host_subsys
- nvmet.namespace
- nvmet.port
- nvmet.port_subsys
- nvmet.subsys
- pool
- pool.attach
- pool.attachments
- pool.create
- pool.ddt_prefetch
- pool.ddt_prune
- pool.detach
- pool.expand
- pool.export
- pool.filesystem_choices
- pool.get_disks
- pool.get_instance
- pool.import_find
- pool.import_pool
- pool.is_upgraded
- pool.offline
- pool.online
- pool.prefetch
- pool.processes
- pool.query
- pool.reimport
- pool.remove
- pool.replace
- pool.scrub
- pool.update
- pool.upgrade
- pool.validate_name
- pool.dataset
- pool.dataset.attachments
- pool.dataset.change_key
- pool.dataset.checksum_choices
- pool.dataset.compression_choices
- pool.dataset.create
- pool.dataset.delete
- pool.dataset.details
- pool.dataset.encryption_algorithm_choices
- pool.dataset.encryption_summary
- pool.dataset.export_key
- pool.dataset.export_keys
- pool.dataset.export_keys_for_replication
- pool.dataset.get_instance
- pool.dataset.get_quota
- pool.dataset.inherit_parent_encryption_properties
- pool.dataset.lock
- pool.dataset.processes
- pool.dataset.promote
- pool.dataset.query
- pool.dataset.recommended_zvol_blocksize
- pool.dataset.recordsize_choices
- pool.dataset.rename
- pool.dataset.set_quota
- pool.dataset.snapshot_count
- pool.dataset.unlock
- pool.dataset.update
- pool.resilver
- pool.scrub
- pool.snapshot
- pool.snapshottask
- pool.snapshottask.create
- pool.snapshottask.delete
- pool.snapshottask.delete_will_change_retention_for
- pool.snapshottask.get_instance
- pool.snapshottask.max_count
- pool.snapshottask.max_total_count
- pool.snapshottask.query
- pool.snapshottask.run
- pool.snapshottask.update
- pool.snapshottask.update_will_change_retention_for
- privilege
- rdma
- replication
- replication.count_eligible_manual_snapshots
- replication.create
- replication.create_dataset
- replication.delete
- replication.get_instance
- replication.list_datasets
- replication.list_naming_schemas
- replication.query
- replication.restore
- replication.run
- replication.run_onetime
- replication.target_unmatched_snapshots
- replication.update
- replication.config
- reporting
- reporting.exporters
- route
- rsynctask
- service
- sharing.nfs
- sharing.smb
- sharing.webshare
- smb
- snmp
- ssh
- staticroute
- support
- system
- system.advanced
- system.advanced.config
- system.advanced.get_gpu_pci_choices
- system.advanced.login_banner
- system.advanced.nvidia_present
- system.advanced.sed_global_password
- system.advanced.sed_global_password_is_set
- system.advanced.serial_port_choices
- system.advanced.syslog_certificate_authority_choices
- system.advanced.syslog_certificate_choices
- system.advanced.update
- system.advanced.update_gpu_pci_ids
- system.general
- system.general.checkin
- system.general.checkin_waiting
- system.general.config
- system.general.country_choices
- system.general.kbdmap_choices
- system.general.local_url
- system.general.timezone_choices
- system.general.ui_address_choices
- system.general.ui_certificate_choices
- system.general.ui_httpsprotocols_choices
- system.general.ui_restart
- system.general.ui_v6address_choices
- system.general.update
- system.global
- system.ntpserver
- system.reboot
- system.security
- system.security.info
- systemdataset
- tn_connect
- truecommand
- truenas
- truenas.license
- tunable
- update
- ups
- user
- vm
- vm.bootloader_options
- vm.bootloader_ovmf_choices
- vm.clone
- vm.cpu_model_choices
- vm.create
- vm.delete
- vm.flags
- vm.get_available_memory
- vm.get_console
- vm.get_display_devices
- vm.get_display_web_uri
- vm.get_instance
- vm.get_memory_usage
- vm.get_vm_memory_info
- vm.get_vmemory_in_use
- vm.guest_architecture_and_machine_choices
- vm.log_file_download
- vm.log_file_path
- vm.maximum_supported_vcpus
- vm.port_wizard
- vm.poweroff
- vm.query
- vm.random_mac
- vm.resolution_choices
- vm.restart
- vm.resume
- vm.start
- vm.status
- vm.stop
- vm.supports_virtualization
- vm.suspend
- vm.update
- vm.virtualization_details
- vm.device
- vm.device.bind_choices
- vm.device.convert
- vm.device.create
- vm.device.delete
- vm.device.disk_choices
- vm.device.get_instance
- vm.device.iommu_enabled
- vm.device.iotype_choices
- vm.device.nic_attach_choices
- vm.device.passthrough_device
- vm.device.passthrough_device_choices
- vm.device.query
- vm.device.update
- vm.device.usb_controller_choices
- vm.device.usb_passthrough_choices
- vm.device.usb_passthrough_device
- vm.device.virtual_size
- vmware
- webshare
- webui.crypto
- webui.enclosure
- webui.main.dashboard
- zfs.resource
- zfs.resource.snapshot
- zfs.tier
- zpool
- zpool.scrub
- API Events
- acme.dns.authenticator
- alert
- alertservice
- api_key
- app
- auth
- boot.environment
- certificate
- cloud_backup
- cloudsync
- cloudsync.credentials
- container
- container.device
- core
- cronjob
- directoryservices
- disk
- docker
- docker.network
- failover
- failover.disabled
- failover.reboot
- fc.fc_host
- fcport
- filesystem
- filesystem.acltemplate
- group
- initshutdownscript
- interface
- iscsi.auth
- iscsi.extent
- iscsi.initiator
- iscsi.portal
- iscsi.target
- iscsi.targetextent
- jbof
- kerberos.keytab
- kerberos.realm
- keychaincredential
- nvmet.host
- nvmet.host_subsys
- nvmet.namespace
- nvmet.port
- nvmet.port_subsys
- nvmet.subsys
- pool
- pool.dataset
- pool.scrub
- pool.snapshot
- pool.snapshottask
- privilege
- replication
- reporting
- reporting.exporters
- rsynctask
- service
- sharing.nfs
- sharing.smb
- sharing.webshare
- staticroute
- system
- system.ntpserver
- system.reboot
- tn_connect
- truecommand
- tunable
- update
- user
- vm
- vm.device
- vmware
- zfs.tier
- zpool
- Jobs
- Query Methods
- Role-Based Access Control
Previous topic
Next topic
sharing.nfs.query¶
No Additional Items
Tuple Validation
Parameter 1: filters
filters
Type: array Default: []List of filters for query results. See API documentation for "Query Methods" for more guidance.
No Additional ItemsEach item of this array must be:
[
[
"name",
"=",
"bob"
]
]
[
[
"OR",
[
[
"name",
"=",
"bob"
],
[
"name",
"=",
"larry"
]
]
]
]
Parameter 2: options
options
Type: objectQuery options including pagination, ordering, and additional parameters.
No Additional PropertiesExtra
Type: object Default: {}Extra options are defined on a per-endpoint basis and are described in the documentation for the associated query method.
Order By
Type: array of string Default: []An array of field names describing the manner in which query results should be ordered. The field names may also have one of more of the following special prefixes: - (reverse sort direction), nulls_first: (place any null values at the head of the results list), nulls_last: (place any null values at the tail of the results list).
Each item of this array must be:
[
"size",
"-devname",
"nulls_first:-expiretime"
]
Select
Type: array Default: []An array of field names specifying the exact fields to include in the query return. The dot character . may be used to explicitly select only subkeys of the query result.
Each item of this array must be:
[
"username",
"Authentication.status"
]
Count
Type: boolean Default: falseReturn a numeric value representing the number of items that match the specified query-filters.
Get
Type: boolean Default: falseReturn the JSON object of the first result matching the specified query-filters. The query fails if there specified query-filters return no results.
Offset
Type: integer Default: 0This specifies the beginning offset of the results array. When combined with the limit query-option it may be used to implement pagination of large results arrays. WARNING: some query methods provide volatile results and the onus is on the developer to understand whether pagination is appropriate for a particular query API method.
Value must be greater or equal to 0
Limit
Type: integer Default: 0This specifies the maximum number of results matching the specified query-filters to return. When combined wtih the offset query-option it may be used to implement pagination of large results arrays.
WARNING: Some query methods provide volatile results and the onus is on the developer to understand whether pagination is appropriate for a particular query API method.
Value must be greater or equal to 0 and lesser or equal to 10000
Force Sql Filters
Type: boolean Default: falseForce use of SQL for result filtering to reduce response time. May not work for all methods.
Result
No Additional Items
Each item of this array must be:
SharingNFSEntry
Type: objectNo Additional Properties
Id
Type: integerUnique identifier for the NFS share.
Path
Type: stringLocal path to be exported.
Must be at least 1 characters long
Aliases
Type: array of string Default: []IGNORED for now.
No Additional ItemsEach item of this array must be:
Must be at least 1 characters long
Comment
Type: string Default: ""User comment associated with share.
Networks
Type: array of string Default: []List of authorized networks that are allowed to access the share having format "network/mask" CIDR notation. Each entry must be unique. If empty, all networks are allowed. Excessively long lists should be avoided.
No Additional ItemsEach item of this array must be:
Must be at least 1 characters long
Hosts
Type: array of string Default: []List of IP's/hostnames which are allowed to access the share. No quotes or spaces are allowed. Each entry must be unique. If empty, all IP's/hostnames are allowed. Excessively long lists should be avoided.
No Additional ItemsEach item of this array must be:
Must be at least 1 characters long
Ro
Type: boolean Default: falseExport the share as read only.
Security
Type: array of enum (of string) Default: []Specify the security schema.
No Additional ItemsEach item of this array must be:
Must be one of:
- "SYS"
- "KRB5"
- "KRB5I"
- "KRB5P"
Enabled
Type: boolean Default: trueEnable or disable the share.
Locked
Read-only value indicating whether the share is located on a locked dataset.
Returns:
- True: The share is in a locked dataset.
- False: The share is not in a locked dataset.
- None: Lock status is not available because path locking information was not requested.
Expose Snapshots
Type: boolean Default: falseEnterprise feature to enable access to the ZFS snapshot directory for the export. Export path must be the root directory of a ZFS dataset.
Storage tier in which the share's underlying dataset is located. This field is read-only; configure the dataset's tier via zfs.tier.dataset_set_tier.
NOTE: this is a licensed feature. Will be null if TrueNAS is unlicensed, if tiering is disabled, or if the pool has no SPECIAL vdev.
TierInfo
Type: objectNo Additional Properties
Tier Type
Type: enum (of string)Storage performance tier for this share.
Must be one of:
- "REGULAR"
- "PERFORMANCE"
Most recent rewrite job for this share's dataset, or null if no job history exists.
ZfsTierRewriteJobEntry
Type: objectNo Additional Properties
Tier Job Id
Type: stringRewrite job identifier in dataset_name@job_uuid format.
Must be at least 1 characters long
Dataset Name
Type: stringZFS dataset this job is operating on.
Must be at least 1 characters long
Job Uuid
Type: stringUnique identifier for this rewrite job.
Must be at least 1 characters long
Status
Type: enum (of string)Current lifecycle state of the job.
COMPLETE- All files in the dataset have been processed.RUNNING- Job is actively processing files.QUEUED- Job is waiting for a free execution slot (seemax_concurrent_jobs).CANCELLED- Job was stopped viazfs_tier_job.cancel. Not resumable.STOPPED- Job was RUNNING but its process is no longer active (e.g. daemon restart). This state is computed on read and is never written to persistent storage.ERROR- Job halted due to an unrecoverable error. Usezfs_tier_job.recoverto retry failed files.
Must be one of:
- "COMPLETE"
- "RUNNING"
- "QUEUED"
- "CANCELLED"
- "STOPPED"
- "ERROR"
SharingNFSEntry
Type: objectNo Additional Properties
Id
Type: integerUnique identifier for the NFS share.
Path
Type: stringLocal path to be exported.
Must be at least 1 characters long
Aliases
Type: array of string Default: []IGNORED for now.
No Additional ItemsEach item of this array must be:
Must be at least 1 characters long
Comment
Type: string Default: ""User comment associated with share.
Networks
Type: array of string Default: []List of authorized networks that are allowed to access the share having format "network/mask" CIDR notation. Each entry must be unique. If empty, all networks are allowed. Excessively long lists should be avoided.
No Additional ItemsEach item of this array must be:
Must be at least 1 characters long
Hosts
Type: array of string Default: []List of IP's/hostnames which are allowed to access the share. No quotes or spaces are allowed. Each entry must be unique. If empty, all IP's/hostnames are allowed. Excessively long lists should be avoided.
No Additional ItemsEach item of this array must be:
Must be at least 1 characters long
Ro
Type: boolean Default: falseExport the share as read only.
Security
Type: array of enum (of string) Default: []Specify the security schema.
No Additional ItemsEach item of this array must be:
Must be one of:
- "SYS"
- "KRB5"
- "KRB5I"
- "KRB5P"
Enabled
Type: boolean Default: trueEnable or disable the share.
Locked
Read-only value indicating whether the share is located on a locked dataset.
Returns:
- True: The share is in a locked dataset.
- False: The share is not in a locked dataset.
- None: Lock status is not available because path locking information was not requested.
Expose Snapshots
Type: boolean Default: falseEnterprise feature to enable access to the ZFS snapshot directory for the export. Export path must be the root directory of a ZFS dataset.
Storage tier in which the share's underlying dataset is located. This field is read-only; configure the dataset's tier via zfs.tier.dataset_set_tier.
NOTE: this is a licensed feature. Will be null if TrueNAS is unlicensed, if tiering is disabled, or if the pool has no SPECIAL vdev.
No Additional Items
Each item of this array must be:
Required roles: SHARING_NFS_READ