ADCM API v2 usage examples

Contents

This page lists some of the HTTP requests that are supported by ADCM API v2.

If the request returns a paginated list, the response will contain the following parameters.

Response JSON object parameters for pagination
Parameter Type Description

count

integer

Number of elements

next

integer

Next page

previous

integer

Previous page

results

array of objects

A list containing paginated information about objects according to the performed request

Upload a bundle

POST /api/v2/bundles/ HTTP/1.1

This request uploads a new bundle to ADCM.

Request JSON object parameters
Parameter Type Description

file

string

Bundle file

Response JSON object parameters
Parameter Type Description

id

integer

Bundle ID

name

string

Bundle name

displayName

string

Displayed bundle name

version

string

Bundle version

edition

string

Bundle edition

mainPrototype

object

Bundle prototype object

uploadTime

string

Bundle upload time

signatureStatus

string

Bundle signature status. Possible values include: valid, invalid, absent

Example request

POST /api/v2/bundles/ HTTP/1.1
Accept: application/json
Content-Type: multipart/form-data

{
  "file": (binary)
}

Example response

HTTP 201 Created
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 21,
    "name": "SSH Common",
    "displayName": "SSH Common",
    "version": "2.9-dev",
    "edition": "community",
    "mainPrototype": {
        "id": 437,
        "name": "SSH Common",
        "displayName": "SSH Common",
        "description": "Simple ssh hosts",
        "type": "provider",
        "license": {
            "status": "absent",
            "text": null
        },
        "version": "2.9-dev"
    },
    "uploadTime": "2023-12-06T12:20:09.553497Z",
    "signatureStatus": "absent"
}

Accept a license agreement

This request accepts the license agreement for the specified prototype.

POST /api/v2/prototypes/<prototypeId>/license/accept/ HTTP/1.1

Example request

POST /api/v2/prototypes/5/license/accept/ HTTP/1.1

Example response

HTTP 200 OK

List prototypes

GET /api/v2/prototypes/ HTTP/1.1

This request lists all prototypes in ADCM. Add the ADCM object type at the end of the request to see only the prototypes of that type. The response supports pagination.

Response JSON object parameters
Parameter Type Description

id

integer

Prototype ID

name

string

Prototype name

displayName

string

Displayed prototype name

description

string

Prototype description

type

string

Prototype type

bundle

object

Bundle object

license

object

Prototype license object

version

string

Prototype version

Example request

GET /api/v2/prototypes/?type=provider HTTP/1.1

Example response

HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": 331,
            "name": "Yandex Compute VM Provider",
            "displayName": "Yandex Compute VM Provider",
            "description": "Manage Yandex Compute Cloud VMs",
            "type": "provider",
            "bundle": {
                "id": 11,
                "edition": "community"
            },
            "license": {
                "status": "absent",
                "text": null
            },
            "version": "3.4-1"
        }
    ]
}

Create a hostprovider

POST /api/v2/hostproviders/ HTTP/1.1

This request creates a new hostprovider. You can see all hostprovider prototype IDs at http://<IP address>:8000/api/v2/prototypes/?type=provider, using the IP address of the host where the ADCM container is started.

Request JSON object parameters
Parameter Type Description

prototypeId

integer

ID of a prototype

name

string

Hostprovider name

description

string

Hostprovider description

Response JSON object parameters
Parameter Type Description

id

integer

Hostprovider ID

name

string

Hostprovider name

state

string

Hostprovider state

multiState

array of strings

List of extended hostprovider states

prototype

object

Hostprovider prototype object

description

string

Hostprovider description

concerns

array of objects

List of points that require attention or action

isUpgradable

boolean

Sign of the presence (availability) of a hostprovider upgrade

mainInfo

string

Hostprovider main info

Example request

POST /api/v2/hostproviders/ HTTP/1.1
Accept: application/json

{
  "prototypeId": 132,
  "name": "new test hostprovider",
  "description": ""
}

Example response

HTTP 201 Created
Allow: GET, POST
Content-Type: application/json
Vary: Accept

{
  "id": 2,
  "name": "new test hostprovider",
  "state": "created",
  "multiState": [],
  "prototype": {
      "id": 132
      "name": "VMware vCloud Director",
      "displayName": "VMware vCloud Director",
      "version": "1.1.0-1"
  },
  "description": "",
  "concerns": [],
  "isUpgradable": false,
  "mainInfo": null
}

List hostproviders

GET /api/v2/hostproviders/ HTTP/1.1

This request lists all hostproviders that currently exist in ADCM. The response supports pagination.

JSON object results parameters
Parameter Type Description

id

integer

Hostprovider ID

name

string

Hostprovider name

state

string

Hostprovider state

multiState

array of strings

List of extended hostprovider states

prototype

object

Hostprovider prototype object

description

string

Hostprovider description

concerns

array of objects

List of points that require attention or action

isUpgradable

boolean

Sign of the presence (availability) of a hostprovider upgrade

mainInfo

string

Hostprovider main info

Example request

GET /api/v2/hostproviders/ HTTP/1.1

Example response

HTTP 200 OK
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": 4,
            "name": "test hostprovider",
            "state": "created",
            "multiState": [],
            "prototype": {
                "id": 331,
                "name": "Yandex Compute VM Provider",
                "displayName": "Yandex Compute VM Provider",
                "version": "3.4-1"
            },
            "description": "",
            "concerns": [],
            "isUpgradable": false,
            "mainInfo": null
        }
    ]
}

Create a host

POST /api/v2/hosts/ HTTP/1.1

This request creates a new host.

Request JSON object parameters
Parameter Type Description

hostproviderId

integer

Hostprovider ID

name

string

Host name

clusterId

integer

Cluster ID

Response JSON object parameters
Parameter Type Description

id

integer

Host ID

name

string

Host name

description

string

Host description

state

string

Host state

status

string

Host status. Possible values include: up, down

hostprovider

object

Hostprovider object

prototype

object

Prototype object

concerns

array of objects

List of points that require attention or action

isMaintenanceModeAvailable

boolean

Maintenance mode availability for a cluster host

maintenanceMode

string

Maintenance mode status. Possible values include: on, off

multiState

array of strings

List of extended host states

cluster

object

Cluster object

components

array of objects

List of host component objects

Example request

POST /api/v2/hosts/ HTTP/1.1
Accept: application/json

{
  "name": "test",
  "hostproviderId": 4,
  "clusterId": 9
}

Example response

HTTP 201 Created
Allow: GET, POST
Content-Type: application/json
Vary: Accept

{
    "id": 8,
    "name": "test",
    "description": "",
    "state": "created",
    "status": "down",
    "hostprovider": {
        "id": 4,
        "name": "test hostprovider",
        "displayName": "test hostprovider"
    },
    "prototype": {
        "id": 332,
        "name": "Yandex Compute VM",
        "displayName": "Yandex Compute VM",
        "version": "3.4-1"
    },
    "concerns": [],
    "isMaintenanceModeAvailable": false,
    "maintenanceMode": "off",
    "multiState": [],
    "cluster": {
        "id": 9,
        "name": "ADH"
    },
    "components": []
}

List hosts

GET /api/v2/hosts/ HTTP/1.1

This request lists all hosts that currently exist in ADCM. If you wish to see detailed information about a particular host, add the host ID to the request:

GET /api/v2/hosts/<hostId>/ HTTP/1.1

The response supports pagination.

JSON object results parameters
Parameter Type Description

id

integer

Host ID

name

string

Host name

description

string

Host description

state

string

Host state

status

string

Host status. Possible values include: up, down

hostprovider

object

Hostprovider object

prototype

object

Prototype object

concerns

array of objects

List of points that require attention or action

isMaintenanceModeAvailable

boolean

Maintenance mode availability for a cluster host

maintenanceMode

string

Maintenance mode status. Possible values include: on, off

multiState

array of strings

List of extended host states

cluster

object

Cluster object

components

array of objects

List of component objects

Example request

GET /api/v2/hosts/ HTTP/1.1

Example response

HTTP 200 OK
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": 8,
            "name": "bds-adbc",
            "description": "",
            "state": "running",
            "status": "down",
            "hostprovider": {
                "id": 2,
                "name": "Yandex",
                "displayName": "Yandex"
            },
            "prototype": {
                "id": 26,
                "name": "Yandex Compute VM",
                "displayName": "Yandex Compute VM",
                "version": "3.7-1"
            },
            "concerns": [],
            "isMaintenanceModeAvailable": false,
            "maintenanceMode": "off",
            "multiState": [],
            "cluster": {
                "id": 2,
                "name": "Test ADB cluster"
            },
            "components": [
                {
                    "id": 18,
                    "name": "server",
                    "displayName": "ADBM server"
                },
                {
                    "id": 17,
                    "name": "server",
                    "displayName": "ADB Control server"
                }
            ]
        }
    ]
}

Delete a host

This request deletes the specified host. You can only delete a host that doesn’t belong to any cluster.

DELETE /api/v2/hosts/<hostId>/ HTTP/1.1

Example request

DELETE /api/v2/hosts/1/ HTTP/1.1

Example response

HTTP 204 No Content

Create a cluster

POST /api/v2/clusters/ HTTP/1.1

This request creates a new cluster. You can see all cluster prototype IDs at http://<IP address>:8000/api/v2/prototypes/?type=cluster, using the IP address of the host where the ADCM container is started.

Request JSON object parameters
Parameter Type Description

prototypeId

integer

ID of a prototype

name

string

Cluster name

description

string

Cluster description

Response JSON object parameters
Parameter Type Description

id

integer

Cluster ID

name

string

Cluster name

description

string

Cluster description

state

string

Cluster state

multiState

array of strings

List of extended cluster states

status

string

Cluster status. Possible values include: up, down

prototype

object

Cluster prototype object

concerns

array of objects

List of points that require attention or action

isUpgradable

boolean

Sign of the presence (availability) of a cluster upgrade

mainInfo

string

Cluster main info

Example request

POST /api/v2/clusters/ HTTP/1.1
Accept: application/json

{
  "name": "test",
  "prototypeId": 264,
  "description": "test cluster"
}

Example response

HTTP 201 Created
Allow: GET, POST
Content-Type: application/json
Vary: Accept

{
    "id": 10,
    "name": "test",
    "description": "test cluster",
    "state": "created",
    "multiState": [],
    "status": "down",
    "prototype": {
        "id": 264,
        "name": "hadoop",
        "displayName": "Hadoop",
        "version": "2.1.10_b1-1"
    },
    "concerns": [],
    "isUpgradable": false,
    "mainInfo": "<p>Documentation: <a href=https://docs.arenadata.io/adh/>https://docs.arenadata.io/adh/</a></p>\n"
}

List clusters

GET /api/v2/clusters/ HTTP/1.1

This request lists all clusters that currently exist in ADCM. If you wish to see detailed information about a particular cluster, add the cluster ID to the request:

GET /api/v2/clusters/<clusterId>/ HTTP/1.1

The response supports pagination.

JSON object results parameters
Parameter Type Description

id

integer

Cluster ID

name

string

Cluster name

description

string

Cluster description

state

string

Cluster state

multiState

array of strings

List of extended cluster states

status

string

Cluster status. Possible values include: up, down

prototype

object

Cluster prototype object

concerns

array of objects

List of points that require attention or action

isUpgradable

boolean

Sign of the presence (availability) of a cluster upgrade

mainInfo

string

Cluster main info

Example request

GET /api/v2/clusters/ HTTP/1.1

Example response

HTTP 200 OK
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "count": 2,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": 9,
            "name": "ADH",
            "description": "",
            "state": "created",
            "multiState": [],
            "status": "down",
            "prototype": {
                "id": 264,
                "name": "hadoop",
                "displayName": "Hadoop",
                "version": "2.1.10_b1-1"
            },
            "concerns": [],
            "isUpgradable": false,
            "mainInfo": "<p>Documentation: <a href=https://docs.arenadata.io/adh/>https://docs.arenadata.io/adh/</a></p>\n"
        },
        {
            "id": 10,
            "name": "test",
            "description": "test cluster",
            "state": "created",
            "multiState": [],
            "status": "down",
            "prototype": {
                "id": 264,
                "name": "hadoop",
                "displayName": "Hadoop",
                "version": "2.1.10_b1-1"
            },
            "concerns": [],
            "isUpgradable": false,
            "mainInfo": "<p>Documentation: <a href=https://docs.arenadata.io/adh/>https://docs.arenadata.io/adh/</a></p>\n"
        }
    ]
}

Delete a cluster

This request deletes the specified cluster.

DELETE /api/v2/clusters/<clusterId>/ HTTP/1.1

Example request

DELETE /api/v2/clusters/3/ HTTP/1.1

Example response

HTTP 204 No Content

Add a service

POST /api/v2/clusters/<clusterId>/services/ HTTP/1.1

This request adds a service to the specified cluster. Service prototype ID is required. You can see all service prototype IDs at http://<IP address>:8000/api/v2/prototypes/?type=service, using the IP address of the host where the ADCM container is started.

Request JSON object parameters
Parameter Type Description

prototypeId

integer

Service prototype ID

Response JSON object parameters
Parameter Type Description

id

integer

Service ID

name

string

Service name

description

string

Service description

displayName

string

Displayed service name

prototype

object

Service prototype object

cluster

object

Cluster object

status

string

Service status

state

string

Service state

multiState

array of strings

List of extended service states

concerns

array of objects

List of points that require attention or action

isMaintenanceModeAvailable

boolean

Availability of the maintenance mode for the service

maintenanceMode

string

Maintenance mode status. Possible values include: on, off

mainInfo

string

Service main info

Example request

POST /api/v2/clusters/2/services/ HTTP/1.1
Accept: application/json

[
    {
        "prototypeId": 278
    }
]

Example response

HTTP 201 Created
Allow: GET, POST
Content-Type: application/json
Vary: Accept

[
    {
        "id": 15,
        "name": "zookeeper",
        "description": "",
        "displayName": "Zookeeper",
        "prototype": {
            "id": 278,
            "name": "zookeeper",
            "displayName": "Zookeeper",
            "version": "3.5.10"
        },
        "cluster": {
            "id": 10,
            "name": "test"
        },
        "status": "up",
        "state": "created",
        "multiState": [],
        "concerns": [
            {
                "id": 64,
                "reason": {
                    "message": "${source} has an issue with host-component mapping",
                    "placeholder": {
                        "source": {
                            "type": "cluster",
                            "name": "test",
                            "params": {
                                "clusterId": 10
                            }
                        }
                    }
                },
                "isBlocking": true,
                "cause": "host-component"
            }
        ],
        "isMaintenanceModeAvailable": false,
        "maintenanceMode": "off",
        "mainInfo": null
    }
]

List services

GET /api/v2/clusters/<clusterId>/services/ HTTP/1.1

This request lists all services that are added to a specified cluster. If you wish to see detailed information about a particular service, add the service ID to the request:

GET /api/v2/clusters/<clusterId>/services/<serviceId>/ HTTP/1.1

The response supports pagination.

JSON object results parameters
Parameter Type Description

id

integer

Service ID

name

string

Service name

description

string

Service description

displayName

string

Displayed service name

prototype

object

Service prototype object

cluster

object

Cluster object

status

string

Service status

state

string

Service state

multiState

array of strings

List of extended service states

concerns

array of objects

List of points that require attention or action

isMaintenanceModeAvailable

boolean

Availability of the maintenance mode for the service

maintenanceMode

string

Maintenance mode status. Possible values include: on, off

mainInfo

string

Service main info

Example request

GET /api/v2/clusters/2/services/ HTTP/1.1

Example response

HTTP 200 OK
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": 15,
            "name": "zookeeper",
            "description": "",
            "displayName": "Zookeeper",
            "prototype": {
                "id": 278,
                "name": "zookeeper",
                "displayName": "Zookeeper",
                "version": "3.5.10"
            },
            "cluster": {
                "id": 10,
                "name": "test"
            },
            "status": "up",
            "state": "created",
            "multiState": [],
            "concerns": [
                {
                    "id": 64,
                    "reason": {
                        "message": "${source} has an issue with host-component mapping",
                        "placeholder": {
                            "source": {
                                "type": "cluster",
                                "name": "test",
                                "params": {
                                    "clusterId": 10
                                }
                            }
                        }
                    },
                    "isBlocking": true,
                    "cause": "host-component"
                }
            ],
            "isMaintenanceModeAvailable": false,
            "maintenanceMode": "off",
            "mainInfo": "<div style=\"width:600px\">\n<p>Centralized service for maintaining configuration\ninformation, naming, providing distributed synchronization,\nand providing group services.</p>\n</div>\n"
        }
    ]
}

Delete a service

This request deletes a service from the specified cluster. A service for whose components the mapping to hosts exists is not always possible to remove.

DELETE /api/v2/clusters/<clusterId>/services/<serviceId>/ HTTP/1.1

Example request

DELETE /api/v2/clusters/3/services/1/ HTTP/1.1

Example response

HTTP 204 No Content

Add a host to a cluster

POST /api/v2/clusters/<clusterId>/hosts/ HTTP/1.1

This request adds a host to the specified cluster. Host ID is required.

Request JSON object parameters
Parameter Type Description

hostId

integer

Host ID

Response JSON object parameters
Parameter Type Description

id

integer

Host ID

name

string

Host name

description

string

Host description

state

string

Host state

status

string

Host status. Possible values include: up, down

hostprovider

object

Hostprovider object

prototype

object

Host prototype object

concerns

array of objects

List of points that require attention or action

isMaintenanceModeAvailable

boolean

Availability of the maintenance mode for the host

maintenanceMode

string

Maintenance mode status. Possible values include: on, off

multiState

array of strings

List of extended host states

cluster

object

Cluster object

components

array of objects

List of component objects

Example request

POST /api/v2/clusters/10/hosts/ HTTP/1.1
Accept: application/json

[
    {
    "hostId": 8
    }
]

Example response

HTTP 201 Created
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

[
    {
        "id": 8,
        "name": "test",
        "description": "",
        "state": "created",
        "status": "down",
        "hostprovider": {
            "id": 4,
            "name": "test hostprovider",
            "displayName": "test hostprovider"
        },
        "prototype": {
            "id": 332,
            "name": "Yandex Compute VM",
            "displayName": "Yandex Compute VM",
            "version": "3.4-1"
        },
        "concerns": [],
        "isMaintenanceModeAvailable": false,
        "maintenanceMode": "off",
        "multiState": [],
        "cluster": {
            "id": 10,
            "name": "test"
        },
        "components": []
    }
]

Remove a host from a cluster

DELETE /api/v2/clusters/<clusterId>/hosts/<hostId>/ HTTP/1.1

This request unlinks the specified host from the specified cluster.

Example request

DELETE /api/v2/clusters/3/hosts/6/ HTTP/1.1

Example response

HTTP 204 No Content

Map components to a host

POST /api/v2/clusters/<clusterId>/mapping/ HTTP/1.1

This request allows you to add components to existing hosts and save the mapping. Specify the components that should be added to the specified hosts. If host-component mapping already existed for the cluster, then in order to save a new mapping, you have to copy and resend everything that existed before you created a new mapping.

Request JSON object parameters
Parameter Type Description

hostId

integer

Host ID

componentId

integer

Component ID

Response JSON object parameters
Parameter Type Description

id

integer

Mapping ID

hostId

integer

Host ID

componentId

integer

Component ID

Example request

POST /api/v2/clusters/3/mapping/ HTTP/1.1
Accept: application/json

[
  {
    "hostId": 2,
    "componentId": 2
  }
]

Example response

HTTP 201 Created
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

[
  {
    "id": 1,
    "hostId": 2,
    "componentId": 2
  }
]

List the current mapping of components to hosts

GET /api/v2/clusters/<clusterId>/mapping/ HTTP/1.1

This request lists the current host-component mapping (if it exists) for the specified cluster. The order is not guaranteed.

Response JSON object parameters
Parameter Type Description

id

integer

Mapping ID

hostId

integer

Host ID

componentId

integer

Component ID

Example request

GET /api/v2/clusters/8/mapping/ HTTP/1.1

Example response

HTTP 200 OK
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

[
    {
        "id": 3,
        "hostId": 4,
        "componentId": 33
    }
]

List actions

GET /api/v2/clusters/<clusterId>/actions/ HTTP/1.1

This request lists all cluster actions. If you wish to see detailed information about a particular action, add the action ID to the request:

GET /api/v2/clusters/<clusterId>/actions/<actionId>/ HTTP/1.1

Hostproviders, hosts, and services also have actions that can be accessed in a similar way.

Response JSON object parameters
Parameter Type Description

id

integer

Action ID

name

string

Action name

displayName

string

Displayed action name

startImpossibleReason

string

Indicates the reason due to which action launch is not possible

Example request

GET /api/v2/clusters/5/actions/ HTTP/1.1

Example response

HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

[
  {
    "id": 4,
    "name": "install",
    "displayName": "Install",
    "startImpossibleReason": null
  },
  {
    "id": 9,
    "name": "hadoop_2.1.10_b1-1_community_upgrade_2.1.10_b1_community_2.1.8_b3_strict_false-2.1.10_b1-1_strict_false_editions-community_state_available-installed_faulty_installed_created_state_on_success-upgradable",
    "displayName": "Upgrade: 2.1.10_b1  community",
    "startImpossibleReason": null
  }
]

Launch actions

POST /api/v2/clusters/<clusterId>/actions/<actionId>/run/ HTTP/1.1

Action can be started if the startImpossibleReason attribute is null. Otherwise, this attribute contains the reason why the action can’t be started. Some actions are not available if the ADCM object (host or service) is in maintenance mode.

Host-component mapping rules that affect actions are listed in hostComponentMapRules section of action information. hostComponentMapRules : [] means that there are no host-component mapping rules that affect actions.

Actions for services, components, hostproviders, and hosts are launched similarly to cluster actions shown below.

Request JSON object parameters
Parameter Type Description

hostComponentMap

array of objects

Information on mapping between hosts and components

configuration

object

List of configuration attributes and their values

isVerbose

boolean

Defines whether to show details

Response JSON object parameters
Parameter Type Description

id

integer

Action ID

name

string

Action name

displayName

string

Displayed action name

action

object

Action information

status

string

Action status

startTime

string

The moment action was started

endTime

string

The moment action was stopped

duration

float

Action duration

isTerminatable

boolean

The ability to terminate the execution of a job related to action

childJobs

array of objects

Linked jobs

objects

array of objects

ADCM objects related to action

Example request

POST /api/v2/clusters/11/actions/1912/run/ HTTP/1.1
Accept: application/json

{
    "hostComponentMap": [],
    "configuration": {
        "config": {
            "disable_selinux": true,
            "disable_firewalld": true,
            "install_jdk": true,
            "swap_off": true,
            "configure_etc": false
        },
        "adcmMeta": {}
    },
    "isVerbose": false
}

Example response

HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 19,
    "name": "Install",
    "displayName": "Install",
    "action": {
        "id": 1912,
        "name": "Install",
        "displayName": "Install"
    },
    "status": "created",
    "startTime": null,
    "endTime": null,
    "duration": null,
    "isTerminatable": false,
    "childJobs": [
        {
            "id": 446,
            "name": "repos",
            "displayName": "Repositories setup",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        },
        {
            "id": 447,
            "name": "preinstall",
            "displayName": "Preinstall",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        },
        {
            "id": 448,
            "name": "monitoring_clients",
            "displayName": "Monitoring clients",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        },
        {
            "id": 449,
            "name": "zookeeper",
            "displayName": "Zookeeper",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        },
        {
            "id": 450,
            "name": "znode",
            "displayName": "Configure Znode path",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        },
        {
            "id": 451,
            "name": "kafka",
            "displayName": "Kafka",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        },
        {
            "id": 452,
            "name": "kafka_check",
            "displayName": "Kafka: Check",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        },
        {
            "id": 453,
            "name": "kafka_manager",
            "displayName": "Kafka-Manager",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        },
        {
            "id": 454,
            "name": "kafka_manager_check",
            "displayName": "Kafka-Manager: Check",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        },
        {
            "id": 455,
            "name": "schema_registry",
            "displayName": "Schema-Registry",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        },
        {
            "id": 456,
            "name": "schema_registry_check",
            "displayName": "Schema-Registry: Check",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        },
        {
            "id": 457,
            "name": "kafka_rest",
            "displayName": "Kafka REST Proxy",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        },
        {
            "id": 458,
            "name": "kafka_rest_check",
            "displayName": "Kafka REST Proxy: Check",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        },
        {
            "id": 459,
            "name": "ksql",
            "displayName": "ksqlDB",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        },
        {
            "id": 460,
            "name": "ksql_check",
            "displayName": "ksqlDB: Check",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        },
        {
            "id": 461,
            "name": "kafka_connect",
            "displayName": "Kafka Connect Worker",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        },
        {
            "id": 462,
            "name": "kafka_connect_check",
            "displayName": "Kafka Connect: Check",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        },
        {
            "id": 463,
            "name": "nifi_server",
            "displayName": "NiFi Server",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        },
        {
            "id": 464,
            "name": "nifi_server_check",
            "displayName": "NiFi Server: Check",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        },
        {
            "id": 465,
            "name": "nifi_registry",
            "displayName": "NiFi-Registry",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        },
        {
            "id": 466,
            "name": "nifi_registry_check",
            "displayName": "NiFi-Registry: Check",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        },
        {
            "id": 467,
            "name": "minifi_server",
            "displayName": "MiNiFi C2 Server",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        },
        {
            "id": 468,
            "name": "minifi_server_check",
            "displayName": "MiNiFi C2 Server: Check",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        },
        {
            "id": 469,
            "name": "minifi_agent",
            "displayName": "MiNiFi Agent",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        },
        {
            "id": 470,
            "name": "minifi_agent_check",
            "displayName": "MiNiFi Agent: Check",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        }
    ],
    "objects": [
        {
            "type": "cluster",
            "id": 11,
            "name": "ADS"
        }
    ]
}

List host groups for actions

GET /api/v2/clusters/<clusterId>/action-host-groups/ HTTP/1.1
GET /api/v2/clusters/<clusterId>/services/<serviceId>/action-host-groups/ HTTP/1.1
GET /api/v2/clusters/<clusterId>/services/<serviceId>/components/<componentId>/action-host-groups/ HTTP/1.1

These requests list action host groups configured at the cluster, service, or component level, respectively. To view detailed information about a particular host group, specify the group ID in the query, for example (for a cluster’s group of hosts):

GET /api/v2/clusters/<clusterId>/action-host-groups/<groupId>/ HTTP/1.1

The response supports pagination.

JSON object results parameters
Parameter Type Description

id

integer

Host group ID

name

string

Host group name

description

string

Host group description

hosts

array of objects

List of hosts in the group. Each object in the list contains a host ID and name

Example request

GET /api/v2/clusters/1/services/1/action-host-groups/ HTTP/1.1

Example response

HTTP 200 OK
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "count": 2,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": 1,
            "name": "hosts_1-3",
            "description": "",
            "hosts": [
                {
                    "id": 1,
                    "name": "dev-adqm-1.ru-central1.internal"
                },
                {
                    "id": 3,
                    "name": "dev-adqm-3.ru-central1.internal"
                }
            ]
        },
        {
            "id": 2,
            "name": "hosts_2-4",
            "description": "",
            "hosts": [
                {
                    "id": 2,
                    "name": "dev-adqm-2.ru-central1.internal"
                },
                {
                    "id": 4,
                    "name": "dev-adqm-4.ru-central1.internal"
                }
            ]
        }
    ]
}

Create a host group for actions

POST /api/v2/clusters/<clusterId>/action-host-groups/ HTTP/1.1
POST /api/v2/clusters/<clusterId>/services/<serviceId>/action-host-groups/ HTTP/1.1
POST /api/v2/clusters/<clusterId>/services/<serviceId>/components/<componentId>/action-host-groups/ HTTP/1.1

These requests create a new host group for actions at the cluster, service, or component level, respectively.

Request JSON object parameters
Parameter Type Description

name

string

Host group name

description

string

Host group description

Response JSON object parameters
Parameter Type Description

id

integer

Host group ID

name

string

Host group name

description

string

Host group description

hosts

array of objects

List of hosts in the group

Example request

POST /api/v2/clusters/1/action-host-groups/ HTTP/1.1
Accept: application/json

{
    "name": "test_group_of_hosts",
    "description": "This host group is created from API."
}

Example response

HTTP 201 Created
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 3,
    "name": "test_group_of_hosts",
    "description": "This host group is created from API.",
    "hosts": []
}

Add a host to a group for actions

POST /api/v2/clusters/<clusterId>/action-host-groups/<groupId>/hosts/ HTTP/1.1
POST /api/v2/clusters/<clusterId>/services/<serviceId>/action-host-groups/<groupId>/hosts/ HTTP/1.1
POST /api/v2/clusters/<clusterId>/services/<serviceId>/components/<componentId>/action-host-groups/<groupId>/hosts/ HTTP/1.1

These requests add a host to a host group for actions at the cluster, service, or component level, respectively. A host ID is required.

Hosts (with their IDs) that can be added to a group
GET /api/v2/clusters/<clusterId>/action-host-groups/<groupId>/host-candidates/ HTTP/1.1
GET /api/v2/clusters/<clusterId>/services/<serviceId>/action-host-groups/<groupId>/host-candidates/ HTTP/1.1
GET /api/v2/clusters/<clusterId>/services/<serviceId>/components/<componentId>/action-host-groups/<groupId>/host-candidates/ HTTP/1.1
Request JSON object parameters
Parameter Type Description

hostId

integer

Host ID

Response JSON object parameters
Parameter Type Description

id

integer

Host ID

name

string

Host name

Example request

POST /api/v2/clusters/1/action-host-groups/3/hosts/ HTTP/1.1
Accept: application/json

{
    "hostId": 3
}

Example response

HTTP 201 Created
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 3,
    "name": "dev-adqm-3.ru-central1.internal"
}

Remove a host from a group for actions

DELETE /api/v2/clusters/<clusterId>/action-host-groups/<groupId>/hosts/<hostId>/ HTTP/1.1
DELETE /api/v2/clusters/<clusterId>/services/<serviceId>/action-host-groups/<groupId>/hosts/<hostId>/ HTTP/1.1
DELETE /api/v2/clusters/<clusterId>/services/<serviceId>/components/<componentId>/action-host-groups/<groupId>/hosts/<hostId>/ HTTP/1.1

These requests remove a host from a group for actions at the cluster, service, or component level, respectively.

Example request

DELETE /api/v2/clusters/1/services/1/components/1/action-host-groups/6/hosts/1/ HTTP/1.1

Launch actions for host groups

POST /api/v2/clusters/<clusterId>/action-host-groups/<groupId>/actions/<actionId>/run/ HTTP/1.1
POST /api/v2/clusters/<clusterId>/services/<serviceId>/action-host-groups/<groupId>/actions/<actionId>/run/ HTTP/1.1
POST /api/v2/clusters/<clusterId>/services/<serviceId>/components/<componentId>/action-host-groups/<groupId>/actions/<actionId>/run/ HTTP/1.1

These requests start an action for a host group, created at the cluster, service, or component level, respectively. An action can be started if its startImpossibleReason attribute is null. Otherwise, this attribute contains the reason why the action cannot be started.

A set of actions available for execution on hosts in a group depends on the ADCM object at the level of which the host group is created — product, object type (cluster, service, or component), and state of this object.

List of actions available for a host group
GET /api/v2/clusters/<clusterId>/action-host-groups/<groupId>/actions/ HTTP/1.1
GET /api/v2/clusters/<clusterId>/services/<serviceId>/action-host-groups/<groupId>/actions/ HTTP/1.1
GET /api/v2/clusters/<clusterId>/services/<serviceId>/components/<componentId>/action-host-groups/<groupId>/actions/ HTTP/1.1
Information about a specific action
GET /api/v2/clusters/<clusterId>/action-host-groups/<groupId>/actions/<actionId>/ HTTP/1.1
GET /api/v2/clusters/<clusterId>/services/<serviceId>/action-host-groups/<groupId>/actions/<actionId>/ HTTP/1.1
GET /api/v2/clusters/<clusterId>/services/<serviceId>/components/<componentId>/action-host-groups/<groupId>/actions/<actionId>/ HTTP/1.1
Request JSON object parameters
Parameter Type Description

hostComponentMap

array of objects

Information on mapping between hosts and components

configuration

object

List of configuration attributes and their values

isVerbose

boolean

Defines whether to show details

Response JSON object parameters
Parameter Type Description

id

integer

Action ID

name

string

Action name

displayName

string

Displayed action name

action

object

Action information

status

string

Action status

startTime

string

The moment action was started

endTime

string

The moment action was stopped

duration

float

Action duration

isTerminatable

boolean

The ability to terminate the execution of a job related to action

childJobs

array of objects

Linked jobs

objects

array of objects

ADCM objects related to action

Example request

POST /api/v2/clusters/1/services/1/action-host-groups/1/actions/162/run/ HTTP/1.1

Example response

HTTP 200 OK
Allow: POST, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 20,
    "name": "restart",
    "displayName": "Restart",
    "action": {
        "id": 162,
        "name": "restart",
        "displayName": "Restart"
    },
    "status": "created",
    "startTime": null,
    "endTime": null,
    "duration": null,
    "isTerminatable": false,
    "childJobs": [
        {
            "id": 57,
            "name": "restart",
            "displayName": "Restart",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        }
    ],
    "objects": [
        {
            "type": "cluster",
            "id": 1,
            "name": "Test ADQM cluster"
        },
        {
            "type": "service",
            "id": 1,
            "name": "ADQMDB"
        },
        {
            "type": "action_host_group",
            "id": 1,
            "name": "hosts_1-3"
        }
    ]
}

Delete a host group for actions

DELETE /api/v2/clusters/<clusterId>/action-host-groups/<groupId>/ HTTP/1.1
DELETE /api/v2/clusters/<clusterId>/services/<serviceId>/action-host-groups/<groupId>/ HTTP/1.1
DELETE /api/v2/clusters/<clusterId>/services/<serviceId>/components/<componentId>/action-host-groups/<groupId>/ HTTP/1.1

These requests remove a host group from a cluster, service, or component configuration, respectively.

Example request

DELETE /api/v2/clusters/1/action-host-groups/3/ HTTP/1.1

List upgrades

GET /api/v2/clusters/<clusterId>/upgrades/ HTTP/1.1

This request lists all available cluster upgrades. Hostprovider upgrades can be listed similarly.

Response JSON object parameters
Parameter Type Description

id

integer

Upgrade ID

name

string

Upgrade name

displayName

string

Displayed upgrade name

Example request

GET /api/v2/clusters/12/upgrades/ HTTP/1.1

Example response

HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

[
  {
    "id": 28,
    "name": "2.8.1_arenadata1_b1 enterprise",
    "displayName": "2.8.1_arenadata1_b1 enterprise",
  }
]

Launch upgrades

POST /api/v2/clusters/<clusterId>/upgrades/<upgradeId>/run/ HTTP/1.1

Launching upgrades is similar to launching actions. Upgrades are available if isUpgradable : true is present in cluster information. You must accept the bundle license agreement before launching the upgrade.

Host-component mapping rules that affect upgrades are listed in hostComponentMapRules section of upgrade information. hostComponentMapRules : [] means that there are no host-component mapping rules that affect upgrades.

Request JSON object parameters
Parameter Type Description

hostComponentMap

array of objects

Information on mapping between hosts and components

configuration

object

List of configuration attributes and their values

isVerbose

boolean

Defines whether to show details

Response JSON object parameters
Parameter Type Description

id

integer

Upgrade ID

name

string

Upgrade name

displayName

string

Displayed upgrade name

action

object

Action information

status

string

Upgrade status

startTime

string

The moment upgrade was started

endTime

string

The moment upgrade was stopped

duration

float

Upgrade duration

isTerminatable

boolean

The ability to terminate the execution of a job related to upgrade

childJobs

array of objects

Linked jobs

objects

array of objects

ADCM objects related to upgrade

Example request

POST /api/v2/clusters/19/upgrades/46/run/ HTTP/1.1
Accept: application/json

{
  "hostComponentMap": [],
  "configuration": null,
  "isVerbose": false
}

Example response

HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 20,
    "name": "hadoop_2.1.10_b1-1_enterprise_upgrade_2.1.10_b1_enterprise_2.1.8_b3_strict_false-2.1.10_b1-1_strict_false_editions-enterprise_state_available-installed_faulty_installed_created_state_on_success-upgradable",
    "displayName": "Upgrade: 2.1.10_b1  enterprise",
    "action": {
        "id": 2528,
        "name": "hadoop_2.1.10_b1-1_enterprise_upgrade_2.1.10_b1_enterprise_2.1.8_b3_strict_false-2.1.10_b1-1_strict_false_editions-enterprise_state_available-installed_faulty_installed_created_state_on_success-upgradable",
        "displayName": "Upgrade: 2.1.10_b1  enterprise"
    },
    "status": "created",
    "startTime": null,
    "endTime": null,
    "duration": null,
    "isTerminatable": false,
    "childJobs": [
        {
            "id": 471,
            "name": "bundle upgrade",
            "displayName": "Upgrade bundle",
            "status": "created",
            "startTime": null,
            "endTime": null,
            "duration": null,
            "isTerminatable": false
        }
    ],
    "objects": [
        {
            "type": "cluster",
            "id": 19,
            "name": "adh-2.1.8"
        }
    ]
}
Found a mistake? Seleсt text and press Ctrl+Enter to report it