HPE OneView

How to delete licence key with API

New Member

How to delete licence key with API

We just added our AKA licence to OneView and have problems with a couple of servers.

We get this message in OneView:


Delete the license key from the appliance using the license delete API (DELETE /rest/licenses/252). Verify iLO connectivity and refresh the server hardware to license it


So.. Where do i paste in the "DELETE /rest/licenses/252" ?


I have downloaded the powershell library and are looking at some samples, but none of them use codes similar to "DELETE /rest/licenses/252"


I have also found this page:


But still.. Where and how do I enter the code? 


Thanks for any help!

New Member

Re: How to delete licence key with API

Update: I got some help from a colleague and we downloaded "Request Maker" from Chrome Web Store.

We then sended a DELETE command like this:


DELETE https://SERVERURL/rest/licenses/252

And in the sourcecode after, we get this message:

{"errorCode":"DELETE_LICENSE_OPERATION_NOT_SUPPORTED","data":{},"details":"","errorSource":null,"nestedErrors":[],"recommendedActions":["Ensure the license resource is not in use."],"message":"Unable to delete the license resource as it is already in use."}

I have added a couple of screenshot showing the problem


Re: How to delete licence key with API

You cannot delete or remove a license that already has allocated members from the license pool.

There is a Remove-HPVLicense PowerShell CMDLET that could help you. If you wanted to use the PowerShell library and issue the API call as is, use "Send-HPOVRequest /rest/licenses/{id} delete" as your command.

The error response you see indicates one or more licenses have been allocated from the pool. The only way to resolve this is o contact HPE Support, and elevate to Level 2.

I am an HPE employee

Accept or Kudo

Occasional Contributor

Re: How to delete licence key with API

Hello everyone,


We had same errors appearing spontaneously on several servers and efuse seems to resolve the problem for us.