vRealize Automation Notification Service API |
Notification Service API Specification
What Is the Notification Service REST API?
The notification service supports configuring and sending notifications for several types of events, such as the successful completion of a catalog request or issuance of a catalog request that requires approval.
Typical Use Cases
By using the notification service:
-
System administrators can configure global email servers that process email notifications using the NotificationProvider resource.
-
Tenant administrators can override the system default servers, or add their own servers if no global servers are specified.
Tenant administrators select which events will cause notifications to be sent to users in their tenants using the NotificationScenarioConfiguration resource. Each component, such as the service catalog or IaaS, can define events that can trigger notifications. Notifications for all event are enabled by default.
Each user can choose whether to receive notifications using the UserNotificationPreference resource. Users either receive all notifications configured by the tenant administrator or no notifications, they do not have fine-grained control over which notifications to receive.
Some emails have links that users can use to respond to the notification. For example, a notification about a request that requires approval can have one link for approving the request and one for rejecting it. When a user clicks one of the links, a new email opens an automatically generated subject line. The user can send the email to complete the approval.
See the documentation for each REST resource for more details.
Key Concepts
Tenant Id
Because vRA supports multitenancy, some notification URIs must reference the tenantId
that you are interested in. Exceptions include the system admin APIs,` which can be shared across tenants.
Use the URL attribute of your tenant for all URIs requiring a tenantId
. For example, if your "Development" tenant accesses vRA via the URL https://vcac.server/vcac/org/dev, then dev
is what you should use when the API calls for a tenantId
.
Notification Preferences
Each user can choose whether to receive notifications using the UserNotificationPreference resource. Users either receive all notifications configured by the tenant administrator or no notifications, they do not have fine-grained control over which notifications to receive.
In addition to specifying a preference whether to receive email or not, users can specify the locale in which email should be sent to the user.
API Usage Examples
This section gives usage examples for requesting data for all tenant notification providers and for creating a notification provider.
Requesting Data for All Notification Providers
Example Request
Be sure to replace ${tenantId} appropriately:
GET /api/notifications/tenants/{tenantId}/providers?offset=0&limit=10
Accept: application/json
Example Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"links": [],
"content": [{
"@type": "EmailNotificationProvider",
"id": "4bd085ca-09b1-47d5-8fce-695163e6cc08",
"version": 0,
"name": "vRA global, outbound email notification provider",
"description": null,
"type": "EMAIL_PROVIDER",
"providerDirection": "OUTBOUND",
"providerMode": {
"role": "GLOBAL",
"overriddenGlobalProviderId": null
},
"serverName": "smtp.example.com",
"protocol": "SMTP",
"port": 25,
"sslEnabled": false,
"username": "vcac",
"password": null,
"authenticationRequired": true,
"emailAddress": "vcac@example.com",
"deleteMessagesAfterRead": false,
"folder": "INBOX",
"selfSignedCertificateAccepted": true
}],
"metadata": {
"size": 10,
"totalElements": 1,
"totalPages": 1,
"number": 1,
"offset": 0
}
}
Creating a Notification Provider
Example Request
Be sure to replace ${tenantId} appropriately:
POST /api/notifications/tenants/{tenantId}/providers
Accept: application/json
Content-Type: application/json;charset=UTF-8
{
"@type": "EmailNotificationProvider",
"name": "vRA global, outbound email notification provider",
"type": "EMAIL_PROVIDER",
"providerDirection": "OUTBOUND",
"providerMode": {
"role": "GLOBAL"
},
"serverName": "smtp.example.com",
"protocol": "SMTP",
"port": 25,
"sslEnabled": false,
"emailAddress": "vcac@example.com",
"selfSignedCertificateAccepted": true,
"username": "vcac",
"password": "password"
}
Example Response
Response Headers
{
HTTP/1.1 201 Created
Date = Fri, 04 Apr 2014 17:04:10 GMT
ETag = "0"
Location = https://vcac.server.com/notification-service/api/notifications/global/providers/df29347f-6795-41c0-aab7-a1ca9f317ad9
Content-Type = application/json;charset=UTF-8
Content-Length = 0
Vary = Accept-Encoding,User-Agent
Keep-Alive = timeout=15, max=100
Connection = Keep-Alive
}
Related Documentation
Related SDKs
Related Sample Code
- VMware vRealize Automation PluginJenkins vRealize Automation Plugin The vRealize Automation Jenkins plugin enables Jenkins to provision vRealize Automation 7 Blueprints. Requirements Jenkins 1.58+ Java 8 to compile plugin or Java 7 ...vRealize Automation Java
- vRealize Automation API Samples for PostmanvRealize Automation API Samples for Postman Overview The vRealize Automation REST API provides consumers and administrators access to all services in its service catalog that support the vRealize Auto ...vRealize Automation POSTMAN Collection
- Project BosphorusProject Bosphorus Background This project is aimed at providing a custom portal framework for vRealize Automation (vRA) along with a reference implementation. It is intended for advanced users/develop ...vRealize Automation Java
- vRealize Automation Reference ApplicationvRealize Automation Reference Application Overview This is a sample project that demonstrates how to create a simple self-service portal for vRealize Automation using only RESTful APIs. You are encour ...vRealize Automation JavaScript
- chef-client example of a bootstrap install on Ubuntu 16.04A basic example to install the chef-client via the install.sh from Chef Software. This should be noted that this only requires wget and bash, so this can work for CentOS, RHEL, debian, Ubuntu, and the ...vRealize Automation vRA Blueprint
- chef-client example of a bootstrap install on Windows using Powershell 3 and upA basic example to install the chef-client via the install.ps1 from Chef Software. This should be noted that this requires Powershell and should work on any version of Windows with Powershell 3+. You ...vRealize Automation vRA Blueprint
- Find all VMs with a particular property value in vRAFind all VMs with a particular property value in vRAvRealize Automation vRealize Orchestrator Plug-in SDK JavaScript
- Rename a vRA IaaS virtual machineRename a vRA IaaS virtual machinevRealize Automation vRealize Orchestrator Plug-in SDK JavaScript
- vRA 7 and above prepare_vra_template.ps1Powershell script designed to deploy the needed agents on your windows template. This mimics the prepare_vra_template.sh file for linux and will deploy java, bootstrap and gugent agents from the vRA a ...vRealize Automation PowerShell
- Get the Reservation of a vRA VMGet the Reservation of a vRA VMvRealize Automation vRealize Orchestrator Plug-in SDK JavaScript
-
- Get the Reservation Policy ID of a vRA ReservationGet the ID of the Reservation Policy of a vRA ReservationvRealize Automation vRealize Orchestrator Plug-in SDK JavaScript
- CentOS Base vRA BlueprintSimple vRA Blueprint for 64-bit CentOS 7.0 VMvRealize Automation vRA Blueprint
- Kubernetes as a Service BlueprintThis blueprint currently requires RHEL/CENTOS 7 Atomic. I do plan to port this to Photon OS as soon as it is GA. Live demo of this solution here > https://youtu.be/X8QfAQmcVjA Full instructions to in ...vRealize Automation vRA Blueprint
- Create Cloud management portal based on VRA APIsThis sample web app shows how to create your own cloud management portal based on vRealize Automation Rest APIs. Key part of this sample is the javascript file https://github.com/chicm/vraclient/blob/ ...vRealize Automation JavaScript
- Add Disk and New SCSI AdapaterSimple vRO package that has the workflows needed to deploy a new disk, to the same datastore as the chosen VM while adding the next available SCSI adapter. See this post for the best usagevRealize Orchestrator Plug-in SDK vRO Package
- prepare_vra_template.ps1 7.0.1UPDATED Script - for combined 7.0, 7.0.1, and 7.1 go to https://developercenter.vmware.com/samples?id=1136vRealize Automation PowerShell
- Chef Server BlueprintThis is for RHEL/CENTOS7 See my guide here for instruction on importing this to your environment.vRealize Automation vRA Blueprint
- vRealize Automation - Catalog ServicevRealize Automation - Catalog Service The catalog service REST API is designed to be used by the consumers of the service catalog; for example, an end user who wants to request a catalog item would be ...api_vra_catalog vRealize Automation api_vra_composition POSTMAN Collection
- Set given vCAC Property on vSphere VMSets a given vCAC Property on vSphere VM. Input is the vSphere VM Name.vRealize Orchestrator Plug-in SDK vRO Workflow