OpenXchangeClient.Api.Infostore (open_xchange_client v0.10.1)
API calls for all endpoints tagged Infostore
.
Link to this section Summary
Functions
Checks if a given file name is valid.
Copies an infoitem.
This request cannot change or add files. Therefore it is necessary to use the POST
method.
Copies an infoitem.
Copies an infoitem's data with the possibility to change the file. The normal request body must be placed as form-data using the content-type multipart/form-data
. The form field json
contains the infoitem's data while the file must be placed in a file field named file
(see also File uploads).
Creates an infoitem.
Creates a new infoitem. This request cannot add a file to the infoitem. Therefor it is necessary to use the POST
method.
Creates an infoitem.
Creates a new infoitem with a file. The normal request body must be placed as form-data using the content-type multipart/form-data
. The form field json
contains the infoitem's data while the file must be placed in a file field named file
(see also File uploads).
Deletes all versions of an infoitem leaving only the base object.
Deletes versions of an infoitem.
Deletes infoitems.
Gets all infoitems.
Gets all versions of an infoitem.
Gets multiple documents as a ZIP archive.
Gets a ZIP archive containing all ifoitems of a denoted folder.
It is possible to add a filename to the request's URI like /infostore/{filename}?action=zipfolder
. The filename may be added to the customary infostore path to suggest a filename to a Save-As dialog.
Gets an infoitem.
Gets an infoitem document.
It is possible to add a filename to the request's URI like /infostore/{filename}?action=document
. The filename may be added to the customary infostore path to suggest a filename to a Save-As dialog. If the file is an image file then it is possible to use the image transformation parameters.
Gets a list of infoitems.
Gets the new, modified and deleted infoitems.
Gets shared infoitems.
Saves an attachment in the infostore.
Locks an infoitem.
Moves one infoitem to another folder.
Moves one or more infoitems to another folder.
Notifies users or groups about a shared infoitem.
Restores info items from trash.
Search for infoitems.
Unlocks an infoitem.
Updates an infoitem.
Updates an infoitem's data. This request cannot change or add files. Therefore it is necessary to use the POST
method.
Updates an infoitem.
Updates an infoitem's data and file. The normal request body must be placed as form-data using the content-type multipart/form-data
. The form field json
contains the infoitem's data while the file must be placed in a file field named file
(see also File uploads).
Creates or updates an infoitem. Creates or updates an infoitem with a file.
Link to this section Functions
check_name(connection, session, name, opts \\ [])
@spec check_name(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, OpenXchangeClient.Model.CommonResponse.t()} | {:error, Tesla.Env.t()}
Checks if a given file name is valid.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- name (String.t): The file name to check.
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
copy_info_item(connection, session, id, body, opts \\ [])
@spec copy_info_item( Tesla.Env.client(), String.t(), String.t(), OpenXchangeClient.Model.InfoItemData.t(), keyword() ) :: {:ok, OpenXchangeClient.Model.InfoItemUpdateResponse.t()} | {:error, Tesla.Env.t()}
Copies an infoitem.
This request cannot change or add files. Therefore it is necessary to use the POST
method.
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 infoitem that shall be copied.
- body (InfoItemData): A JSON object containing the modified fields of the destination infoitem. The field
id
must not be present. - opts (KeywordList): [optional] Optional parameters
- :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
copy_info_item_advanced(connection, session, id, json, file, opts \\ [])
@spec copy_info_item_advanced( Tesla.Env.client(), String.t(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, String.t()} | {:error, Tesla.Env.t()}
Copies an infoitem.
Copies an infoitem's data with the possibility to change the file. The normal request body must be placed as form-data using the content-type multipart/form-data
. The form field json
contains the infoitem's data while the file must be placed in a file field named file
(see also File uploads).
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 infoitem that shall be copies.
- json (String.t): Represents the normal request body as JSON string containing the infoitem's data (See InfoItemData model of the getInfoItem request). Only modified fields must be specified but at least
{\"folder_id\":\"destination\"}
. - file (String.t): The metadata as per
<input type=\"file\" />
. - opts (KeywordList): [optional] Optional parameters
- :push_token (String.t): The push token of the drive client
returns
Returns
on success {:error, Tesla.Env.t} on failure
create_info_item(connection, session, id, timestamp, body, opts \\ [])
@spec create_info_item( Tesla.Env.client(), String.t(), String.t(), integer(), [OpenXchangeClient.Model.InfoItemBody.t()], keyword() ) :: {:ok, OpenXchangeClient.Model.InfoItemUpdateResponse.t()} | {:error, Tesla.Env.t()}
Creates an infoitem.
Creates a new infoitem. This request cannot add a file to the infoitem. Therefor it is necessary to use the POST
method.
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 infoitem that shall be updated.
- timestamp (integer()): Timestamp of the last update of the infoitem. If the infoitem was modified after the specified timestamp, then the update must fail.
- body ([OpenXchangeClient.Model.InfoItemBody.t]): A JSON object containing a field
file
with the modified fields of the infoitem's data. It is possible to let added object permission entities be notified about newly shared files. In that case add a "notification" object. - opts (KeywordList): [optional] Optional parameters
- :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_info_item_advanced(connection, session, json, file, opts \\ [])
@spec create_info_item_advanced( Tesla.Env.client(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, String.t()} | {:error, Tesla.Env.t()}
Creates an infoitem.
Creates a new infoitem with a file. The normal request body must be placed as form-data using the content-type multipart/form-data
. The form field json
contains the infoitem's data while the file must be placed in a file field named file
(see also File uploads).
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- json (String.t): Represents the normal request body as JSON string containing the infoitem's data (See InfoItemBody model of the newInfoItem request).
- file (String.t): The metadata as per
<input type=\"file\" />
. - opts (KeywordList): [optional] Optional parameters
- :try_add_version (boolean()): Add new file version if file name exists
- :push_token (String.t): The push token of the drive client
returns
Returns
on success {:error, Tesla.Env.t} on failure
delete_all_info_item_versions(connection, session, id, folder, timestamp, opts \\ [])
@spec delete_all_info_item_versions( Tesla.Env.client(), String.t(), String.t(), String.t(), integer(), keyword() ) :: {:ok, OpenXchangeClient.Model.CommonResponse.t()} | {:error, Tesla.Env.t()}
Deletes all versions of an infoitem leaving only the base object.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- id (String.t): The ID of the base object.
- folder (String.t): The folder ID of the base object.
- timestamp (integer()): Timestamp of the last update of the infoitem.
- opts (KeywordList): [optional] Optional parameters
- :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_info_item_versions(connection, session, id, folder, timestamp, body, opts \\ [])
@spec delete_info_item_versions( Tesla.Env.client(), String.t(), String.t(), String.t(), integer(), [Integer.t()], keyword() ) :: {:ok, OpenXchangeClient.Model.InfoItemDetachResponse.t()} | {:error, Tesla.Env.t()}
Deletes versions of an infoitem.
Note When the current version of a document is deleted the new current version will be the latest version.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- id (String.t): The ID of the base object.
- folder (String.t): The folder ID of the base object.
- timestamp (integer()): Timestamp of the last update of the infoitem.
- body ([integer()]): A JSON array of version numbers to detach.
- opts (KeywordList): [optional] Optional parameters
- :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_info_items(connection, session, timestamp, body, opts \\ [])
@spec delete_info_items( Tesla.Env.client(), String.t(), integer(), [OpenXchangeClient.Model.InfoItemListElement.t()], keyword() ) :: {:ok, OpenXchangeClient.Model.InfoItemsResponse.t()} | {:error, Tesla.Env.t()}
Deletes infoitems.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- timestamp (integer()): Timestamp of the last update of the infoitems to delete.
- body ([OpenXchangeClient.Model.InfoItemListElement.t]): A JSON array of objects with the fields
id
andfolder
representing infoitems that shall be deleted. - opts (KeywordList): [optional] Optional parameters
- :hard_delete (boolean()): Defaults to
false
. If set totrue
, the file is deleted permanently. Otherwise, and if the underlying storage supports a trash folder and the file is not yet located below the trash folder, it is moved to the trash folder. - :push_token (String.t): The client's push token to restrict the generated drive event
- :hard_delete (boolean()): Defaults to
returns
Returns
on success {:error, Tesla.Env.t} on failure
get_all_info_items(connection, session, folder, columns, opts \\ [])
@spec get_all_info_items( Tesla.Env.client(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, OpenXchangeClient.Model.InfoItemsResponse.t()} | {:error, Tesla.Env.t()}
Gets all infoitems.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- folder (String.t): Object ID of the folder who contains the infoitems.
- columns (String.t): A comma-separated list of columns to return, like "1,700". Each column is specified by a numeric column identifier, see Common object data and Detailed infoitem data.
- opts (KeywordList): [optional] Optional parameters
- :sort (String.t): The identifier of a column which determines the sort order of the response. If this parameter is specified, then the parameter order must be also specified.
- :order (String.t): "asc" if the response entities should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.
- :left_hand_limit (integer()): A positive integer number to specify the "left-hand" limit of the range to return.
- :right_hand_limit (integer()): A positive integer number to specify the "right-hand" limit of the range to return.
- :limit (integer()): A positive integer number to specify how many items shall be returned according to given sorting; overrides left_hand_limit/right_hand_limit parameters and is equal to left_hand_limit=0 and right_hand_limit=<limit>.
- :pregenerate_previews (boolean()): If set to "true" preview generation is triggered in the background for all files in request result
returns
Returns
on success {:error, Tesla.Env.t} on failure
get_all_versions(connection, session, id, columns, opts \\ [])
@spec get_all_versions( Tesla.Env.client(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, OpenXchangeClient.Model.InfoItemsResponse.t()} | {:error, Tesla.Env.t()}
Gets all versions of an infoitem.
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 infoitem whose versions are requested.
- columns (String.t): A comma-separated list of columns to return, like "1,700". Each column is specified by a numeric column identifier, see Common object data and Detailed infoitem data.
- opts (KeywordList): [optional] Optional parameters
- :sort (String.t): The identifier of a column which determines the sort order of the response. If this parameter is specified, then the parameter order must be also specified.
- :order (String.t): "asc" if the response entities should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.
- :pregenerate_previews (boolean()): If set to "true" preview generation is triggered in the background for all files in request result
returns
Returns
on success {:error, Tesla.Env.t} on failure
get_documents_as_zip(connection, session, body, opts \\ [])
@spec get_documents_as_zip( Tesla.Env.client(), String.t(), [OpenXchangeClient.Model.InfoItemZipElement.t()], keyword() ) :: {:ok, String.t()} | {:error, Tesla.Env.t()}
Gets multiple documents as a ZIP archive.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- body ([OpenXchangeClient.Model.InfoItemZipElement.t]): A JSON array of JSON objects with the id, folder and optionally the documents' versions to include in the requested ZIP archive (if missing, it refers to the latest/current version).
- opts (KeywordList): [optional] Optional parameters
- :scan (boolean()): Flag to request an Anti-Virus scan for the specified documents before downloading them.
returns
Returns
on success {:error, Tesla.Env.t} on failure
get_folder_as_zip(connection, session, folder, opts \\ [])
@spec get_folder_as_zip(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, String.t()} | {:error, Tesla.Env.t()}
Gets a ZIP archive containing all ifoitems of a denoted folder.
It is possible to add a filename to the request's URI like /infostore/{filename}?action=zipfolder
. The filename may be added to the customary infostore path to suggest a filename to a Save-As dialog.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- folder (String.t): Object ID of the folder who contains the infoitems.
- opts (KeywordList): [optional] Optional parameters
- :recursive (boolean()):
true
to also include subfolders and their infoitems respectively; otherwisefalse
to only consider the infoitems of specified. - :scan (boolean()): Flag to request an Anti-Virus scan for the ifoitems in the specified folder before downloading them.
- :recursive (boolean()):
returns
Returns
on success {:error, Tesla.Env.t} on failure
get_info_item(connection, session, id, folder, opts \\ [])
@spec get_info_item(Tesla.Env.client(), String.t(), String.t(), String.t(), keyword()) :: {:ok, OpenXchangeClient.Model.InfoItemResponse.t()} | {:error, Tesla.Env.t()}
Gets an infoitem.
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 infoitem.
- folder (String.t): Object ID of the folder who contains the infoitems.
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
get_info_item_document(connection, session, folder, id, opts \\ [])
@spec get_info_item_document( Tesla.Env.client(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, String.t()} | {:error, Tesla.Env.t()}
Gets an infoitem document.
It is possible to add a filename to the request's URI like /infostore/{filename}?action=document
. The filename may be added to the customary infostore path to suggest a filename to a Save-As dialog. If the file is an image file then it is possible to use the image transformation parameters.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- folder (String.t): Object ID of the folder who contains the infoitems.
- id (String.t): Object ID of the requested infoitem.
- opts (KeywordList): [optional] Optional parameters
- :version (integer()): If present the infoitem data describes the given version. Otherwise the current version is returned.
- :content_type (String.t): If present the response declares the given
content_type
in the Content-Type header. - :scan (boolean()): Flag to request an Anti-Virus scan for the specified document before downloading them.
- :format (String.t): Allows to set "metadata" as value to retrieve an image's metadata information (EXIF directory, etc.) as a JSON structure. If there are no metadata available (e.g. infoitem document is not an image) 404 Not Found is returned.
- :rotate (boolean()): Adds a 'rotate' transformation, leading to the image being rotated according to the contained EXIF information.
- :width (integer()): The maximum width of the target image.
- :height (integer()): The maximum height of the target image.
- :shrink_only (boolean()): Set to true to only scale images 'greater than' target size.
- :scale_type (String.t): Defines the scale type. Possible value: <ul> <li><code>cover</code> - The "cover" scale type, specifying the minimum target dimensions. <br> The source image will be resized in a way that the resulting image covers the target resolution entirely, with the original aspect ratio being preserved. For example, scaling an image with an original resolution of 640x480 pixels to 200x200 pixels and type "cover", will result in the picture being resized to 267x200 pixels.</li> <li><code>contain</code> - The "contain" scale type, specifying the maximum target dimensions. <br> The source image will be resized in a way that the resulting image fits into the target resolution entirely, with the original aspect ratio being preserved. For example, scaling an image with an original resolution of 640x480 pixels to 200x200 pixels and type "contain", will result in the picture being resized to 200x150 pixels.</li> <li><code>containforcedimension</code> - The "containforcedimension" scale type, specifying the maximum target dimensions. <br> The source image will be resized in a way that the resulting image fits into the target resolution entirely, with the original aspect ratio being preserved while smaller sides get padded to fit exact dimension. For example, scaling an image with an original resolution of 640x480 pixels to 200x200 pixels and type "containforcedimension", will result in the picture being first resized to 200x150 pixels, then height gets padded by 25 pixels per side resulting in exactly 200x200 pixels.</li> <li><code>coverandcrop</code> - The "coverandcrop" scale type, specifying the target dimensions. <br> If the source image is bigger than the target dimension, in a first step the image will be resized in a way that the resulting image covers the target resolution entirely, with the original aspect ratio being preserved. In a second step the image will be cropped to fit the target dimension. For example, scaling an image with an original resolution of 640x480 pixels to 200x200 pixels and type "coverandcrop", will result in the picture being resized to 267x200 pixels and then cropped to fit 200x200. In case the image is smaller than then target dimension the image will not be resized and instead it gets padded to fit exact dimension. For example, with an original resolution of 100x100 pixels and a target dimension of 200x200 pixels and type "coverandcrop", will result in the picture being padded on all sides with 50 pixels.</li> <li><code>auto</code> - The "auto" scale type.<br></li> </ul>
- :crop_width (integer()): The width of the specified rectangular region.
- :crop_height (integer()): The height of the specified rectangular region.
- :crop_x (integer()): The X coordinate of the upper-left corner of the specified rectangular region.
- :crop_y (integer()): The Y coordinate of the upper-left corner of the specified rectangular region.
returns
Returns
on success {:error, Tesla.Env.t} on failure
get_info_item_list(connection, session, columns, body, opts \\ [])
@spec get_info_item_list( Tesla.Env.client(), String.t(), String.t(), [OpenXchangeClient.Model.InfoItemListElement.t()], keyword() ) :: {:ok, OpenXchangeClient.Model.InfoItemsResponse.t()} | {:error, Tesla.Env.t()}
Gets a list of infoitems.
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,700". Each column is specified by a numeric column identifier, see Common object data and Detailed infoitem data.
- body ([OpenXchangeClient.Model.InfoItemListElement.t]): A JSON array of JSON objects with the id of the infoitems.
- opts (KeywordList): [optional] Optional parameters
- :pregenerate_previews (boolean()): If set to "true" preview generation is triggered in the background for all files in request result
returns
Returns
on success {:error, Tesla.Env.t} on failure
get_info_item_updates(connection, session, folder, columns, opts \\ [])
@spec get_info_item_updates( Tesla.Env.client(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, OpenXchangeClient.Model.InfoItemUpdatesResponse.t()} | {:error, Tesla.Env.t()}
Gets the new, modified and deleted infoitems.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- folder (String.t): Object ID of the folder who contains the infoitems.
- columns (String.t): A comma-separated list of columns to return, like "1,700". Each column is specified by a numeric column identifier, see Common object data and Detailed infoitem data.
- opts (KeywordList): [optional] Optional parameters
- :timestamp (integer()): Timestamp of the last update of the requested infoitems.
- :ignore (String.t): Which kinds of updates should be ignored. Currently, the only valid value – "deleted" – causes deleted object IDs not to be returned.
- :sort (String.t): The identifier of a column which determines the sort order of the response. If this parameter is specified, then the parameter order must be also specified.
- :order (String.t): "asc" if the response entities should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.
- :pregenerate_previews (boolean()): If set to "true" preview generation is triggered in the background for all files in request result
returns
Returns
on success {:error, Tesla.Env.t} on failure
import_attachment(connection, session, attached, folder, module, attachment, body, opts \\ [])
@spec import_attachment( Tesla.Env.client(), String.t(), integer(), integer(), integer(), String.t(), [OpenXchangeClient.Model.InfoItemBody.t()], keyword() ) :: {:ok, OpenXchangeClient.Model.InfoItemUpdateResponse.t()} | {:error, Tesla.Env.t()}
Saves an attachment in the infostore.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- attached (integer()): The ID of the object to which the attachment belongs.
- folder (integer()): The folder ID of the object.
- module (integer()): The module type of the object: 1 (appointment), 4 (task), 7 (contact), 137 (infostore).
- attachment (String.t): The ID of the attachment to save.
- body ([OpenXchangeClient.Model.InfoItemBody.t]): A JSON object describing the attachment's infoitem. The field
id
is not included. The fields in this infoitem object override values from the attachment. The folder_id must be given. It is possible to let added object permission entities be notified about newly shared files. In that case add a "notification" object. - opts (KeywordList): [optional] Optional parameters
- :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
lock_info_item(connection, session, id, opts \\ [])
@spec lock_info_item(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, OpenXchangeClient.Model.CommonResponse.t()} | {:error, Tesla.Env.t()}
Locks an infoitem.
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 infoitem that shall be locked.
- opts (KeywordList): [optional] Optional parameters
- :diff (integer()): If present the value is added to the current time on the server (both in ms). The document will be locked until that time. If this parameter is not present, the document will be locked for a duration as configured on the server.
returns
Returns
on success {:error, Tesla.Env.t} on failure
move_file(connection, session, timestamp, folder, id, opts \\ [])
@spec move_file( Tesla.Env.client(), String.t(), integer(), String.t(), String.t(), keyword() ) :: {:ok, OpenXchangeClient.Model.InfoItemsMovedResponse.t()} | {:error, Tesla.Env.t()}
Moves one infoitem to another folder.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- timestamp (integer()): Timestamp of the last update of the infoitem to move.
- folder (String.t): ID of the destination folder.
- id (String.t): Object ID of the infoitem that shall be moved.
- opts (KeywordList): [optional] Optional parameters
- :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
move_info_items(connection, session, folder, body, opts \\ [])
@spec move_info_items( Tesla.Env.client(), String.t(), String.t(), [OpenXchangeClient.Model.InfoItemListElement.t()], keyword() ) :: {:ok, OpenXchangeClient.Model.InfoItemsMovedResponse.t()} | {:error, Tesla.Env.t()}
Moves one or more infoitems to another folder.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- folder (String.t): ID of the destination folder.
- body ([OpenXchangeClient.Model.InfoItemListElement.t]): A JSON array of JSON objects each referencing to an existing infoitem that is supposed to be moved to the destination folder.
- opts (KeywordList): [optional] Optional parameters
- :push_token (String.t): The push token of the drive client
returns
Returns
on success {:error, Tesla.Env.t} on failure
restore_info_items_from_trash(connection, session, body, opts \\ [])
@spec restore_info_items_from_trash( Tesla.Env.client(), String.t(), [OpenXchangeClient.Model.InfoItemListElement.t()], keyword() ) :: {:ok, OpenXchangeClient.Model.InfoItemsRestoreResponse.t()} | {:error, Tesla.Env.t()}
Restores info items from trash.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- body ([OpenXchangeClient.Model.InfoItemListElement.t]): A JSON array of objects with the fields
id
andfolder
representing infoitems that shall be restored. - opts (KeywordList): [optional] Optional parameters
- :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
search_info_items(connection, session, columns, body, opts \\ [])
@spec search_info_items( Tesla.Env.client(), String.t(), String.t(), OpenXchangeClient.Model.InfoItemSearchBody.t(), keyword() ) :: {:ok, OpenXchangeClient.Model.InfoItemsResponse.t()} | {:error, Tesla.Env.t()}
Search for infoitems.
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,700". Each column is specified by a numeric column identifier, see Common object data and Detailed infoitem data.
- body (InfoItemSearchBody): A JSON object containing search parameters.
- opts (KeywordList): [optional] Optional parameters
- :folder (String.t): The folder ID to restrict the search to. If not specified, all folders are searched.
- :sort (String.t): The identifier of a column which determines the sort order of the response. If this parameter is specified , then the parameter order must be also specified.
- :order (String.t): "asc" if the response entires should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.
- :start (integer()): The start index (inclusive, zero-based) in the ordered search, that is requested.
- :end (integer()): The last index (inclusive) from the ordered search, that is requested.
- :include_subfolders (boolean()): If set to
true
and afolder
is specified, this folder and all of its subfolders are considered by the search. - :pregenerate_previews (boolean()): If set to "true" preview generation is triggered in the background for all files in request result
returns
Returns
on success {:error, Tesla.Env.t} on failure
unlock_info_item(connection, session, id, opts \\ [])
@spec unlock_info_item(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, OpenXchangeClient.Model.CommonResponse.t()} | {:error, Tesla.Env.t()}
Unlocks an infoitem.
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 infoitem that shall be unlocked.
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
update_info_item(connection, session, id, timestamp, body, opts \\ [])
@spec update_info_item( Tesla.Env.client(), String.t(), String.t(), integer(), OpenXchangeClient.Model.InfoItemBody.t(), keyword() ) :: {:ok, OpenXchangeClient.Model.InfoItemUpdateResponse.t()} | {:error, Tesla.Env.t()}
Updates an infoitem.
Updates an infoitem's data. This request cannot change or add files. Therefore it is necessary to use the POST
method.
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 infoitem that shall be updated.
- timestamp (integer()): Timestamp of the last update of the infoitem. If the infoitem was modified after the specified timestamp, then the update must fail.
- body (InfoItemBody): A JSON object containing a field
file
with the modified fields of the infoitem's data. It is possible to let added object permission entities be notified about newly shared files. In that case add a "notification" object. - opts (KeywordList): [optional] Optional parameters
- :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_info_item_advanced(connection, session, id, timestamp, json, file, opts \\ [])
@spec update_info_item_advanced( Tesla.Env.client(), String.t(), String.t(), integer(), String.t(), String.t(), keyword() ) :: {:ok, String.t()} | {:error, Tesla.Env.t()}
Updates an infoitem.
Updates an infoitem's data and file. The normal request body must be placed as form-data using the content-type multipart/form-data
. The form field json
contains the infoitem's data while the file must be placed in a file field named file
(see also File uploads).
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 infoitem that shall be updated.
- timestamp (integer()): Timestamp of the updated infoitem. If the infoitem was modified after the specified timestamp, then the update must fail.
- json (String.t): Represents the normal request body as JSON string containing the infoitem's data (See InfoItemBody model of the newInfoItem request). Only modified fields must be specified but at least \"{}\".
- file (String.t): The metadata as per
<input type=\"file\" />
. - opts (KeywordList): [optional] Optional parameters
- :offset (integer()): Optionally sets the start offset in bytes where to append the data to the document, must be equal to the actual document's length. Only available if the underlying File storage account supports the "RANDOM_FILE_ACCESS" capability.
- :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
upload_info_item(connection, session, folder_id, filename, binary, opts \\ [])
@spec upload_info_item( Tesla.Env.client(), String.t(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, OpenXchangeClient.Model.InfoItemUpdateResponse.t()} | {:error, Tesla.Env.t()}
Creates or updates an infoitem. Creates or updates an infoitem with a file.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- folder_id (String.t): The folder id.
- filename (String.t): The name of the file.
- binary (String.t): The binary file
- opts (KeywordList): [optional] Optional parameters
- :timestamp (integer()): Timestamp of the last update of the infoitem. If the infoitem was modified after the specified timestamp, then the update must fail. Note: This must only be set for updates of existing infoitems.
- :id (String.t): The id of the file in case of an update.
- :title (String.t): The title of the file.
- :file_mimetype (String.t): The mimetype of the file.
- :file_md5sum (String.t): The md5sum of the file.
- :description (String.t): The description of the file.
- :url (String.t): The url of the file.
- :version (String.t): The version of the file.
- :version_comment (String.t): The comment of the version.
- :categories (String.t): The a list of categories.
- :color_label (integer()): The color label identifier.
- :file_size (integer()): The size of the document in bytes.
- :try_add_version (boolean()): Add new file version if file name exists
- :ignore_warnings (boolean()): In case of an update indicates whether warnings should be ignored or not
- :offset (integer()): Optionally sets the start offset in bytes where to append the data to the document, must be equal to the actual document's length. Only available if the underlying File storage account supports the "RANDOM_FILE_ACCESS" capability. If set the id parameter must also be set to the id previously recieved from the first/starting request.
- :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