content library item: publish
Publishes the library item to specified subscriptions of the library. If no subscriptions are specified, then publishes the library item to all subscriptions of the library. This operation was added in vSphere API 6.7.2.
Request:
HTTP request
POST https://{server}/rest/com/vmware/content/library/item/id:{library_item_id}?~action=publish
Path Parameters
Name | Type | Description |
---|---|---|
Required | ||
library_item_id | string | Library item identifier. |
Request Body Structure:
{
"force_sync_content" : true,
"subscriptions" : [
{
"subscription" : "obj-103"
},
{
"subscription" : "obj-103"
}
]
}
"force_sync_content" : true,
"subscriptions" : [
{
"subscription" : "obj-103"
},
{
"subscription" : "obj-103"
}
]
}
Request Body Parameters:
Name | Type | Description |
---|---|---|
bold = required | ||
force_sync_content | boolean | Whether to synchronize file content as well as metadata. This parameter applies only if the subscription is on-demand. |
subscriptions | destination_spec[] | Optional. The list of subscriptions to publish this library item to. |
subscriptions[].subscription | string | Identifier of the subscription associated with the subscribed library. This attribute was added in vSphere API 6.7.2. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.content.library.Subscriptions . When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.content.library.Subscriptions . |
Response:
HTTP Status Code: 200
NoneErrors:
HTTP Status Code | Type | Description |
---|---|---|
500 | error | If the system reports an error while responding to the request. |
404 | not_found | If the library item specified by library_item_id does not exist. |
400 | invalid_argument | If one or more arguments in subscriptions is not valid. |
400 | invalid_element_type | If the library item specified by library_item_id is a member of a subscribed library. |
400 | not_allowed_in_current_state | If the library item specified by library_item_id does not belong to a published library. |
401 | unauthenticated | If the user that requested the operation cannot be authenticated. |
403 | unauthorized | If the user that requested the operation is not authorized to perform the operation. |