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.

create

POST /com/vmware/content/library/item/update-session
POST /com/vmware/content/library/item/update-session?~action=create

Creates a new update session. An update session is used to make modifications to a library item. Modifications are not visible to other clients unless the session is completed and all necessary files have been received.

Content Library Service allows only one single update session to be active for a specific library item.

Request:
Representations:
{
    "client_token""string",
    "create_spec"{
        "client_progress"10,
        "error_message"{
            "args"[
                "string",
                "string"
            ],
            "default_message""string",
            "id""string"
        },
        "expiration_time""2013-06-06T22:13:05",
        "id""obj-103",
        "library_item_content_version""string",
        "library_item_id""obj-103",
        "state""ACTIVE"
    }
}
<?xml version="1.0" ?>
<ns0:Create-Input xmlns:ns0="http://vmware.com/content/library/item/update_session" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <create_spec>
    <id>obj-103</id>
    <library_item_id>obj-103</library_item_id>
    <client_progress>10</client_progress>
    <error_message>
      <default_message>string</default_message>
      <id>string</id>
      <args-array>
        <array-item>string</array-item>
        <array-item>string</array-item>
      </args-array>
    </error_message>
    <state>ACTIVE</state>
    <expiration_time>2013-06-06T22:13:05</expiration_time>
    <library_item_content_version>string</library_item_content_version>
  </create_spec>
  <client_token>string</client_token>
</ns0:Create-Input>
POST /com/vmware/content/library/item/update-session
?create_spec.id=obj-103
&create_spec.library_item_id=obj-103
&create_spec.client_progress=10
&create_spec.error_message.default_message=string
&create_spec.error_message.id=string
&create_spec.error_message.args.1=string
&create_spec.error_message.args.2=string
&create_spec.state=ACTIVE
&create_spec.expiration_time=2013-06-06T22%3A13%3A05
&create_spec.library_item_content_version=string
&client_token=string

Parameters:
Name Type Required Description
client_token string No Unique token generated by the client for each creation request. The token should be a universally unique identifier (UUID), for example: b8a2a2e3-2314-43cd-a871-6ede0f429751. This token can be used to guarantee idempotent creation.
create_spec
 *
update_session_model Yes Specification for the new update session to be created.

Response:
Representations:
{
    "value""obj-103"
}
<?xml version="1.0" ?>
<ns0:Create-Result xmlns:ns0="http://vmware.com/content/library/item/update_session" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <value>obj-103</value>
</ns0:Create-Result>

Parameters:
Name Type Required Description
result ID Yes Identifier of the new update session being created. Id of type com.vmware.content.library.item.UpdateSession.

Errors:
Type Description HTTP Status Code
invalid_argument if the session specification is not valid. 400
invalid_element_type if the update session is being created on a subscribed library item. 400
not_found if the item targeted for update does not exist. 404
resource_busy if there is another update session on the same library item. 400

Copyright © 2014. All Rights Reserved.