com.vmware.content.library.item.update_session

The update_session service manipulates sessions that are used to upload content into the Content Library Service, and/or to remove files from a library item.

An update session is a resource which tracks changes to content. An update session is created with a set of files that are intended to be uploaded to a specific com.vmware.content.library.item_model, or removed from an item. The session object can be used to track the uploads and inspect the changes that are being made to the item by that upload. It can also serve as a channel to check on the result of the upload, and status messages such as errors and warnings for the upload.

Modifications are not visible to other clients unless the session is completed and all necessary files have been received.

The management of the files within the session is done through the com.vmware.content.library.item.updatesession.file service.

keep_alive

POST /com/vmware/content/library/item/update-session/id:{update_session_id}?~action=keep-alive
POST /com/vmware/content/library/item/update-session?~action=keep-alive

Keeps an update session alive.

If there is no activity for an update session after a period of time, the update session will expire, then be deleted. The update session expiration timeout is configurable in the Content Library Service system configuration. The default is five minutes. Invoking this operation enables a client to specifically extend the lifetime of the update session.

Request:
Representations:
{
    "client_progress"10,
    "update_session_id""obj-103"
}
<?xml version="1.0" ?>
<ns0:KeepAlive-Input xmlns:ns0="http://vmware.com/content/library/item/update_session" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <client_progress>10</client_progress>
  <update_session_id>obj-103</update_session_id>
</ns0:KeepAlive-Input>
POST /com/vmware/content/library/item/update-session?~action=keep-alive
&client_progress=10
&update_session_id=obj-103

Parameters:
Name Type Required Description
update_session_id
 *
ID Yes Identifier of the update session whose lifetime should be extended. Id of type com.vmware.content.library.item.UpdateSession.
client_progress long No Optional update to the progress property of the session. If specified, the new progress should be greater then the current progress. See com.vmware.content.library.item.update_session_model.client_progress.

Response:
Representations:

Parameters:
Name Type Required Description
result VOID Yes

Errors:
Type Description HTTP Status Code
not_found if no update session with the given identifier exists. 404
not_allowed_in_current_state if the update session is not in the ACTIVE state. 400

Copyright © 2014. All Rights Reserved.