How Can We Help?
You can create services in HEAL using the ‘services’ API. While creating the services, you can also create host and component instances. You can also remove the services.
Creating a Service
You can create services in HEAL when an account and application already exist. You can create multiple services for an application. You can add host and component instances while creating a service.
API Name – services
Format – POST /api/accounts/<account_identifier>/services
JSON Format
Input Parameters
Type | Name | Description | Schema | Mandatory/Optional |
body | name | Name of the service | string | Mandatory |
body | Identifier | Identifier of the service. If not specified, it gets generated. This should be unique across accounts. | string | Optional |
body | layer | Layer to which service gets associated. It can be user, app_server, web_server, or db_server | string | Optional |
body | appIdentifier | Identifier of the application to which service is associated. | string | Mandatory |
body | timezoneId | Unique Identifier of the timezone | string | Optional |
body | type | Type of the service. It needs to be “Kubernetes”. | string | Optional |
instances [This section is optional] You can add multiple blocks in this section each representing a single component instance i.e. you can add multiple component instances in this section. | ||||
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 |
Sample Input JSON
Output JSON for Success
Output JSON for Failure
Removing a Service
This removes a HEAL service. Service becomes inactive after removal.
Format – DELETE /api/accounts/<account_identifier>/services/{serviceIdentifier}
Input Parameters
Type | Name | Description | Schema | Mandatory/Optional |
Path | serviceIdentifier | Identifier of the service | string | Mandatory |
Sample Input
Output JSON for Success
Output JSON for Failure