Publish Local Library
If vSphere APIs begin with /rest (vs /api), any maps are consumed/returned instead as arrays of objects, each containing a key and a value property field.
Publishes the library to specified subscriptions. If no subscriptions are specified, then publishes the library to all its subscriptions. if you do not have all of the privileges described as follows: - The resource com.vmware.content.Library referenced by the parameter libraryId requires ContentLibrary.PublishLibrary.
Request
URLURL
https://{api_host}/rest/com/vmware/content/local-library/id:{library_id}?~action=publish
Parameters
Parameters
string
library_id
Required
Identifier of the published library.
The parameter must be an identifier for the resource type: com.vmware.content.Library.
Header Parameters
Header Parameters
string
vmware-api-session-id
Required
Required session ID, obtained by first calling Create Session API
Example: b00db39f948d13ea1e59b4d6fce56389
Request Body
Request Body
LocalLibraryPublishRequestBody of type application/json (required){
"subscriptions": [
{
"subscription": "string"
}
]
}
array of
LocalLibraryDestinationSpec
subscriptions
Optional
The list of subscriptions to publish this library to.
cURL Command
curl -X POST -H "vmware-api-session-id: b00db39f948d13ea1e59b4d6fce56389" -H "Content-Type: application/json" -d '{"subscriptions":[{"subscription":"string"}]}' https://{api_host}/rest/com/vmware/content/local-library/id:{library_id}?~action=publish
Errors
404
com.vmware.vapi.std.errors.error : If the system reports an error while responding to the request. | com.vmware.vapi.std.errors.not_found : If the library specified by libraryId does not exist.
409
com.vmware.vapi.std.errors.not_allowed_in_current_state : If the library specified by libraryId is not a published library.
400
com.vmware.vapi.std.errors.invalid_argument : If one or more subscriptions is not valid. | com.vmware.vapi.std.errors.invalid_element_type : If the library specified by libraryId is a subscribed library.
401
com.vmware.vapi.std.errors.unauthenticated : If the user that requested the operation cannot be authenticated. | com.vmware.vapi.std.errors.unauthorized : If the user that requested the operation is not authorized to perform the operation.
On This Page
Local Library Operations
post
patch
delete