Update Library
Updates the properties of a library. This is an incremental update to the library. Any field in the LibraryModel structure that is unset will not be modified.
This operation will only update the common properties for all library types. This will not, for example, update the LibraryModel.publish-info of a local library, nor the LibraryModel.subscription-info of a subscribed library. Specific properties are updated in LocalLibrary.update and SubscribedLibrary.update.
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.UpdateLibrary.
Request
URLURL
https://{api_host}/rest/com/vmware/content/library/id:{library_id}
Parameters
Parameters
string
library_id
Required
Identifier of the library to update.
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, acquired from Create Session API under CIS product
vmware-api-session-id Example
b00db39f948d13ea1e59b4d6fce56389
Request Body
Request Body
LibraryUpdateRequestBody of type application/json (required){
"update_spec": {
"creation_time": "string",
"description": "string",
"id": "string",
"last_modified_time": "string",
"last_sync_time": "string",
"name": "string",
"optimization_info": {
"optimize_remote_publishing": false
},
"publish_info": {
"authentication_method": "enum",
"current_password": "string",
"password": "string",
"persist_json_enabled": false,
"publish_url": "string",
"published": false,
"user_name": "string"
},
"server_guid": "string",
"storage_backings": [
{
"datastore_id": "string",
"storage_uri": "string",
"type": "enum"
}
],
"subscription_info": {
"authentication_method": "enum",
"automatic_sync_enabled": false,
"on_demand": false,
"password": "string",
"source_info": {
"source_library": "string",
"subscription": "string"
},
"ssl_thumbprint": "string",
"subscription_url": "string",
"user_name": "string"
},
"type": "enum",
"version": "string"
}
}
cURL Command
curl -X PATCH -H "vmware-api-session-id: b00db39f948d13ea1e59b4d6fce56389" -H "Content-Type: application/json" -d '{"update_spec":{"creation_time":"string","description":"string","id":"string","last_modified_time":"string","last_sync_time":"string","name":"string","optimization_info":{"optimize_remote_publishing":false},"publish_info":{"authentication_method":"enum","current_password":"string","password":"string","persist_json_enabled":false,"publish_url":"string","published":false,"user_name":"string"},"server_guid":"string","storage_backings":[{"datastore_id":"string","storage_uri":"string","type":"enum"}],"subscription_info":{"authentication_method":"enum","automatic_sync_enabled":false,"on_demand":false,"password":"string","source_info":{"source_library":"string","subscription":"string"},"ssl_thumbprint":"string","subscription_url":"string","user_name":"string"},"type":"enum","version":"string"}}' https://{api_host}/rest/com/vmware/content/library/id:{library_id}
Errors
400
com.vmware.vapi.std.errors.invalid_argument : if the updateSpec is not valid.
if the LibraryModel.version of updateSpec is not equal to the current version of the library.
404
com.vmware.vapi.std.errors.not_found : if the library associated with libraryId does not exist.
default
'Default' means this response is used for all HTTP codes that are not covered individually for this operation.