- Community Home
- >
- Software
- >
- HPE OneView
- >
- HPE OneView - Remove Server via API (with force)
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2020 06:03 AM
11-12-2020 06:03 AM
Hello Guys,
I'm trying to remove servers from an HPE OneView Instance via rest API with a forced command.
Cannot find any documentation about it as the reference guide has still not been updated for the DELETE Command as already discussed here: https://community.hpe.com/t5/hpe-oneview/delete-server-hard-via-rest-api/td-p/7044396#.X61AWpNKhTZ
Long story short:
How can we delete servers from HPE OneView via Rest API with force: true?
curl --insecure \
--header "auth: TOKEN" \
--data '{"force":true}' \
--request DELETE https://INSTANCE/rest/server-hardware/ID
doesn't work.
Thanks for your help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2020 10:12 AM
11-12-2020 10:12 AM
SolutionThe force option is a query parameter, so specify it via the URL (https://INSTANCE/rest/server-hardware/ID?force=true).
The DELETE server-hardware API for some reason wasn't documented until the 5.10 release of OneView. And is only documented for the VM version of OneView (not Synergy where it is not allowed).
Hope that helps,
--Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2020 01:38 PM - edited 11-12-2020 01:42 PM
11-12-2020 01:38 PM - edited 11-12-2020 01:42 PM
Re: HPE OneView - Remove Server via API (with force)
To add to @DaveArko , this API call is not supported with BladeSystem or Synergy. To remove a BL or SY server/compute from the enclosure/frame, you need to physically remove it.
As for the API documentation, it was added to the 5.30 and newer API docs. The same API call can be used for any OneView API version, as that API call has not changed since X-API-Version 1.
- HPE OneView 5.30 REST API Reference server-hardware
- HPE OneView 5.40 REST API Reference server-hardware
- HPE OneView 5.50 REST API Reference server-hardware
It is documented as DELETE /rest/server-hardware/{id}.
I am an HPE employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2020 11:21 PM
11-12-2020 11:21 PM
Re: HPE OneView - Remove Server via API (with force)
Thank you Dave & Chris!
That has solved it.