A notification is a message that is sent from the Application Services server when an application deployment, update, or teardown process is scheduled, started, and finished. The message contains details about the deployment type, what triggered the deployment, the deployment start time, the deployment end time, tenant name, business group name, and the deployment status.

With a notification, you can monitor the Application Services deployment task events and customize a task when an event begins. For example, you can send a message to notify a deployer that the application deployment task is complete.

You can also use a notification to create a monitoring system to monitor and report the deployment status.

Notification occurs across alll the tenants and cannot be done for a particular tenant. So a message is sent if a deployment occurs in any tenant.

Notification Registration

Receives notifications from the Application Services server. The notification registration includes the following processes.

  • Sends a Base64 encoded public key to the server. This process causes the server to allocate the use of a public key to create a signed certification. The server also allocates a queue on the RabbitMQ server. The response output contains two Base64 encoded X.509 certificates and RabbitMQ connection information.

  • Uses the client certificate as the client certificate for RabbitMQ communication.

  • Uses the root certificate as the authorized root for RabbitMQ communication.

Only a system administrator in Application Services can access this API.

HTTP Method

POST

URI Syntax

https://ApplicationServicesServerIP:8443/darwin/api/2.0/notification/register

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationServicesServerIP:8443/darwin/api/2.0/notification/register

Request

Table 1. Description for Request Message

Request Message

Description

clientPublicKey

Specifies the Base64 encoded public key to register queue.

{"clientPublicKey" :"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv8Mv3MiXRNxImFntlmd1Qki0fREcf1AsUV95fwUt8NH8Ke+hi2TqbLU8hhHD6tP0fTEhSs7yBha03148S6WrskAhzqD3SW7HaBpW01Dpg5oB/eIfVU2nmFY7s6D3DJ9s20YcjCcyP+ojXGGRYffsqNDjO03o4/YXWq6n8ad5hfLmveApRs4TGil8jwn7EuH7brtSb5fMyPHpmeYQp+clqPLmKOC0S0EO/fhoSHmVafhS23cv521b8SkeU8WVHXI8n0FwPZUJGG+PKxFAcf/8wZOV7XHKIhiiV++/CB79jC/+J1Cd+yRt4Er25QnCF+PnLk13/0bd95vdPOYNZNhGuwIDAQAB"}

Response

Table 2. Description for Response Messages

Response Message

Description

amqpUsername

Shows the user login for RabbitMq.

amqpPassword

Shows the password for RabbitMq.

amqpQueuename

Shows the queue name. After disconnecting from the RabbitMq server, this queue is deleted and a queue is created for a new call.

amqpHostname

Shows the RabbitMq server IP or host name.

clientCert

Shows the certificate that is created based on the public key sent with the REST API call.

rootCert

Shows the certificate that is created based on the RabbitMq server key.

{
   "errors":false,
   "messageList":[
 
   ],
   "amqpUsername":"appd_notifier",
   "amqpPassword":"darwin",
   "amqpQueuename":"appd.notification-b9507143-0fe9-42f5-b16d-a798afa01827",
   "amqpHostname":"192.0.2.255",
   "amqpPort":5671,
   "clientCert":"TUlJRGhUQ0NBbTJnQXdJQkFnSUdBVG15cEp6ZU1BMEdDU3FHU0liM0RRRUJCUVVBTUZJeElEQWVCZ05WQkFNTUYwRndjR3hwWTJGMGFXOXVJRVJwY21WamR
HOXlJRU5CTVIwd0d3WURWUVFMREJSQmNIQnNhV05oZEdsdmJpQkVhWEpsWTNSdmNqRVBNQTBHQTFVRUNnd0dWazEzWVhKbE1CNFhEVEV5TURreE1UQXdNRFExTmxvWERUTXlNRGt
3TmpBd01EUTFObG93Y1RFL01EMEdBMVVFQXd3MllYQndaQzV1YjNScFptbGpZWFJwYjI0dFlqazFNRGN4TkRNdE1HWmxPUzAwTW1ZMUxXSXhObVF0WVRjNU9HRm1ZVEF4T0RJM01
SMHdHd1lEVlFRTERCUkJjSEJzYVdOaGRHbHZiaUJFYVhKbFkzUnZjakVQTUEwR0ExVUVDZ3dHVmsxM1lYSmxNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0t
DQVFFQXY4TXYzTWlYUk54SW1GbnRsbWQxUWtpMGZSRWNmMUFzVVY5NWZ3VXQ4Tkg4S2UraGkyVHFiTFU4aGhIRDZ0UDBmVEVoU3M3eUJoYTAzMTQ4UzZXcnNrQWh6cUQzU1c3SGF
CcFcwMURwZzVvQi9lSWZWVTJubUZZN3M2RDNESjlzMjBZY2pDY3lQK29qWEdHUllmZnNxTkR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lDWm1xN2xNRVI4T
TEwOUpmV3lDM3Mrb3VxVmFVMy93VGRQZmNWUTAzTDdkdWd3Q0g4QnYvSmtDZmx6a081WFRtTHFDMlpEalZFVWZESDZwMmp4MCt0dVNMbXphOTRLMll6U053M1FaMlZtYXJER2VSa
1dxYmp5NGNkVXNuMjlyQi9IeEVRMUlFakRnY2hSVENreDArSjhNYXoyQUdlNXRYMTk5bHhRd1NTYXhGU2NIUmhEYkwyVXRadEh4aXFEZi9LUlY1ZnJRMmxGRE5JUUhwQ09hbVNzb
VFoMElUc25yaGVsbVBIbjcwUzFUVHhsTmhsNEw2SzA3Tg=="
}

Notification Unregistration

Unregisters the notification that was registered by the previous REST API.

HTTP Method

POST

URI Syntax

https://ApplicationServicesServerIP:8443/darwin/api/2.0/notification/unregister

Request

{
    "amqpQueuename": "appd.notification-b9507143-0fe9-42f5-b16d-a798afa01827"
}
Note:

This request uses the same ID that was included in the register response from the previous REST API.

Response

{
    "errors": false,
    "messageList": [
        {
            "messageType": "INFO",
            "message": "Successfully Unregistered.",
            "messageKey": "notification.unregister.success",
            "property": null
        }
    ]
}