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
Input Parameters
An application can have one or more Services. To create multiple services, add multiple “tags” object in the JSON.
Name | Description | Default Value | Predefined Values | Mandatory | More Info |
identifier | An identifier for the Application | – | – | No | If you want to auto-generate the identifier by Heal, do not provide this parameter in the JSON. |
name | Name for the Application | – | – | Yes | Name must unique in the Account. |
Object – tags | |||||
identifier | Name of the service | – | – | Yes | Name must unique in the Account. |
name | The name used must be Controller | Controller | – | Yes | Do not change the value. |
subTypeName | Sub Type Name of the Tag | Services | – | Yes | Do not change the value. |
layer | Layer under which the Service must be listed | – | app_service, web_service, db_service | Yes | Choose 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:
Success Rest Response
Failure Rest response
Considering wrong Account identifier was used in the addApplication API, response is as follows
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
Input Required
Name | Description | Default Value | Predefined Values | Mandatory | More Info |
sourceServiceName | Identifier of the source service | – | – | Yes | Service from which the request starts. |
isDiscovery | Identifies if the connection between the services is discovered. | 0 | 0, 1 | Yes | 0 – Connection created manually 1 – Connection created by the discovery |
destinationServiceName | Identifier of the destination service | – | – | Yes | Service which receives the request from Source. |
Sample JSON
For the FlightBooking application, the services can be connected using the following sample JSON.
Success Rest Response
Failure Rest response
Considering non-existing source was used in the add Connections API, the response is as follows:
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
Type | Name | Description | Schema | Mandatory/Optional |
body | sourceServiceIdentifier | Identifier of the source service. Source service is the one from which the request starts. | string | Mandatory |
body | destinationServiceIdentifier | Identifier of the destination service. Destination service is the one which receives the request from Source. | string | Mandatory |
body | discovery | Identifies 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 | integer | Mandatory |
Sample Input JSON
Output JSON for Success
{
“message”: “Operation successfully completed.”,
“responseStatus”: “SUCCESS”,
“data”: null
}
Output JSON for Failure
B) Removing a Connection
This removes the connection between the HEAL services.
Format – DELETE /api/accounts/< account_identifier >/connections/{srcServiceIdentifier}/{dstServiceIdentifier}
Input Parameters
Type | Name | Description | Schema | Mandatory/Optional |
path | srcServiceIdentifier | Identifier of the source service. Source service is the one from which the request starts. | string | Mandatory |
path | dstServiceIdentifier | Identifier of the destination service. Destination service is the one which receives the request from Source. | string | Mandatory |
Sample Input
Output JSON for Success
Output JSON for Failure
Supervisor
API Name: supervisors
Format: POST /api/accounts/< account_identifier >/supervisors
JSON Format
Input Required
Sample JSON
Success Rest Response
Failure Rest Response