How Can We Help?
You can create, update, and remove component instances in HEAL using the ‘instances’ API.
Creating Component Instances
You can create component instances in HEAL using the ‘instances’ API.
API Name – instances
Format – POST /api/accounts/<account_identifier>/instances
JSON Format
Input Parameters
Type | Name | Description | Schema | Mandatory/Optional |
body | name | Name of the Component Instance | string | Mandatory |
body | Identifier | Identifier of the Component Instance | string | Optional |
body | componentName | Name of the component | string | Mandatory |
body | componentVersion | Version of the component | string | Mandatory |
body | parentIdentifier | Identifier of the parent component instance | string | Mandatory |
body | parentName | Name of the parent component instance. Provide either parentIdentifier or parentName. | string | Mandatory |
body | serviceIdentifiers | List of the service identifiers. This list specifies the services the component belongs to. This is applicable only for “Host” type component. For other components, this field can be null. | string | Mandatory |
body | agentIdentifiers | List of Identifiers of Agents to which the instance must be mapped. | string | Optional |
body | discovery | It can be either 0 or 1. This defines if an instance is manually created or discovered. | string | Optional |
body | attributes | List of attributes that need to be associated with the component instance. “HostAddress” attribute is mandatory in the “attributes” field. | string | Mandatory |
You can add multiple blocks in the input json each representing a single component instance i.e. you can create multiple component instances at a time.
Sample Input JSON
Output JSON for Success
Output JSON for Failure
Updating a Component Instance
You can update data for a component instance in HEAL using ‘instances’ API. You can update data for only one instance at a time. You can simultaneously update multiple attributes of an instance. In order to update data for multiple instances, execute ‘instances’ API separately for each of the component instances.
API Name – instances
Format – PUT /api/accounts/<account_identifier>/instances/{instanceIdentifier}
Input Parameters
Type | Name | Description | Schema | Mandatory/Optional |
Path | instanceIdentifier | Identifier of the service | string | Mandatory |
Body | serviceIdentifiers | List of the service identifiers. This list specifies the services the component belongs to. This is applicable only for “Host” type component. For other components, this field can be null. | string | Mandatory |
attributes: List of attributes of the component instance that needs to be updated. At least one attribute needs to be present. | ||||
Body | name | Name of the attribute | string | Mandatory |
Body | value | Value of the attribute | string | Mandatory |
Input data JSON
Sample Input JSON
Input
Output JSON for Success
Output JSON for Failure
Removing a Component Instance
You can remove a component instance in HEAL using ‘instances’ API.
API Name – instances
Format – DELETE /api/accounts/<account_identifier>/instances/{instanceIdentifier}
Input Parameters
Type | Name | Description | Schema | Mandatory/Optional |
Path | instanceIdentifier | Identifier of the component instance | string | Mandatory |
Sample Input
Output JSON for Success
Output JSON for Failure