Developer

 View Only
  • 1.  Deleting devices from GreenLake workspace using API

    Posted 8 days ago

    Hello,

    We may have a situation where we need to delete a lot of devices in one of our GreenLake workspaces and re-add them to another workspace (I say 'may' because with any luck it won't be necessary). But I am investigating how we could do this via API.

    Is archiving a device the same as deleting it? If I archive a device in one workspace can I then add it to a different workspace?

    I have got as far as being able to add/remove an application & region, or a subscription via the device update API, which is a good start. I assume I would need to remove app and subscription before I would be able to delete a device (if I can in fact delete a device).

    I see that it is possible to add devices manually via the GUI, in bulk, which may be useful. But I can't see a way to bulk delete, add/remove subs/apps etc on the GUI by supplying a CSV or similar.

    Any help much appreciated.

    Guy



    -------------------------------------------


  • 2.  RE: Deleting devices from GreenLake workspace using API
    Best Answer

    Posted 8 days ago

    You should not delete the device, just unsubscribe it.

    Unsubscribed devices can be claimed in different GreenLake accounts. The GreenLake API documentation is here.



    ------------------------------
    Herman Robers
    ------------------------
    If you have urgent issues, always contact your HPE Aruba Networking partner, distributor, or Aruba TAC Support. Check https://www.arubanetworks.com/support-services/contact-support/ for how to contact HPE Aruba Networking TAC. Any opinions expressed here are solely my own and not necessarily that of Hewlett Packard Enterprise or HPE Aruba Networking.

    In case your problem is solved, please invest the time to post a follow-up with the information on how you solved it. Others can benefit from that.
    ------------------------------



  • 3.  RE: Deleting devices from GreenLake workspace using API

    Posted 4 days ago

    Thank you Herman,

    When I look at a device in our workspace (note we do not add our devices to GL, our supplier does) there is a tenantWorkspaceId field but that is blank for all of our devices. I'm just curious about what that is? Do I need to give that any thought? Or should it remain blank and I just add the devices to the new workspace using API Add Devices endpoint once the app and sub have been removed (if so do I need to archive it first)? There is also a field called 'dedicatedPlatformWorkspace' - same question, do I need to worry about that, or just leave it blank?

    Thanks for the API link, I have a script now for removing the subscription and application from devices.

    Guy

    -------------------------------------------



  • 4.  RE: Deleting devices from GreenLake workspace using API

    Posted 2 days ago

    I don't know for sure, and the device registration is generic in GreenLake so it may be attributes used for other products like compute or storage; or it may be there for future use.

    If I would need to guess, the tenantWorkspaceId may be something for MSP accounts, where a managed services provider adds the devices and assign them to one of their customers' workspace. But if you see them empty at the moment, I would leave them empty or even try to leave the attribute out when you run your API calls.



    ------------------------------
    Herman Robers
    ------------------------
    If you have urgent issues, always contact your HPE Aruba Networking partner, distributor, or Aruba TAC Support. Check https://www.arubanetworks.com/support-services/contact-support/ for how to contact HPE Aruba Networking TAC. Any opinions expressed here are solely my own and not necessarily that of Hewlett Packard Enterprise or HPE Aruba Networking.

    In case your problem is solved, please invest the time to post a follow-up with the information on how you solved it. Others can benefit from that.
    ------------------------------