Resources related to sharing.
The CIFS resource represents CIFS shares using samba.
Returns a list of all CIFS shares.
Example request:
GET /api/v1.0/sharing/cifs/ HTTP/1.1
Content-Type: application/json
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
[
{
"cifs_inheritperms": false,
"cifs_hostsallow": "",
"cifs_name": "My Test Share",
"cifs_guestok": false,
"cifs_showhiddenfiles": false,
"cifs_hostsdeny": "",
"cifs_recyclebin": false,
"cifs_auxsmbconf": "",
"cifs_comment": "",
"cifs_path": "/mnt/tank/MyShare",
"cifs_ro": false,
"cifs_inheritowner": false,
"cifs_guestonly": true,
"id": 1,
"cifs_browsable": true
}
]
Query Parameters: | |
---|---|
|
|
Response Headers: | |
|
|
Status Codes: |
|
Creates a new CIFS share and returns the new CIFS share object.
Example request:
POST /api/v1.0/sharing/cifs/ HTTP/1.1
Content-Type: application/json
{
"cifs_name": "My Test Share",
"cifs_path": "/mnt/tank/MyShare"
}
Example response:
HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json
{
"cifs_inheritperms": false,
"cifs_hostsallow": "",
"cifs_name": "My Test Share",
"cifs_guestok": false,
"cifs_showhiddenfiles": false,
"cifs_hostsdeny": "",
"cifs_recyclebin": false,
"cifs_auxsmbconf": "",
"cifs_comment": "",
"cifs_path": "/mnt/tank/MyShare",
"cifs_ro": false,
"cifs_inheritowner": false,
"cifs_guestonly": true,
"id": 1,
}
Json Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
Update CIFS share id.
Example request:
PUT /api/v1.0/sharing/cifs/1/ HTTP/1.1
Content-Type: application/json
{
"cifs_guestok": true
}
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
{
"cifs_inheritperms": false,
"cifs_hostsallow": "",
"cifs_name": "My Test Share",
"cifs_guestok": true,
"cifs_showhiddenfiles": false,
"cifs_hostsdeny": "",
"cifs_recyclebin": false,
"cifs_auxsmbconf": "",
"cifs_comment": "",
"cifs_path": "/mnt/tank/MyShare",
"cifs_ro": false,
"cifs_inheritowner": false,
"cifs_guestonly": true,
"id": 1,
}
Json Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
The NFS resource represents NFS shares.
Returns a list of all NFS shares.
Example request:
GET /api/v1.0/sharing/nfs/ HTTP/1.1
Content-Type: application/json
Example response:
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 Parameters: | |
---|---|
|
|
Response Headers: | |
|
|
Status Codes: |
|
Creates a new NFS share and returns the new NFS share object.
Example request:
POST /api/v1.0/sharing/nfs/ HTTP/1.1
Content-Type: application/json
{
"nfs_comment": "My Test Share",
"nfs_paths": ["/mnt/tank"]
}
Example response:
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 Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
Update NFS share id.
Example request:
PUT /api/v1.0/sharing/nfs/1/ HTTP/1.1
Content-Type: application/json
{
"nfs_ro": true
}
Example response:
HTTP/1.1 200 OK
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 Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
The AFP resource represents AFP shares.
Returns a list of all AFP shares.
Example request:
GET /api/v1.0/sharing/afp/ HTTP/1.1
Content-Type: application/json
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
[
{
"afp_upriv": true,
"id": 1,
"afp_comment": "",
"afp_fperm": "755",
"afp_deny": "",
"afp_nostat": false,
"afp_name": "test share",
"afp_nodev": false,
"afp_rw": "",
"afp_allow": "",
"afp_dperm": "644",
"afp_ro": "",
"afp_sharepw": "",
"afp_dbpath": "",
"afp_path": "/mnt/tank",
"afp_timemachine": false,
"afp_umask": "000",
}
]
Query Parameters: | |
---|---|
|
|
Response Headers: | |
|
|
Status Codes: |
|
Creates a new AFP share and returns the new AFP share object.
Example request:
POST /api/v1.0/sharing/afp/ HTTP/1.1
Content-Type: application/json
{
"afp_name": "My Test Share",
"afp_path": "/mnt/tank"
}
Example response:
HTTP/1.1 201 Created
Vary: Accept
Content-Type: application/json
{
"afp_upriv": true,
"id": 1,
"afp_comment": "",
"afp_fperm": "755",
"afp_deny": "",
"afp_nostat": false,
"afp_name": "test share",
"afp_nodev": false,
"afp_rw": "",
"afp_allow": "",
"afp_dperm": "644",
"afp_ro": "",
"afp_sharepw": "",
"afp_dbpath": "",
"afp_path": "/mnt/tank",
"afp_timemachine": false,
"afp_umask": "000",
}
Json Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|
Update AFP share id.
Example request:
PUT /api/v1.0/sharing/afp/1/ HTTP/1.1
Content-Type: application/json
{
"afp_timemachine": true
}
Example response:
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
{
"afp_upriv": true,
"id": 1,
"afp_comment": "",
"afp_fperm": "755",
"afp_deny": "",
"afp_nostat": false,
"afp_name": "test share",
"afp_nodev": false,
"afp_rw": "",
"afp_allow": "",
"afp_dperm": "644",
"afp_ro": "",
"afp_sharepw": "",
"afp_dbpath": "",
"afp_path": "/mnt/tank",
"afp_timemachine": true,
"afp_umask": "000",
}
Json Parameters: | |
---|---|
|
|
Request Headers: | |
|
|
Response Headers: | |
|
|
Status Codes: |
|