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

[ { “name”:”<service name>”, “identifier”:”<service identifier>”, “layer”:”<service layer>”, “appIdentifier”:”<application identifier>”, “timezoneId”: “<timezone identifier>”, “type”:”<service type>”, “instances”: [ { “name”:”<instance name>”, “identifier”:”<instance identifier>”, “componentName”:”<component name>”, “componentVersion”:”<component version>”, “parentIdentifier”:”<parent identifier>”, “parentName”:”<parent name>”, “serviceIdentifiers”:”<list of service identifiers>”, “agentIdentifiers”:”<list of agent identifiers>”, “discovery”:”<dynamic discovery of an instance>”, “attributes”:”<list of attributes>” } ] } ]

Input Parameters

TypeNameDescriptionSchemaMandatory/Optional
bodynameName of the servicestringMandatory
bodyIdentifierIdentifier of the service. If not specified, it gets generated. This should be unique across accounts.stringOptional
bodylayerLayer to which service gets associated.
It can be user, app_server, web_server, or db_server
stringOptional
bodyappIdentifierIdentifier of the application to which service is associated.stringMandatory
bodytimezoneIdUnique Identifier of the timezonestringOptional
bodytypeType of the service. It needs to be “Kubernetes”.stringOptional
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.
bodynameName of the Component InstancestringMandatory
bodyIdentifierIdentifier of the Component InstancestringOptional
bodycomponentNameName of the componentstringMandatory
bodycomponentVersionVersion of the componentstringMandatory
bodyparentIdentifierIdentifier of the parent component instancestringMandatory
bodyparentNameName of the parent component instance. Provide either parentIdentifier or parentName.stringMandatory
bodyserviceIdentifiersList 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.stringMandatory
bodyagentIdentifiersList of Identifiers of Agents to which the instance must be mapped.stringOptional
bodydiscoveryIt can be either 0 or 1.
This defines if an instance is manually created or discovered.
stringOptional
bodyattributesList of attributes that need to be associated with the component instance. “HostAddress” attribute is mandatory in the “attributes” field.stringMandatory

 

Sample Input JSON

 [ { “name”: “Payment service”, “identifier”: “0e3912a9-316f-11ea-b371-42010aa003111”, “layer”: “app_server”, “appIdentifier”: “013912a9-316f-11ea-b371-42010aa002222”, “type”: “Kubernetes”, “instances”: [ { “name”: “Payment service”, “identifier”: “0e3912a9-316f-11ea-b371-42010aa001”, “componentName”: “Java Service”, “componentVersion”: 8.1, “parentIdentifier”: null, “parentName”: “CentOS_Host1”, “serviceIdentifiers”: null, “agentIdentifiers”: [ “7fb4c12c-6d84-475f-9aee-593496d00ca8” ], “discovery”: 1, “attributes”: [ { “name”: “HostAddress”, “value”: “192.168.0.35” } ] } ] } ]

Output JSON for Success

  { “message”: “Operation successfully completed”, “responseStatus”: “SUCCESS”, “data”: [ { “id”: 0, “name”: “string”, “identifier”: “string” } ] }

Output JSON for Failure

{ “message”: “Failure message”, “responseStatus”: “FAILURE” }

Removing a Service

This removes a HEAL service. Service becomes inactive after removal.
Format – DELETE /api/accounts/<account_identifier>/services/{serviceIdentifier}
Input Parameters

TypeNameDescriptionSchemaMandatory/Optional
PathserviceIdentifierIdentifier of the servicestringMandatory

 

Sample Input

http://<keycloak_host>:<keycloak_port>/appsone-controlcenter/v2.0/api/accounts/TopologyAPI/services/0e3912a9-316f-11ea-b371-42010aa003111

Output JSON for Success

  { “message”: “Operation successfully completed.”, “responseStatus”: “SUCCESS”, “data”: null }

Output JSON for Failure

  { “message”: “Failure message”, “responseStatus”: “FAILURE” }

Table of Contents