Sync Subscribed Item
Forces the synchronization of an individual library item in a subscribed library. Synchronizing an individual item will update that item’s metadata from the remote source. If the source library item on the remote library has been deleted, this operation will delete the library item from the subscribed library as well.
The default behavior of the synchronization is determined by the SubscriptionInfo of the library which owns the library item.
- If SubscriptionInfo.on-demand is true, then the file content is not synchronized by default. In this case, only the library item metadata is synchronized. The file content may still be forcefully synchronized by passing true for the forceSyncContent parameter.
- If SubscriptionInfo.on-demand is false, then this call will always synchronize the file content. The forceSyncContent parameter is ignored when the subscription is not on-demand. When the file content has been synchronized, the ItemModel.cached field will be true. This operation will return immediately and create an asynchronous task to perform the synchronization.
if you do not have all of the privileges described as follows: - The resource com.vmware.content.library.Item referenced by the parameter libraryItemId requires ContentLibrary.SyncLibraryItem.
Request
URLURL
Path Parameters
Path Parameters
Identifier of the library item to synchronize. The parameter must be an identifier for the resource type: com.vmware.content.library.Item.
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
This is a request body class for an operation.
{
"force_sync_content": false
}
Whether to synchronize file content as well as metadata. This parameter applies only if the subscription is on-demand.
Whether to synchronize optional files. This parameter applies to both types of subscriptions on-demand as well as sync-immediately. This parameter is optional because it was added in a newer version than its parent node.
Authentication
Errors
Errors
com.vmware.vapi.std.errors.invalid_element_type : if the library item specified by libraryItemId is not a member of a subscribed library. | com.vmware.vapi.std.errors.not_allowed_in_current_state : if the content of the library item specified by libraryItemId has been deleted from the storage backings (see LibraryModel#storageBackings) associated with it. For instance, this {@term error) is reported on synchronizing a library item in a subscribed library that was restored from backup, and the library item was deleted after backup, thus resulting in its content being deleted from the associated storage backings. In this scenario, the metadata of the library item is present on a restore, while its content has been deleted.
com.vmware.vapi.std.errors.not_found : if the library item specified by libraryItemId could not be found.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
PowerCLI Client SDK All Parameters Example
cURL Command
Vendor Extensions
x-vmw-doc-deprecated-method: post
x-vmw-doc-deprecated-path: /rest/com/vmware/content/library/subscribed-item/id:{library_item_id}?~action=sync
x-vmw-doc-operation: sync