From dead75232b6cdaa2705bcb5f9adecc8d7dc41690 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Sat, 19 Oct 2013 19:12:09 +0200 Subject: [PATCH] Update ocs-share-api.rst - Updated typos - Added data types of arguments - Added misc additional info --- developer_manual/core/ocs-share-api.rst | 59 +++++++++++++------------ 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/developer_manual/core/ocs-share-api.rst b/developer_manual/core/ocs-share-api.rst index d4c3b0bc1..85981455e 100644 --- a/developer_manual/core/ocs-share-api.rst +++ b/developer_manual/core/ocs-share-api.rst @@ -19,19 +19,19 @@ Get all shares from the user. Statuscodes: -* 100 - successfull +* 100 - successful -Get Shares from a specific File -------------------------------- +Get Shares from a specific file or folder +----------------------------------------- -Get all shares from a given file. +Get all shares from a given file/folder. * Syntax: /shares * Method: GET -* URL Arguments: path - path to file/folder -* URL Arguments: reshares - returns not only the shares from the current user but all shares from the given file. -* URL Arguments: subfiles - returns all shares within a folder, given that +* URL Arguments: path - (string) path to file/folder +* URL Arguments: reshares - (boolean) returns not only the shares from the current user but all shares from the given file. +* URL Arguments: subfiles - (boolean) returns all shares within a folder, given that *path* defines a folder * Mandatory fields: path @@ -39,25 +39,25 @@ Get all shares from a given file. Statuscodes -* 100 - successfull -* 404 - file doesn't exists +* 100 - successful +* 404 - file doesn't exist Get information about a known Share ----------------------------------- -Get informations about a given share. +Get information about a given share. * Syntax: /shares/** * Method: GET -* Arguments: share_id - share ID +* Arguments: share_id - (int) share ID -* Result: XML with the share informations +* Result: XML with the share information Statuscodes: -* 100 - successfull -* 404 - share doesn't exists +* 100 - successful +* 404 - share doesn't exist Create a new Share @@ -68,20 +68,20 @@ Share a file/folder with a user/group or as public link. * Syntax: /shares * Method: POST -* POST Arguments: path - path to the file/folder which should be shared -* POST Arguments: shareType - '0' = user; '1' = group; '3' = public link -* POST Arguments: shareWith - with which user/group the file should be shared -* POST Arguments: publicUpload - allow public upload to a public shared folder (true/false) -* POST Arguments: password - password to protect public link Share -* POST Arguments: permissions - 1 = read; 2 = update; 4 = create; 8 = delete; +* POST Arguments: path - (string) path to the file/folder which should be shared +* POST Arguments: shareType - (int) '0' = user; '1' = group; '3' = public link +* POST Arguments: shareWith - (int) user / group id with which the file should be shared +* POST Arguments: publicUpload - (boolean) allow public upload to a public shared folder (true/false) +* POST Arguments: password - (string) password to protect public link Share with +* POST Arguments: permissions - (int) 1 = read; 2 = update; 4 = create; 8 = delete; 16 = share; 31 = all (default: 31, for public shares: 1) * Mandatory fields: shareType, path and shareWith for shareType 0 or 1. -* Result: XML containing the share ID of the newly created share +* Result: XML containing the share ID (int) of the newly created share Statuscodes: -* 100 - successfull +* 100 - successful * 404 - file couldn't be shared Delete Share @@ -92,11 +92,11 @@ Remove the given share. * Syntax: /shares/** * Method: DELETE -* Arguments: share_id - share ID +* Arguments: share_id - (int) share ID Statuscodes: -* 100 - successfull +* 100 - successful * 404 - file couldn't be deleted @@ -108,12 +108,13 @@ Update a given share. Only one value can be updated per request. * Syntax: /shares/** * Method: PUT -* Arguments: share_id - share ID -* PUT Arguments: permissions - update permissions -* PUT Arguments: password - update password for public link Share -* PUT Arguments: publicUpload - enable (true) /disable (false) public upload for public shares +* Arguments: share_id - (int) share ID +* PUT Arguments: permissions - (int) update permissions (see "Create share" above) +* PUT Arguments: password - (string) updated password for public link Share +* PUT Arguments: publicUpload - (boolean) enable (true) /disable (false) public upload for public shares +Note that only one of "password" or "publicUpload" can be specified at once. Statuscodes: -* 100 - successfull +* 100 - successful * 404 - couldn't update share