Check In Library Items Check Outs
Checks in a virtual machine into the library item. This operation updates the library item to contain the virtual machine being checked in as a template. This template becomes the latest version of the library item. The previous virtual machine template contained in the library item is available as a backup and its information can be queried using the Versions service. At most one previous version of a virtual machine template is retained in the library item. if you do not have all of the privileges described as follows: - Operation execution requires System.Read. - The resource com.vmware.content.library.Item referenced by the parameter templateLibraryItem requires ContentLibrary.CheckInTemplate. - The resource VirtualMachine referenced by the parameter vm requires System.Read.
Request
URLURL
Path Parameters
Path Parameters
Identifier of the content library item in which the virtual machine is checked in. The parameter must be an identifier for the resource type: com.vmware.content.library.Item.
Identifier of the virtual machine to check into the library item. The parameter must be an identifier for the resource type: VirtualMachine.
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
Specification used to check in the virtual machine into the library item. This parameter is currently required. In the future, if this parameter is unset, the system will apply suitable defaults.
{
"message": "string"
}
Message describing the changes made to the virtual machine.
Authentication
Response
Response BodyResponse Body
The new version of the library item. The result will be an identifier for the resource type: com.vmware.content.library.item.Version.
Errors
com.vmware.vapi.std.errors.invalid_argument : if any of the specified parameters are invalid. if the virtual machine identified by vm was not checked out of the item specified by templateLibraryItem. | com.vmware.vapi.std.errors.not_allowed_in_current_state : if the operation cannot be performed because of the virtual machine’s current state. For example, if the virtual machine is not powered off.
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.
com.vmware.vapi.std.errors.not_found : if the item specified by templateLibraryItem does not exist. if the virtual machine specified by vm does not exist.
com.vmware.vapi.std.errors.resource_inaccessible : if there is an error accessing a file from the virtual machine. | com.vmware.vapi.std.errors.error : if the system reports an error while responding to the request.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
cURL Command
Vendor Extensions
x-vmw-doc-deprecated-method: post
x-vmw-doc-deprecated-path: /rest/vcenter/vm-template/library-items/{template_library_item}/check-outs/{vm}?action=check-in
x-vmw-doc-operation: check_in