HPE OneView
cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete licence key with API

DefaultUser
Occasional Visitor

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:

http://h17007.www1.hp.com/docs/enterprise/servers/oneview1.2/cic-rest/en/content/s_license-delete-key-sdk-atlas.html

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

 

Thanks for any help!

2 REPLIES
DefaultUser
Occasional Visitor

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

ChrisLynchHPE
Neighborhood Moderator

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.