Content Library Item UpdateSession 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.
Returns an authorization error if you do not have all of the privileges described as follows:
- The resource
com.vmware.content.library.Item
referenced by the property Content Library Item UpdateSessionModel.library_item_id requiresContentLibrary.UpdateSession
.
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.
If not specified creation is not idempotent.
Specification for the new update session to be created.
{
"id": "string",
"library_item_id": "string",
"library_item_content_version": "string",
"error_message": {
"id": "string",
"default_message": "string",
"args": [
"string"
],
"params": {
"params": {
"s": "string",
"dt": "string",
"i": 0,
"d": "number",
"l": "Vapi Std NestedLocalizableMessage Object",
"format": "string",
"precision": 0
}
},
"localized": "string"
},
"client_progress": 0,
"state": "string",
"expiration_time": "string",
"preview_info": {
"state": "string",
"certificate_info": {
"issuer": "string",
"subject": "string",
"self_signed": false,
"x509": "string"
},
"warnings": [
{
"type": "string",
"message": {
"id": "string",
"default_message": "string",
"args": [
"string"
],
"params": {
"params": {
"s": "string",
"dt": "string",
"i": 0,
"d": "number",
"l": "Vapi Std NestedLocalizableMessage Object",
"format": "string",
"precision": 0
}
},
"localized": "string"
},
"ignored": false
}
],
"cert_chain": [
"string"
]
},
"warning_behavior": [
{
"type": "string",
"ignored": false
}
]
}
The identifier of this update session.
This property is not used for the create
operation. It will not be present in the response of the get
or list
operations. It is not used for the update
operation.
When clients pass a value of this schema as a parameter, the property must be an identifier for the resource type: com.vmware.content.library.item.UpdateSession
. When operations return a value of this schema as a response, the property will be an identifier for the resource type: com.vmware.content.library.item.UpdateSession
.
The identifier of the library item to which content will be uploaded or removed.
This property must be provided for the create
operation. It will always be present in the response of the get
or list
operations. It is not used for the update
operation.
When clients pass a value of this schema as a parameter, the property must be an identifier for the resource type: com.vmware.content.library.Item
. When operations return a value of this schema as a response, the property will be an identifier for the resource type: com.vmware.content.library.Item
.
The content version of the library item whose content is being modified. This value is the Content Library ItemModel.content_version at the time when the session is created for the library item.
This property is not used for the create
operation. It will always be present in the response of the get
or list
operations. It is not used for the update
operation.
If the session is in the Content Library Item UpdateSessionModel State.ERROR status this property will have more details about the error.
This property is not used for the create
operation. It is optional in the response of the get
or list
operations. It is not used for the update
operation.
The progress that has been made with the upload. This property is to be updated by the client during the upload process to indicate the progress of its work in completing the upload. The initial progress is 0 until updated by the client. The maximum value is 100, which indicates that the update is complete.
This property is not used for the create
operation. It will always be present in the response of the get
or list
operations. It is not used for the update
operation.
The current state (State) of the update session.
For more information see: Content Library Item UpdateSessionModel State.
This property was added in vSphere API 6.8.
This property is not used for the create
operation. It will always be present in the response of the get
or list
operations. It is not used for the update
operation.
Indicates the time after which the session will expire. The session is guaranteed not to expire earlier than this time.
This property is not used for the create
operation. It will always be present in the response of the get
or list
operations. It is not used for the update
operation.
A preview of the files currently being uploaded in the session. This property will be set only when the session is in the Content Library Item UpdateSessionModel State.ACTIVE.
This property was added in vSphere API 6.8.
This property is optional and it is only relevant when the value of state is Content Library Item UpdateSessionModel State.ACTIVE.
Indicates the update session behavior if warnings are raised in the session preview. Any warning which is raised by session preview but not ignored by the client will, by default, fail the update session.
This property was added in vSphere API 6.8.
This property is optional for the create
operation. It is optional in the response of the get
or list
operations. It is optional for the update
operation.
Identifier of the new update session being created.
The response will be an identifier for the resource type: com.vmware.content.library.item.UpdateSession
.
Vapi Std Errors InvalidArgument:
- if the session specification is not valid.
- if the clientToken does not conform to the UUID format.
Vapi Std Errors InvalidElementType if the update session is being created on a subscribed library item.
"Vapi Std Errors Error Object"
Stack of one or more localizable messages for human error consumers.
The message at the top of the stack (first in the list) describes the error from the perspective of the operation the client invoked.
Each subsequent message in the stack describes the "cause" of the prior message.
Data to facilitate clients responding to the operation reporting a standard error to indicating that it was unable to complete successfully.
Operations may provide data that clients can use when responding to errors. Since the data that clients need may be specific to the context of the operation reporting the error, different operations that report the same error may provide different data in the error. The documentation for each each operation will describe what, if any, data it provides for each error it reports.
The Vapi Std Errors ArgumentLocations, Vapi Std Errors FileLocations, and Vapi Std Errors TransientIndication schemas are intended as possible values for this property. Vapi Std DynamicID may also be useful as a value for this property (although that is not its primary purpose). Some resources may provide their own specific schemas for use as the value of this property when reporting errors from their operations.
Some operations will not set this property when reporting errors.
Discriminator field to help API consumers identify the structure type.
For more information see: Vapi Std Errors Error Type.
This property was added in vSphere API 6.7.2.
Can be missing or null
for compatibility with preceding implementations.
if the item targeted for update does not exist.
"Vapi Std Errors NotFound Object"
if there is another update session on the same library item.
"Vapi Std Errors ResourceBusy Object"
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}' https://{api_host}/api/content/library/item/update-session