ClustersResource Resource

The root of the Cloudera API (v5). Provides access to all sub-resources available in version 5 of the API.

GET /clusters

Lists all known clusters.

Request Parameters
name type description default
view query summary
Response Body
media type data type description
application/json ApiClusterList (JSON) List of known clusters.

GET /clusters

List all known clusters.

Request Parameters
name type description default
clusterType query Type of cluster, either "any", "base", "compute" or "experience". Default is "base". base
view query The view of the data to materialize, either "summary" or "full". summary
Response Body
media type data type description
application/json ApiClusterList (JSON) List of clusters.

POST /clusters

Creates a collection of clusters.

Request Body
media type data type description
application/json ApiClusterList (JSON) List of clusters to created.
Response Body
media type data type description
application/json ApiClusterList (JSON) List of created clusters.

DELETE /clusters/{clusterName}

Deletes a cluster.

Request Parameters
name type description default
clusterName path Name of cluster to delete. n/a
Response Body
media type data type description
application/json ApiCluster (JSON) Details of deleted cluster.

GET /clusters/{clusterName}

Reads information about a cluster.

Request Parameters
name type description default
clusterName path Name of cluster to look up. n/a
Response Body
media type data type description
application/json ApiCluster (JSON) Details of requested cluster.

PUT /clusters/{clusterName}

Update an existing cluster.

To update the CDH version, provide the new value in the "fullVersion" property. Setting a correct version that matches the actual installed software will ensure the correct version-specific features, such as services, roles, commands, and configurations. This need not be manually set for clusters using parcels. In general this action is only necessary after the CDH packages have been manually updated. Note that a downgrade may be rejected if it would render existing services or roles unusable. For major upgrade, the "upgradeService" cluster command should be used instead.

To rename the cluster, provide the new name in the "displayName" property for API >= 6, or in the "name" property for API <=5.

Available since API v2.

Request Parameters
name type description default
clusterName path The name of the cluster. n/a
Request Body
media type data type
application/json ApiCluster (JSON)
Response Body
media type data type description
application/json ApiCluster (JSON) Details of the affected cluster.

PUT /clusters/{clusterName}/autoAssignRoles

Automatically assign roles to hosts and create the roles for all the services in a cluster.

Assignments are done based on services and hosts in the cluster, and hardware specifications. If no hosts are added to the cluster, an exception will be thrown preventing any role assignments. Existing roles will be taken into account and their assignments will be not be modified.

Available since API v6.

Request Parameters
name type description default
clusterName path The name of the cluster. n/a

PUT /clusters/{clusterName}/autoConfigure

Automatically configures roles and services in a cluster.

Overwrites some existing configurations. Might create new role config groups. Only default role config groups must exist before calling this endpoint. Other role config groups must not exist. If they do, an exception will be thrown preventing any configuration. Ignores the Cloudera Management Service even if colocated with roles of this cluster. To avoid over-committing the heap on hosts, assign hosts to this cluster that are not being used by the Cloudera Management Service.

Available since API v6.

Request Parameters
name type description default
clusterName path The name of the cluster. n/a

GET /clusters/{clusterName}/clientConfig

Download a zip-compressed archive of the client configuration, of a specific cluster. Currently, this only includes Kerberos Client Configuration (krb5.conf). For client configuration of services, use the clientConfig endpoint of the services resource. This resource does not require any authentication.

Request Parameters
name type description default
clusterName path The cluster name. n/a
Response Body
media type data type description
application/octet-stream object The archive data.

GET /clusters/{clusterName}/commands

List active cluster commands.

Request Parameters
name type description default
clusterName path The name of the cluster. n/a
view query The view of the data to materialize, either "summary" or "full". summary
Response Body
media type data type description
application/json ApiCommandList (JSON) A list of active cluster commands.

GET /clusters/{clusterName}/dfsServices

List the services that can provide distributed file system (DFS) capabilities in this cluster.

Request Parameters
name type description default
clusterName path cluster name n/a
view query data view required for matching services summary
Response Body
media type data type description
application/json ApiServiceList (JSON) Services that provide DFS capabilities in this cluster

GET /clusters/{clusterName}/export

Export the cluster template for the given cluster. If cluster does not have host templates defined it will export host templates based on roles assignment.

Request Parameters
name type description default
clusterName path cluster name n/a
exportAutoConfig query export configs set by the auto configuration false
Response Body
media type data type description
application/json ApiClusterTemplate (JSON) Cluster template

POST /clusters/{clusterName}/getOzoneS3GatewayInfo

Returns the REST url for the Ozone S3 Gateway, as well as the AWS credentials needed to access the S3 endpoint. Additionally, creates a bucket with the specified name under the volume s3v. If no Ozone is present, or Ozone is not running, returns success with an empty response. Currently, we get the credentials for the Hive kerberos principal, and give ownership of the created bucket to the same. This is likely not a permanent solution. If the cluster is not kerberizied, we return dummy credentials. Requires CDH 7.2.1+ or CDH 7.1.3+

Request Parameters
name type description default
clusterName path The name of the cluster n/a
bucketName query the name of the bucket to create n/a
Response Body
media type data type description
application/json ApiOzoneS3GatewayInfo (JSON) The REST url and AWS credentials for S3 Gateway

DELETE /clusters/{clusterName}/hosts

Request Parameters
name type description default
clusterName path n/a
Response Body
media type data type description
application/json ApiHostRefList (JSON) all the hosts that were unassociated with the cluster

GET /clusters/{clusterName}/hosts

Request Parameters
name type description default
clusterName path n/a
Response Body
media type data type description
application/json ApiHostRefList (JSON) the hosts associated with the cluster

GET /clusters/{clusterName}/hosts

Returns the hosts associated with the cluster filtered by optional host configuration parameter, if specified.

Request Parameters
name type description default
clusterName path n/a
configName query Optional host config name to filter hosts by. Available from v40. n/a
configValue query host config value associated with config name. Available from v40. n/a
Response Body
media type data type description
application/json ApiHostRefList (JSON) list of host references

GET /clusters/{clusterName}/hosts

Returns hosts in the system filtered by optional host configuration parameters, if specified.

Request Parameters
name type description default
clusterName path Name of the cluster n/a
configName query optional host config name to filter hosts by. Available from v40. n/a
configValue query host config value associated with config name. Available from v40. n/a
view query The view to materialize summary
Response Body
media type data type description
application/json ApiHostList (JSON) A list of hosts in requested cluster

POST /clusters/{clusterName}/hosts

Request Parameters
name type description default
clusterName path n/a
Request Body
media type data type
application/json ApiHostRefList (JSON)
Response Body
media type data type description
application/json ApiHostRefList (JSON) the newly added hosts to the cluster. if a host is already a member, it will be excluded from the list

GET /clusters/{clusterName}/isTlsEnabled

Returns whether a cluster has any TLS settings enabled. This only checks settings that would have been enabled by Auto-TLS.

Request Parameters
name type description default
clusterName path The name of the cluster n/a
Response Body
media type data type description
application/json boolean (JSON) true if it has any TLS settings enabled

GET /clusters/{clusterName}/kerberosInfo

Provides Cluster Kerberos information

Request Parameters
name type description default
clusterName path The cluster name. n/a
Response Body
media type data type description
application/json ApiKerberosInfo (JSON) Cluster Kerberos information

GET /clusters/{clusterName}/serviceTypes

List the supported service types for a cluster.

Request Parameters
name type description default
clusterName path The cluster. n/a
Response Body
media type data type description
application/json ApiServiceTypeList (JSON) List of service types the cluster supports.

DELETE /clusters/{clusterName}/tags

Remove the tags associated with the cluster. Tag names beginning with the prefix _cldr_ (case insensitive) are reserved for internal use by Cloudera.

Request Parameters
name type description default
clusterName path Name of the cluster to remove tags from n/a
Request Body
media type data type
application/json array of ApiEntityTag (JSON)
Response Body
media type data type description
application/json array of ApiEntityTag (JSON) A list of tags that were removed from the cluster

GET /clusters/{clusterName}/tags

Returns the tags associated with this cluster. Tag names beginning with the prefix _cldr_ (case insensitive) are reserved for internal use by Cloudera.

Request Parameters
name type description default
clusterName path The name of the cluster n/a
limit query Number of tags 10
offset query Index of the first tag to retrieve 0
Response Body
media type data type description
application/json array of ApiEntityTag (JSON) A list of tags associated with the cluster

PUT /clusters/{clusterName}/tags

Attach tags to the cluster. Tag names beginning with the prefix _cldr_ (case insensitive) are reserved for internal use by Cloudera.

Request Parameters
name type description default
clusterName path Name of the cluster n/a
Request Body
media type data type description
application/json array of ApiEntityTag (JSON) list of tags to add
Response Body
media type data type description
application/json array of ApiEntityTag (JSON)

GET /clusters/{clusterName}/upgradeDomains

Returns the Upgrade Domains associated with the cluster and the host names that belong to each Upgrade Domain. Hosts without an Upgrade Domain set will default to using the rack assignment of the host.

Request Parameters
name type description default
clusterName path The name of the cluster. n/a
Response Body
media type data type description
application/json ApiHdfsUpgradeDomainList (JSON) A list of upgrade domains and the corresponding host names.

GET /clusters/{clusterName}/utilization

Provides the resource utilization of the entire cluster as well as the resource utilization per tenant. Only available with Cloudera Manager Enterprise Edition.

Request Parameters
name type description default
clusterName path cluster name n/a
daysOfWeek query The days of the week for which the user wants to report utilization. Days is a list of number between 1 to 7, where 1 corresponds to Monday, and 7 corrensponds to Sunday. All 7 days are included if this is not specified. n/a
endHourOfDay query The end hour of a day for which the user wants to report utilization. The hour is a number between [0-23]. Default value is 23 if this is not specified. 23
from query Start of the time range to report utilization in ISO 8601 format. n/a
startHourOfDay query The start hour of a day for which the user wants to report utilization. The hour is a number between [0-23]. Default value is 0 if this is not specified. 0
tenantType query The type of the tenant (POOL or USER). POOL
to query End of the the time range to report utilization in ISO 8601 format (defaults to now). now
Response Body
media type data type description
application/json ApiClusterUtilization (JSON) Cluster utilization report resource handler.

POST /clusters/{clusterName}/commands/configureAutoTlsServices

Configures all services in a cluster to use Auto-TLS

Request Parameters
name type description default
clusterName path The name of the cluster. n/a
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.

POST /clusters/{clusterName}/commands/configureForKerberos

Command to configure the cluster to use Kerberos for authentication. This command will configure all relevant services on a cluster for Kerberos usage. This command will trigger a GenerateCredentials command to create Kerberos keytabs for all roles in the cluster.

Request Parameters
name type description default
clusterName path The name of the cluster. n/a
Request Body
media type data type description
application/json ApiConfigureForKerberosArguments (JSON) Arguments for the configure for kerberos command.
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.

POST /clusters/{clusterName}/commands/deleteCredentials

Delete existing Kerberos credentials for the cluster.

This command will affect all services that have been configured to use Kerberos, and have existing credentials.

Request Parameters
name type description default
clusterName path cluster name n/a
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.

POST /clusters/{clusterName}/commands/deployClientConfig

Deploy the cluster-wide client configuration.

For each service in the cluster, deploy the service's client configuration to all the hosts that the service runs on.

Available since API v2.

Request Parameters
name type description default
clusterName path The name of the cluster n/a
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.

POST /clusters/{clusterName}/commands/deployClientConfigsAndRefresh

Performs a command with the 2 steps - deploy cc - cluster refresh This orchestration is needed for the staleness wizard, so it can invoke a single command at wizard finish.

Request Parameters
name type description default
clusterName path The name of the cluster. n/a
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.

POST /clusters/{clusterName}/commands/deployClusterClientConfig

Deploy the Cluster's Kerberos client configuration.

Deploy krb5.conf to hosts in a cluster. Does not deploy to decommissioned hosts or hosts with active processes.

Available since API v7.

Request Parameters
name type description default
clusterName path The name of the cluster n/a
Request Body
media type data type description
application/json ApiHostRefList (JSON) Hosts in cluster to deploy to. If empty, will target all eligible hosts in the cluster.
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.

POST /clusters/{clusterName}/commands/disableTls

Disables TLS settings on a cluster.

Request Parameters
name type description default
clusterName path The name of the cluster n/a
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.

POST /clusters/{clusterName}/commands/enterMaintenanceMode

Put the cluster into maintenance mode. This is a synchronous command. The result is known immediately upon return.

Available since API v2.

Request Parameters
name type description default
clusterName path The name of the cluster n/a
Response Body
media type data type description
application/json ApiCommand (JSON) Synchronous command result.

POST /clusters/{clusterName}/commands/exitMaintenanceMode

Take the cluster out of maintenance mode. This is a synchronous command. The result is known immediately upon return.

Available since API v2.

Request Parameters
name type description default
clusterName path The name of the cluster n/a
Response Body
media type data type description
application/json ApiCommand (JSON) Synchronous command result.

POST /clusters/{clusterName}/commands/expireLogs

Remove backup and disaster related log files in hdfs.

Available since API v31.

Request Parameters
name type description default
clusterName path The name of the cluster n/a
days query logs more than these many days old are purged. -2 to use the existing setting n/a
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.

POST /clusters/{clusterName}/commands/firstRun

Prepare and start services in a cluster.

Perform all the steps needed to prepare each service in a cluster and start the services in order.

Available since API v7.

Request Parameters
name type description default
clusterName path The name of the cluster. n/a
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.

POST /clusters/{clusterName}/commands/inspectHosts

Runs the host inspector on the configured hosts in the specified cluster. Available since V8.

Request Parameters
name type description default
clusterName path The name of the cluster n/a
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.

POST /clusters/{clusterName}/commands/perfInspector

Run cluster performance diagnostics test.

Request Parameters
name type description default
clusterName path The name of the cluster. n/a
Request Body
media type data type description
application/json ApiClusterPerfInspectorArgs (JSON) Optional arguments for the command. See ApiClusterPerfInspectorArgs.
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.

POST /clusters/{clusterName}/commands/poolsRefresh

Updates all refreshable configuration files for services with Dynamic Resource Pools.

Available since API v6.

Request Parameters
name type description default
clusterName path The name of the cluster n/a
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.

POST /clusters/{clusterName}/commands/postClouderaRuntimeUpgrade

Post Cloudera Runtime upgrade API.

This API executes special finalization tasks (already part of regular CDH upgrade) after the installation of an updated build of Cloudera Runtime (no version change). No version change of Cloudera Rumtime means when first 3 digits of build remains the same (e.g. from 7.2.1.a to 7.2.1.b) during upgrade. Purpose of this is to automate manual tasks of CDH upgrade.

Request Parameters
name type description default
clusterName path n/a
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command

POST /clusters/{clusterName}/commands/preUpgradeCheck

Run cluster pre-upgrade check(s) when upgrading from specified version of CDH to the other.

Allows the following upgrade checks:

  • Minor upgrades from any CDH 5 to any CDH 5
  • Major upgrades from any CDH 5 to any CDH 6
  • Minor upgrades from any CDH 6 to any CDH 6
  • Maintenance upgrades or downgrades (a.b.x to a.b.y)

Request Parameters
name type description default
clusterName path The name of the cluster. n/a
Request Body
media type data type description
application/json ApiCdhUpgradeArgs (JSON) Arguments for the command. See ApiCdhUpgradeArgs.
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.

POST /clusters/{clusterName}/commands/refresh

Updates all refreshable configuration files in the cluster. Will not restart any roles.

Available since API v6.

Request Parameters
name type description default
clusterName path The name of the cluster n/a
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.

POST /clusters/{clusterName}/commands/restart

Restart all services in the cluster.

Services are restarted in the appropriate order given their dependencies.

Request Parameters
name type description default
clusterName path The name of the cluster. n/a
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.

POST /clusters/{clusterName}/commands/restart

Restart all services in the cluster.

Services are stopped then started in the appropriate order given their dependencies. The command can optionally restart only stale services and their dependencies as well as redeploy client configuration on all services in the cluster.

Request Parameters
name type description default
clusterName path The name of the cluster. n/a
Request Body
media type data type description
application/json ApiRestartClusterArgs (JSON) arguments for the restart command.
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.

POST /clusters/{clusterName}/commands/rollingRestart

Command to do a "best-effort" rolling restart of the given cluster, i.e. it does plain restart of services that cannot be rolling restarted, followed by first rolling restarting non-slaves and then rolling restarting the slave roles of services that can be rolling restarted. The slave restarts are done host-by-host.

Available since API v4. Only available with Cloudera Manager Enterprise Edition.

Request Parameters
name type description default
clusterName path The name of the cluster. n/a
Request Body
media type data type description
application/json ApiRollingRestartClusterArgs (JSON) Arguments for the rolling restart command.
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.

POST /clusters/{clusterName}/commands/rollingUpgrade

Command to do a rolling upgrade of specific services in the given cluster This command does not handle any services that don't support rolling upgrades. The command will throw an error and not start if upgrade of any such service is requested. This command does not upgrade the full CDH Cluster. You should normally use the upgradeCDH Command for upgrading the cluster. This is primarily helpful if you need to need to recover from an upgrade failure or for advanced users to script an alternative to the upgradeCdhCommand. This command expects the binaries to be available on hosts and activated. It does not change any binaries on the hosts.

Request Parameters
name type description default
clusterName path The name of the cluster. n/a
Request Body
media type data type description
application/json ApiRollingUpgradeServicesArgs (JSON) Arguments for the rolling upgrade command.
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.

POST /clusters/{clusterName}/commands/start

Start all services in the cluster.

Services are started in the appropriate order given their dependencies.

Request Parameters
name type description default
clusterName path The name of the cluster. n/a
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.

POST /clusters/{clusterName}/commands/stop

Stop all services in the cluster.

Services are stopped in the appropriate order given their dependencies.

Request Parameters
name type description default
clusterName path The name of the cluster. n/a
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.

POST /clusters/{clusterName}/commands/upgradeCdh

Perform CDH upgrade to the specified version.

Allows the following upgrades:

  • Major upgrades from any CDH 4 to any CDH 5
  • Minor upgrades from any CDH 5 to any CDH 5
  • Maintenance upgrades or downgrades (a.b.x to a.b.y)

If using packages, CDH packages on all hosts of the cluster must be manually upgraded before this command is issued.

The command will upgrade the services and their configuration to the version available in the CDH5 distribution.

Unless rolling upgrade options are provided, the entire cluster will experience downtime. If rolling upgrade options are provided, command will do a "best-effort" rolling upgrade of the given cluster, i.e. it does plain upgrade of services that cannot be rolling upgraded, followed by first rolling upgrading non-slaves and then rolling restarting the slave roles of services that can be rolling restarted. The slave restarts are done host-by-host.

Available since v9. Rolling upgrade is only available with Cloudera Manager Enterprise Edition. A more limited upgrade variant available since v6.

Request Parameters
name type description default
clusterName path The name of the cluster. n/a
Request Body
media type data type description
application/json ApiCdhUpgradeArgs (JSON) Arguments for the command. See ApiCdhUpgradeArgs.
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.

POST /clusters/{clusterName}/commands/upgradeServices

This method has been deprecated. This endpoint should not used in Cloudera Manager 5 or later. Use the upgradeCdh endpoint on the cluster instead.

Upgrades the services in the cluster to the CDH5 version.

This command requires that the CDH packages in the hosts used by the cluster be upgraded to CDH5 before this command is issued. Once issued, this command will stop all running services before proceeding.

If parcels are used instead of CDH system packages then the following steps need to happen in order:

  1. Stop all services manually
  2. Activate parcel
  3. Run this upgrade command
The command will upgrade the services and their configuration to the version available in the CDH5 distribution.

Request Parameters
name type description default
clusterName path The name of the cluster. n/a
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.

DELETE /clusters/{clusterName}/hosts/{hostId}

Request Parameters
name type description default
clusterName path n/a
hostId path n/a
Response Body
media type data type description
application/json ApiHostRef (JSON) the host that was unassociated with the cluster. if the host is not part of the cluster, return null

POST /clusters/{clusterName}/commands/tearDownWorkload/{workloadClusterName}

Tear Down Workload cluster.

Tear Down Ranger plugin service (repository) associated with the workload cluster.

Request Parameters
name type description default
clusterName path The name of the cluster. n/a
workloadClusterName path The name of the workload cluster. n/a
Response Body
media type data type description
application/json ApiCommand (JSON) Information about the submitted command.