VMware Cloud Community
Misofni
Contributor
Contributor

REST override or delete library item

Hi,

currently I'am testing around with the vSphere REST API in my evaluation trial.

I try to automatically create a template of an existing VM and then deploy a clone of this template on a weekly basis.

Creating this template and deploying is straight forward with the REST API. However, deleting an existing template, or at least overriding it, didn't work so far.

So the question is:

Is there a way of either override an existing template OR delete an exisitng template via the REST API?

I used the following REST calls:

For creating (POST): /vcenter/vm-template/library-items​

For deploy (POST): /vcenter/vm-template/library-items​/{item}?action=deploy

I would appreciate any support.

BR

0 Kudos
1 Reply
kirilk
VMware Employee
VMware Employee

It seems this is a library item you are dealing with.

why don't you try :

DELETE https://{server}/rest/com/vmware/content/library/item/id:{library_item_id}

See REST API - delete

0 Kudos