How Can We Help?

This section describes the Topology APIs for creating the basic entities like Application, Services and its connections. This section also provides the details to add the Supervisor for the Account using API.

Application

This API is DEPRECATED. You can use Control Center UI for creating an application.

Heal allows you to create the Application and its services when an Account already exists. Applications tags one or more services for an Account.

API Name: addApplication

Format: POST  /api/accounts/< account_identifier >/addApplication

JSON Formart

[{ “identifier”: “<identifier>”, “name”: “<name>”, “tags”: [ { “identifier”: “<service_name>”, “name”: “Controller”, “subTypeName”: “Services”, “layer”: “user” } ] }]

Input Parameters

An application can have one or more Services. To create multiple services, add multiple “tags” object in the JSON.

NameDescriptionDefault ValuePredefined ValuesMandatoryMore Info
identifierAn identifier for the ApplicationNoIf you want to auto-generate the identifier by Heal, do not provide this parameter in the JSON.
nameName for the ApplicationYesName must unique in the Account.
Object – tags
identifierName of the serviceYesName must unique in the Account.
nameThe name used must be ControllerControllerYesDo not change the value.
subTypeNameSub Type Name of the TagServicesYesDo not change the value.
layerLayer under which the Service must be listedapp_service, web_service, db_serviceYesChoose the layer from the predefined values.Note: In case you use a customized value instead of predefined value, “?” will be displayed for the service in the SDM.

 

Sample JSON

For the Account ‘XR Travels’, the JSON to create an Application named ‘FlightBooking’ with 3 services named Travel Web, Flights, Flights Inventory is as follows:

[{ “identifier”: “Flightbooking-1”, “name”: “FlightBooking”, “tags”: [{ “identifier”: “Travel_Web”, “name”: “Controller”, “subTypeName”: “Services”, “layer”: “web_layer” }, { “identifier”: “Flights”, “name”: “Controller”, “subTypeName”: “Services”, “layer”: “app_layer” }, { “identifier”: “Flights_Inventory”, “name”: “Controller”, “subTypeName”: “Services”, “layer”: “db_layer” } ] }]

Success Rest Response

{ “message”: “Created Sccessfully.”, “responseStatus”: “SUCCESS”, “data”: { “id”: 2, “name”: “FlightBooking”, “identifier”: “abcd-efgh-jklm-nopq” } }

Failure Rest response

Considering wrong Account identifier was used in the addApplication API, response is as follows

{ “message”: “Account does not exist.”, “responseStatus”: “FAILURE” }

Connections

HEAL allows you to connect the source service to destination service using APIs explained as follows. Service that initiates the request is referred to as Source service whereas the service receiving the request is the destination service.

Prerequisites – Services to be used in the JSON must be already created in HEAL.

addConnection API

NOTE: This API is Deprecated. You can use ‘connections’ API.

API Name – addConnection

Format – POST  /api/accounts/< account_identifier >/addConnection

JSON Format

[ { “sourceServiceName”: “<source service identifier>”, “isDiscovery”: 0, “destinationServiceName”: “<destination service identifier>” } ]

Input Required

NameDescriptionDefault ValuePredefined ValuesMandatoryMore Info
sourceServiceNameIdentifier of the source serviceYesService from which the request starts.
isDiscoveryIdentifies if the connection between the services is discovered.00, 1Yes0 – Connection created manually
1 – Connection created by the discovery
destinationServiceNameIdentifier of the destination serviceYesService which receives the request from Source.

 

Sample JSON

For the FlightBooking application, the services can be connected using the following sample JSON.

[ { “sourceServiceName”: “Travel_Web”, “isDiscovery”: 0, “destinationServiceName”: “Flights” }, { “sourceServiceName”: “Flights”, “isDiscovery”: 0, “destinationServiceName”: “Flights_Inventory” } ]

Success Rest Response

{ “message”: “Created Successfully”, “responseStatus”: “SUCCESS”, “data”: 12 }

SampleOutput

Failure Rest response

Considering non-existing source was used in the add Connections API, the response is as follows:

{ “message”: “Service does not exist.”, “responseStatus”: “FAILURE” }

connection API

This establishes a connection between HEAL services.

API Name  connections

A) Adding a Connection

Format – POST  /api/accounts/< account_identifier >/connections

JSON Format

[{

“sourceServiceIdentifier”:”<source service identifier>”,

“destinationServiceIdentifier”:”<destination service identifier>”,

“discovery”:”<dynamic discovery of an instance>”

}

]

Input Parameters

TypeNameDescriptionSchemaMandatory/Optional
bodysourceServiceIdentifierIdentifier of the source service. Source service is the one from which the request starts.stringMandatory
bodydestinationServiceIdentifierIdentifier of the destination service. Destination service is the one which receives the request from Source.stringMandatory
bodydiscoveryIdentifies if the connection between the services is discovered. It can be either 0 or 1.0 – Connection is created manually

1 – Connection is created by the discovery

integerMandatory

Sample Input JSON

[ { “sourceServiceIdentifier”: [ “0e3912a9-316f-11ea-b371-42010aa003111” ], “destinationServiceIdentifier”: [ “0e3912a9-316f-11ea-b371-42010aa004111” ], “discovery”: 1 } ]

Output JSON for Success

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

Output JSON for Failure

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

B) Removing a Connection

This removes the connection between the HEAL services.

Format – DELETE  /api/accounts/< account_identifier >/connections/{srcServiceIdentifier}/{dstServiceIdentifier}

Input Parameters

TypeNameDescriptionSchemaMandatory/Optional
pathsrcServiceIdentifierIdentifier of the source service. Source service is the one from which the request starts.stringMandatory
pathdstServiceIdentifierIdentifier of the destination service. Destination service is the one which receives the request from Source.stringMandatory

Sample Input

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

Output JSON for Success

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

Output JSON for Failure

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

Supervisor

API Name: supervisors
Format: POST  /api/accounts/< account_identifier >/supervisors

JSON Format

{ “name”: “<Name for the Supervisor>”, “hostBoxName”: “<Hostname where supervisor is installed>”, “supervisorTypeName”: “UnixSupervisor”, “version”: “1.0”, “hostAddress”: “<IP Address where supervisor is installed>”, “status”: true }

Input Required

”NameDescriptionDefault ValuePredefined ValuesMandatoryMore InfonameName for the Supervisor––
YeshostBoxNameHostname where the supervisor is installed––
YessupervisorTypeNameUnixSupervisorUnixSupervisorUnixSupervisorYesversion111YesThe current version of the Supervisor is 1.0.hostAddressIP Address where the supervisor is installed––YesstatusTRUETRUE, FALSEYes

Sample JSON

{ “name”: “XRDB_Node1”, “hostBoxName”: “XRDB_Node1”, “supervisorTypeName”: “UnixSupervisor”, “version”: “1.0”, “hostAddress”: “192.1.1.101”, “status”: true }

Success Rest Response

{ “message”: “Successfully Created”, “responseStatus”: “SUCCESS”, }

Failure Rest Response

{ “message”: “Invalid tag”, “responseStatus”: “FAILURE”, }

Table of Contents