OpenXchangeClient.Api.Folders (open_xchange_client v0.10.0)
API calls for all endpoints tagged Folders
.
Link to this section Summary
Functions
Checks the existing upload for given type.
Clears the content of a list of folders.
Creates a new folder.
Deletes a list of folders.
Gets a folder.
Gets the new, modified and deleted folders of a given folder.
Gets the parent folders above the specified folder.
Gets the folders at the root level of the folder structure.
Gets shared folders of a certain module.
Gets the subfolders of a specified parent folder.
Gets all visible folders of a certain module.
Notifies users or groups about a shared folder.
Restore specified folders from trash folder
Updates a folder.
Link to this section Functions
check_limits(connection, session, id, type, body, opts \\ [])
@spec check_limits( Tesla.Env.client(), String.t(), String.t(), String.t(), OpenXchangeClient.Model.FolderCheckLimitsData.t(), keyword() ) :: {:ok, OpenXchangeClient.Model.FolderCheckLimitsResponse.t()} | {:error, Tesla.Env.t()}
Checks the existing upload for given type.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- id (String.t): Object ID of the folder to check.
- type (String.t): The type of the files to upload (e. g. 'filestorage, 'pim')
- body (FolderCheckLimitsData): A JSON object containing an array of file meta data (size and name).
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
clear_folders(connection, session, body, opts \\ [])
@spec clear_folders(Tesla.Env.client(), String.t(), [String.t()], keyword()) :: {:ok, OpenXchangeClient.Model.FoldersCleanUpResponse.t()} | {:error, Tesla.Env.t()}
Clears the content of a list of folders.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- body ([String.t]): A JSON array with object IDs of the folders.
- opts (KeywordList): [optional] Optional parameters
- :tree (String.t): The identifier of the folder tree. If missing "0" (primary folder tree) is assumed.
- :allowed_modules (String.t): An array of modules (either numbers or strings; e.g. "tasks,calendar,contacts,mail") supported by requesting client. If missing, all available modules are considered.
- :push_token (String.t): The client's push token to restrict the generated drive event
returns
Returns
on success {:error, Tesla.Env.t} on failure
create_folder(connection, folder_id, session, body, opts \\ [])
@spec create_folder( Tesla.Env.client(), String.t(), String.t(), OpenXchangeClient.Model.NewFolderBody.t(), keyword() ) :: {:ok, OpenXchangeClient.Model.FolderUpdateResponse.t()} | {:error, Tesla.Env.t()}
Creates a new folder.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- folder_id (String.t): The parent folder object ID of the newly created folder.
- session (String.t): A session ID previously obtained from the login module.
- body (NewFolderBody): JSON object with "folder" object containing the modified fields and optional "notification" object to let added permission entities be notified about newly shared folders for all modules except mail. (Example: {"folder":{"module":"infostore","subscribed":true,"title":"Test123"}} or {"folder":{"module":"infostore","subscribed":true,"title":"Test123","permissions":[{"bits":403710016,"entity":84,"group":false}]},"notification":{"transport":"mail","message":"The message"}})
- opts (KeywordList): [optional] Optional parameters
- :tree (String.t): The identifier of the folder tree. If missing "0" (primary folder tree) is assumed.
- :allowed_modules (String.t): An array of modules (either numbers or strings; e.g. "tasks,calendar,contacts,mail") supported by requesting client. If missing, all available modules are considered.
- :push_token (String.t): The client's push token to restrict the generated drive event
returns
Returns
on success {:error, Tesla.Env.t} on failure
delete_folders(connection, session, body, opts \\ [])
@spec delete_folders(Tesla.Env.client(), String.t(), [String.t()], keyword()) :: {:ok, OpenXchangeClient.Model.FoldersCleanUpResponse.t()} | {:error, Tesla.Env.t()}
Deletes a list of folders.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- body ([String.t]): A JSON array with object IDs of the folders.
- opts (KeywordList): [optional] Optional parameters
- :tree (String.t): The identifier of the folder tree. If missing "0" (primary folder tree) is assumed.
- :timestamp (integer()): The optional timestamp of the last update of the deleted folders.
- :allowed_modules (String.t): An array of modules (either numbers or strings; e.g. "tasks,calendar,contacts,mail") supported by requesting client. If missing, all available modules are considered.
- :hard_delete (boolean()): If set to
true
, the folders are deleted permanently. Otherwise, and if the underlying storage supports a trash folder and the folders are not yet located below the trash folder, they are moved to the trash folder. - :fail_on_error (boolean()): If an error occured for one folder and this parameter is set to
true
the process will abort and throw an error. If this parameter is set to 'false' the process will continue for the remaining folders and will add a warning to the response instead. - :extended_response (boolean()): If this parameter is set to
true
a different response will be returned. The response contains an array of json objects, which can contain the following fields: <ul> <li><code>new_path</code> - The new path of the folder in case of a trash operation.</li> <li><code>path</code> - The old path.</li> <li><code>hasFailed</code> - A boolean flag indicating that the delete operation has failed.</li> <li><code>isTrashed</code> - A boolean flag indicating that the folder has been trashed.</li> <li><code>isSuppoprted</code> - A boolean flag indicating that the folder storage supports trashing.</li> </ul> - :push_token (String.t): The client's push token to restrict the generated drive event
returns
Returns
on success {:error, Tesla.Env.t} on failure
get_folder(connection, session, id, opts \\ [])
@spec get_folder(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, OpenXchangeClient.Model.FolderResponse.t()} | {:error, Tesla.Env.t()}
Gets a folder.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- id (String.t): Object ID of the requested folder.
- opts (KeywordList): [optional] Optional parameters
- :tree (String.t): The identifier of the folder tree. If missing "0" (primary folder tree) is assumed.
- :allowed_modules (String.t): An array of modules (either numbers or strings; e.g. "tasks,calendar,contacts,mail") supported by requesting client. If missing, all available modules are considered.
- :language (String.t): Optional locale to use instead of the currently configured locale of the user.
returns
Returns
on success {:error, Tesla.Env.t} on failure
get_folder_updates(connection, session, parent, timestamp, columns, opts \\ [])
@spec get_folder_updates( Tesla.Env.client(), String.t(), String.t(), integer(), String.t(), keyword() ) :: {:ok, OpenXchangeClient.Model.FolderUpdatesResponse.t()} | {:error, Tesla.Env.t()}
Gets the new, modified and deleted folders of a given folder.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- parent (String.t): Object ID of a folder, which is the parent folder of the requested folders.
- timestamp (integer()): Timestamp of the last update of the requested folders.
- columns (String.t): A comma-separated list of columns to return, like "1,300". Each column is specified by a numeric column identifier, see Common folder data and Detailed folder data.
- opts (KeywordList): [optional] Optional parameters
- :tree (String.t): The identifier of the folder tree. If missing "0" (primary folder tree) is assumed.
- :language (String.t): Optional locale to use instead of the currently configured locale of the user.
- :ignore (String.t): Which kinds of updates should be ignored. Currently, the only valid value – "deleted" – causes deleted object IDs not to be returned.
- :allowed_modules (String.t): An array of modules (either numbers or strings; e.g. "tasks,calendar,contacts,mail") supported by requesting client. If missing, all available modules are considered.
returns
Returns
on success {:error, Tesla.Env.t} on failure
get_path(connection, session, id, columns, opts \\ [])
@spec get_path(Tesla.Env.client(), String.t(), String.t(), String.t(), keyword()) :: {:ok, OpenXchangeClient.Model.FoldersResponse.t()} | {:error, Tesla.Env.t()}
Gets the parent folders above the specified folder.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- id (String.t): Object ID of a folder.
- columns (String.t): A comma-separated list of columns to return, like "1,300". Each column is specified by a numeric column identifier, see Common folder data and Detailed folder data.
- opts (KeywordList): [optional] Optional parameters
- :tree (String.t): The identifier of the folder tree. If missing "0" (primary folder tree) is assumed.
- :allowed_modules (String.t): An array of modules (either numbers or strings; e.g. "tasks,calendar,contacts,mail") supported by requesting client. If missing, all available modules are considered.
- :language (String.t): Optional locale to use instead of the currently configured locale of the user.
returns
Returns
on success {:error, Tesla.Env.t} on failure
get_root_folders(connection, session, columns, opts \\ [])
@spec get_root_folders(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, OpenXchangeClient.Model.FoldersResponse.t()} | {:error, Tesla.Env.t()}
Gets the folders at the root level of the folder structure.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- columns (String.t): A comma-separated list of columns to return, like "1,300". Each column is specified by a numeric column identifier, see Common folder data and Detailed folder data.
- opts (KeywordList): [optional] Optional parameters
- :tree (String.t): The identifier of the folder tree. If missing "0" (primary folder tree) is assumed.
- :allowed_modules (String.t): An array of modules (either numbers or strings; e.g. "tasks,calendar,contacts,mail") supported by requesting client. If missing, all available modules are considered.
returns
Returns
on success {:error, Tesla.Env.t} on failure
get_sub_folders(connection, session, parent, columns, opts \\ [])
@spec get_sub_folders( Tesla.Env.client(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, OpenXchangeClient.Model.FoldersResponse.t()} | {:error, Tesla.Env.t()}
Gets the subfolders of a specified parent folder.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- parent (String.t): Object ID of a folder, which is the parent folder of the requested folders.
- columns (String.t): A comma-separated list of columns to return, like "1,300". Each column is specified by a numeric column identifier, see Common folder data and Detailed folder data.
- opts (KeywordList): [optional] Optional parameters
- :all (integer()): Set to 1 to list even not subscribed folders.
- :tree (String.t): The identifier of the folder tree. If missing "0" (primary folder tree) is assumed.
- :allowed_modules (String.t): An array of modules (either numbers or strings; e.g. "tasks,calendar,contacts,mail") supported by requesting client. If missing, all available modules are considered.
- :language (String.t): Optional locale to use instead of the currently configured locale of the user.
- :error_on_duplicate_name (boolean()):
returns
Returns
on success {:error, Tesla.Env.t} on failure
get_visible_folders(connection, session, content_type, columns, opts \\ [])
@spec get_visible_folders( Tesla.Env.client(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, OpenXchangeClient.Model.FoldersVisibilityResponse.t()} | {:error, Tesla.Env.t()}
Gets all visible folders of a certain module.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- content_type (String.t): The desired content type (either numbers or strings; e.g. "tasks", "calendar", "contacts", "mail", "infostore").
- columns (String.t): A comma-separated list of columns to return, like "1,300". Each column is specified by a numeric column identifier, see Common folder data and Detailed folder data.
- opts (KeywordList): [optional] Optional parameters
- :tree (String.t): The identifier of the folder tree. If missing "0" (primary folder tree) is assumed.
- :language (String.t): Optional locale to use instead of the currently configured locale of the user.
returns
Returns
on success {:error, Tesla.Env.t} on failure
restore_folders(connection, session, opts \\ [])
@spec restore_folders(Tesla.Env.client(), String.t(), keyword()) :: {:ok, OpenXchangeClient.Model.FolderRestoreResponse.t()} | {:error, Tesla.Env.t()}
Restore specified folders from trash folder
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- opts (KeywordList): [optional] Optional parameters
- :tree (String.t): The identifier of the folder tree. If missing "0" (primary folder tree) is assumed.
- :push_token (String.t): The client's push token to restrict the generated drive event
returns
Returns
on success {:error, Tesla.Env.t} on failure
update_folder(connection, session, id, body, opts \\ [])
@spec update_folder( Tesla.Env.client(), String.t(), String.t(), OpenXchangeClient.Model.FolderBody.t(), keyword() ) :: {:ok, OpenXchangeClient.Model.FolderUpdateResponse.t()} | {:ok, OpenXchangeClient.Model.GetJobResponse.t()} | {:error, Tesla.Env.t()}
Updates a folder.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- id (String.t): Object ID of the updated folder.
- body (FolderBody): JSON object with "folder" object containing the modified fields and optional "notification" object to let added permission entities be notified about newly shared folders for all modules except mail. (Example: {"folder":{"title":"test123"}} or {"folder":{"permissions":[{"bits":403710016,"entity":84,"group":false}]},"notification":{"transport":"mail","message":"The message"}})
- opts (KeywordList): [optional] Optional parameters
- :allow_enqueue (boolean()): Optional flag that specifies whether the request is allowed for being submitted to job queue.
- :timestamp (integer()): Timestamp of the updated folder. If the folder was modified after the specified timestamp, then the update must fail.
- :tree (String.t): The identifier of the folder tree. If missing "0" (primary folder tree) is assumed.
- :allowed_modules (String.t): An array of modules (either numbers or strings; e.g. "tasks,calendar,contacts,mail") supported by requesting client. If missing, all available modules are considered.
- :cascade_permissions (boolean()):
true
to cascade permissions to all sub-folders. The user must have administrative permissions to all sub-folders subject to change. If one permission change fails, the entire operation fails. - :push_token (String.t): The client's push token to restrict the generated drive event
returns
Returns
on success {:error, Tesla.Env.t} on failure