REST API - check_in

vcenter vm template library items check outs: check in

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. This operation was added in vSphere API 6.9.1.

Request:

HTTP request

POST https://{server}/rest/vcenter/vm-template/library-items/{template_library_item}/check-outs/{vm}?action=check-in

Path Parameters

Name Type Description
Required
template_library_item string Identifier of the content library item in which the virtual machine is checked in.
vm string Identifier of the virtual machine to check into the library item.

Request Body Structure:

{
    "spec"{
        "message""string"
    }
}

Request Body Parameters:

Name Type Description
bold = required
spec check_in_spec Optional. Specification used to check in the virtual machine into the library item.
spec.message string Message describing the changes made to the virtual machine. This attribute was added in vSphere API 6.9.1.

Response:

HTTP Status Code: 200

Representation:

{
    "value""obj-103"
}

Response Type:

Name Type Description
bold = required
value string The new version of the library item.

Errors:

HTTP Status Code Type Description
400 invalid_argument if any of the specified parameters are invalid.
400 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.
404 not_found if the item specified by template_library_item does not exist.
500 resource_inaccessible if there is an error accessing a file from the virtual machine.
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.
500 error if the system reports an error while responding to the request.