REST API - create
com.vmware.content.library.item.update_session
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:
- 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.