Permalink
Browse files

Document AFP sharing resource

  • Loading branch information...
1 parent 1cfeee3 commit bf5e67dbaed49b4b0205150f87a3b3b276d16298 @william-gr william-gr committed Sep 11, 2013
Showing with 245 additions and 0 deletions.
  1. +245 −0 docs/api/resources/sharing.rst
@@ -400,3 +400,248 @@ Delete resource
Content-Type: application/json
:statuscode 204: no error
+
+
+AFP
+----------
+
+The AFP resource represents AFP shares.
+
+List resource
++++++++++++++
+
+.. http:get:: /api/v1.0/sharing/afp/
+
+ Returns a list of all AFP shares.
+
+ **Example request**:
+
+ .. sourcecode:: http
+
+ GET /api/v1.0/sharing/afp/ HTTP/1.1
+ Content-Type: application/json
+
+ **Example response**:
+
+ .. sourcecode:: http
+
+ HTTP/1.1 200 OK
+ Vary: Accept
+ Content-Type: application/json
+
+ [
+ {
+ "afp_inheritperms": false,
+ "afp_hostsallow": "",
+ "afp_name": "My Test Share",
+ "afp_guestok": false,
+ "afp_showhiddenfiles": false,
+ "afp_hostsdeny": "",
+ "afp_recyclebin": false,
+ "afp_auxsmbconf": "",
+ "afp_comment": "",
+ "afp_path": "/mnt/tank/MyShare",
+ "afp_ro": false,
+ "afp_inheritowner": false,
+ "afp_guestonly": true,
+ "id": 1,
+ "afp_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/afp/
+
+ Creates a new AFP share and returns the new AFP share object.
+
+ **Example request**:
+
+ .. sourcecode:: http
+
+ POST /api/v1.0/sharing/afp/ HTTP/1.1
+ Content-Type: application/json
+
+ {
+ "afp_name": "My Test Share",
+ "afp_path": "/mnt/tank"
+ }
+
+ **Example response**:
+
+ .. sourcecode:: http
+
+ HTTP/1.1 201 Created
+ Vary: Accept
+ Content-Type: application/json
+
+ {
+ "afp_adouble": true,
+ "afp_upriv": true,
+ "afp_mswindows": false,
+ "afp_prodos": false,
+ "afp_nofileid": false,
+ "id": 1,
+ "afp_comment": "",
+ "afp_fperm": "755",
+ "afp_deny": "",
+ "afp_diskdiscovery": false,
+ "afp_sharecharset": "",
+ "afp_nostat": false,
+ "afp_name": "test share",
+ "afp_discoverymode": "default",
+ "afp_nohex": false,
+ "afp_nodev": false,
+ "afp_rw": "",
+ "afp_allow": "",
+ "afp_dperm": "644",
+ "afp_ro": "",
+ "afp_sharepw": "",
+ "afp_dbpath": "",
+ "afp_cachecnid": false,
+ "afp_path": "/mnt/tank",
+ "afp_crlf": false
+ }
+
+ :json string afp_path: paths to share
+ :json string afp_name: share name
+ :json string afp_comment: user comment
+ :json string afp_fperm: default file permission
+ :json string afp_dperm: default file permission
+ :json string afp_allow: users and groups allowed to access
+ :json string afp_deny: users or groups not allowed to access
+ :json string afp_sharecharset: character set for the share
+ :json string afp_discoverymode: default, time-machine
+ :json string afp_rw: users and groups allowed to read and write
+ :json string afp_ro: users and groups allowed to read only
+ :json string afp_sharepw: password for the share
+ :json string afp_dbpath: path to set database information
+ :json boolean afp_adouble: enable automatic creation of .AppleDouble
+ :json boolean afp_upriv: use AFP3 unix privileges
+ :json boolean afp_mswindows: restrict filenames to charset used by Windows
+ :json boolean afp_prodos: compatibility with Apple II clients
+ :json boolean afp_nofileid: don't advertise createfileid, resolveid, deleteid calls
+ :json boolean afp_diskdiscovery: allow other systems to discover this share as a disk for data, as a Time Machine backup volume or not at all
+ :json boolean afp_nostat: don't stat volume path when enumerating volumes list
+ :json boolean afp_nohex: disable :hex translations for anything except dot files
+ :json boolean afp_nodev: always use 0 for device number
+ :json boolean afp_cachecnid: uses the ID information stored in AppleDouble V2 header files to reduce database load
+ :json boolean afp_crlf: crlf translation for TEXT files
+ :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/afp/(int:id)/
+
+ Update AFP share `id`.
+
+ **Example request**:
+
+ .. sourcecode:: http
+
+ PUT /api/v1.0/sharing/afp/1/ HTTP/1.1
+ Content-Type: application/json
+
+ {
+ "afp_adouble": false
+ }
+
+ **Example response**:
+
+ .. sourcecode:: http
+
+ HTTP/1.1 202 Accepted
+ Vary: Accept
+ Content-Type: application/json
+
+ {
+ "afp_adouble": false,
+ "afp_upriv": true,
+ "afp_mswindows": false,
+ "afp_prodos": false,
+ "afp_nofileid": false,
+ "id": 1,
+ "afp_comment": "",
+ "afp_fperm": "755",
+ "afp_deny": "",
+ "afp_diskdiscovery": false,
+ "afp_sharecharset": "",
+ "afp_nostat": false,
+ "afp_name": "test share",
+ "afp_discoverymode": "default",
+ "afp_nohex": false,
+ "afp_nodev": false,
+ "afp_rw": "",
+ "afp_allow": "",
+ "afp_dperm": "644",
+ "afp_ro": "",
+ "afp_sharepw": "",
+ "afp_dbpath": "",
+ "afp_cachecnid": false,
+ "afp_path": "/mnt/tank",
+ "afp_crlf": false
+ }
+
+ :json string afp_path: paths to share
+ :json string afp_name: share name
+ :json string afp_comment: user comment
+ :json string afp_fperm: default file permission
+ :json string afp_dperm: default file permission
+ :json string afp_allow: users and groups allowed to access
+ :json string afp_deny: users or groups not allowed to access
+ :json string afp_sharecharset: character set for the share
+ :json string afp_discoverymode: default, time-machine
+ :json string afp_rw: users and groups allowed to read and write
+ :json string afp_ro: users and groups allowed to read only
+ :json string afp_sharepw: password for the share
+ :json string afp_dbpath: path to set database information
+ :json boolean afp_adouble: enable automatic creation of .AppleDouble
+ :json boolean afp_upriv: use AFP3 unix privileges
+ :json boolean afp_mswindows: restrict filenames to charset used by Windows
+ :json boolean afp_prodos: compatibility with Apple II clients
+ :json boolean afp_nofileid: don't advertise createfileid, resolveid, deleteid calls
+ :json boolean afp_diskdiscovery: allow other systems to discover this share as a disk for data, as a Time Machine backup volume or not at all
+ :json boolean afp_nostat: don't stat volume path when enumerating volumes list
+ :json boolean afp_nohex: disable :hex translations for anything except dot files
+ :json boolean afp_nodev: always use 0 for device number
+ :json boolean afp_cachecnid: uses the ID information stored in AppleDouble V2 header files to reduce database load
+ :json boolean afp_crlf: crlf translation for TEXT files
+ :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/afp/(int:id)/
+
+ Delete AFP share `id`.
+
+ **Example request**:
+
+ .. sourcecode:: http
+
+ DELETE /api/v1.0/sharing/afp/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

0 comments on commit bf5e67d

Please sign in to comment.