Update Item
Updates the specified properties of a library item. This is an incremental update to the library item. Fields that are unset in the update specification are left unchanged.
This operation cannot update a library item that is a member of a subscribed library. Those items must be updated in the source published library and synchronized to the subscribed library.
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.UpdateLibraryItem.
Request
URLURL
https://{api_host}/rest/com/vmware/content/library/item/id:{library_item_id}
Parameters
Parameters
string
library_item_id
Required
Identifier of the library item to update.
The parameter must be an identifier for the resource type: com.vmware.content.library.Item.
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
LibraryItemUpdateRequestBody of type application/json (required){
"update_spec": {
"cached": false,
"content_version": "string",
"creation_time": "string",
"description": "string",
"id": "string",
"last_modified_time": "string",
"last_sync_time": "string",
"library_id": "string",
"metadata_version": "string",
"name": "string",
"size": 0,
"source_id": "string",
"type": "string",
"version": "string"
}
}
cURL Command
curl -X PATCH -H "vmware-api-session-id: b00db39f948d13ea1e59b4d6fce56389" -H "Content-Type: application/json" -d '{"update_spec":{"cached":false,"content_version":"string","creation_time":"string","description":"string","id":"string","last_modified_time":"string","last_sync_time":"string","library_id":"string","metadata_version":"string","name":"string","size":0,"source_id":"string","type":"string","version":"string"}}' https://{api_host}/rest/com/vmware/content/library/item/id:{library_item_id}
Errors
400
com.vmware.vapi.std.errors.invalid_element_type : if the library item corresponding to libraryItemId is a member of a subscribed library. | com.vmware.vapi.std.errors.invalid_argument : if one of the following is true for the updateSpec:
- name is empty
- name exceeds 80 characters
- description exceeds 2000 characters
- version is not equal to the current version of the library item
404
com.vmware.vapi.std.errors.not_found : if the library item specified by libraryItemId does not exist.
409
com.vmware.vapi.std.errors.not_allowed_in_current_state : if the library item belongs to a published library with JSON persistence enabled (see PublishInfo.persist-json-enabled) and the content of the library item specified by libraryItemId has been deleted from the storage backings (see LibraryModel#storageBackings) associated with it. | com.vmware.vapi.std.errors.already_exists : if there is already a library item with same name in the library.
default
'Default' means this response is used for all HTTP codes that are not covered individually for this operation.
On This Page
Item Operations
get
post
patch
delete
get
post
post
post