Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Document NFS sharing resource

  • Loading branch information...
commit 1cfeee3ef764ddbc1335cf994c9c13bfa3b8aaee 1 parent c674208
@williambr williambr authored
Showing with 197 additions and 0 deletions.
  1. +197 −0 docs/api/resources/sharing.rst
View
197 docs/api/resources/sharing.rst
@@ -203,3 +203,200 @@ Delete resource
Content-Type: application/json
:statuscode 204: no error
+
+
+NFS
+----------
+
+The NFS resource represents NFS shares.
+
+List resource
++++++++++++++
+
+.. http:get:: /api/v1.0/sharing/nfs/
+
+ Returns a list of all NFS shares.
+
+ **Example request**:
+
+ .. sourcecode:: http
+
+ GET /api/v1.0/sharing/nfs/ HTTP/1.1
+ Content-Type: application/json
+
+ **Example response**:
+
+ .. sourcecode:: http
+
+ HTTP/1.1 200 OK
+ Vary: Accept
+ Content-Type: application/json
+
+ [
+ {
+ "nfs_inheritperms": false,
+ "nfs_hostsallow": "",
+ "nfs_name": "My Test Share",
+ "nfs_guestok": false,
+ "nfs_showhiddenfiles": false,
+ "nfs_hostsdeny": "",
+ "nfs_recyclebin": false,
+ "nfs_auxsmbconf": "",
+ "nfs_comment": "",
+ "nfs_path": "/mnt/tank/MyShare",
+ "nfs_ro": false,
+ "nfs_inheritowner": false,
+ "nfs_guestonly": true,
+ "id": 1,
+ "nfs_browsable": true
+ }
+ ]
+
+ :query offset: offset number. default is 0
+ :query limit: limit number. default is 30
+ :resheader Content-Type: content type of the response
+ :statuscode 200: no error
+
+
+Create resource
++++++++++++++++
+
+.. http:post:: /api/v1.0/sharing/nfs/
+
+ Creates a new NFS share and returns the new NFS share object.
+
+ **Example request**:
+
+ .. sourcecode:: http
+
+ POST /api/v1.0/sharing/nfs/ HTTP/1.1
+ Content-Type: application/json
+
+ {
+ "nfs_comment": "My Test Share",
+ "nfs_paths": ["/mnt/tank"]
+ }
+
+ **Example response**:
+
+ .. sourcecode:: http
+
+ HTTP/1.1 201 Created
+ Vary: Accept
+ Content-Type: application/json
+
+ {
+ "nfs_mapall_user": "",
+ "nfs_maproot_group": "",
+ "nfs_maproot_user": "",
+ "nfs_network": "",
+ "nfs_ro": false,
+ "nfs_hosts": "",
+ "nfs_alldirs": false,
+ "nfs_mapall_group": "",
+ "nfs_comment": "My Test Share",
+ "nfs_paths": [
+ "/mnt/tank"
+ ],
+ "id": 1,
+ "nfs_quiet": false
+ }
+
+ :json list(string) nfs_paths: paths to share
+ :json string nfs_comment: user comment
+ :json string nfs_hosts: allowed hosts or ip addresses
+ :json string nfs_network: allowed networks
+ :json string nfs_maproot_user: limit root to this user permissions
+ :json string nfs_maproot_group: limit root to this group permissions
+ :json string nfs_mapall_user: user used by all clients
+ :json string nfs_mapall_group: group used by all clients
+ :json boolean nfs_alldirs: allow mounting of any subdirectory
+ :json boolean nfs_ro: readonly share
+ :json boolean nfs_quiet: inhibit syslog warnings
+ :reqheader Content-Type: the request content type
+ :resheader Content-Type: the response content type
+ :statuscode 201: no error
+
+
+Update resource
++++++++++++++++
+
+.. http:put:: /api/v1.0/sharing/nfs/(int:id)/
+
+ Update NFS share `id`.
+
+ **Example request**:
+
+ .. sourcecode:: http
+
+ PUT /api/v1.0/sharing/nfs/1/ HTTP/1.1
+ Content-Type: application/json
+
+ {
+ "nfs_ro": true
+ }
+
+ **Example response**:
+
+ .. sourcecode:: http
+
+ HTTP/1.1 202 Accepted
+ Vary: Accept
+ Content-Type: application/json
+
+ {
+ "nfs_mapall_user": "",
+ "nfs_maproot_group": "",
+ "nfs_maproot_user": "",
+ "nfs_network": "",
+ "nfs_ro": true,
+ "nfs_hosts": "",
+ "nfs_alldirs": false,
+ "nfs_mapall_group": "",
+ "nfs_comment": "My Test Share",
+ "nfs_paths": [
+ "/mnt/tank"
+ ],
+ "id": 1,
+ "nfs_quiet": false
+ }
+
+ :json list(string) nfs_paths: paths to share
+ :json string nfs_comment: user comment
+ :json string nfs_hosts: allowed hosts or ip addresses
+ :json string nfs_network: allowed networks
+ :json string nfs_maproot_user: limit root to this user permissions
+ :json string nfs_maproot_group: limit root to this group permissions
+ :json string nfs_mapall_user: user used by all clients
+ :json string nfs_mapall_group: group used by all clients
+ :json boolean nfs_alldirs: allow mounting of any subdirectory
+ :json boolean nfs_ro: readonly share
+ :json boolean nfs_quiet: inhibit syslog warnings
+ :reqheader Content-Type: the request content type
+ :resheader Content-Type: the response content type
+ :statuscode 202: no error
+
+
+Delete resource
++++++++++++++++
+
+.. http:delete:: /api/v1.0/sharing/nfs/(int:id)/
+
+ Delete NFS share `id`.
+
+ **Example request**:
+
+ .. sourcecode:: http
+
+ DELETE /api/v1.0/sharing/nfs/1/ HTTP/1.1
+ Content-Type: application/json
+
+ **Example response**:
+
+ .. sourcecode:: http
+
+ HTTP/1.1 204 No Response
+ Vary: Accept
+ Content-Type: application/json
+
+ :statuscode 204: no error
Please sign in to comment.
Something went wrong with that request. Please try again.