Header Shadow Image


Decomission or Recomission a host using Cloudera 6.X API Calls: /api/v3/cm/commands/hostsOfflineOrDecommission

Need to decomission a host?  Just call this:

curl -u admin:pAsS –insecure -X POST –header 'Content-Type: application/json' –header 'Accept: application/json' -d '{"items":[“cm-r01wn02.mws.mds.xyz”]}'    'https://cm-c01.mws.mds.xyz:7183/api/v3/cm/commands/hostsOfflineOrDecommission'
{
  "id" : 17256,
  "name" : "HostsDecommission",
  "startTime" : "2021-01-05T02:49:37.220Z",
  "active" : true,
  "children" : {
    "items" : [ ]
  }

Need to recomission a host?  Just call this:

curl -u admin:pAsS –insecure -X POST –header 'Content-Type: application/json' –header 'Accept: application/json' -d '{"items":[“cm-r01wn02.mws.mds.xyz”]}'    'https://cm-c01.mws.mds.xyz:7183/api/v33/cm/commands/hostsRecomission'

How this maps to the ApiHostNameLlst specification: https://archive.cloudera.com/cm6/6.2.0/generic/jar/cm_api/apidocs/json_ApiHostNameList.html

Cheers,

REF: https://archive.cloudera.com/cm6/6.3.0/generic/jar/cm_api/swagger-html-sdk-docs/java/docs/ClouderaManagerResourceApi.html#hostsDecommissionCommand
REF: https://cm-c01.mws.mds.xyz:7183/static/apidocs/ui/index.html#!/ClouderaManagerResource/hostsDecommissionCommand
 

Leave a Reply

You must be logged in to post a comment.


     
  Copyright © 2003 - 2013 Tom Kacperski (microdevsys.com). All rights reserved.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License