/
REST Objects BNS

REST Objects BNS

5.0.0

The BNS object is part of the overall ServiceBroker Configuration object, in the following location:

A BNS object is used within the context of a REST Objects Modules (itself part of an REST Objects Configuration) to represent how the ServiceBroker Notification Service is configured, for the relevant tenant.

BNS Object Format

JSON Format
{
	"PushEndpoints": [
		{
			"Enabled": true,
			"JsonPath": "",
			"ServiceType": "",
			"ServiceURL": "",
			"Props": {
				"headers": {
					"Authorization": ""
				}
			}
		}
	],
	"InventoryPushEndpoints": [
		{
			"Enabled": true,
			"JsonPath": "",
			"ServiceType": "",
			"ServiceURL": "",
			"Props": {
				"headers": {
					"Authorization": ""
				}
			}
		}
	]
	"AckOnError": false,
	"EnableDispatchWorkItem": false
}

BNS Object Properties


PropertyTypeRequired?Description
PushEndpointsarrayYes

An array of objects, with each object defining the endpoint(s) that the ServiceBroker Notification Service should send each push notification to, for the relevant tenant.

Defining multiple endpoints for a tenant means that each push notification will be sent to each endpoint.


EnabledbooleanYes

When true, the endpoint is enabled; when false, the endpoint is disabled.

This allows PushEndpoints to be disabled (and later re-enabled) without having to delete the endpoint from the tenant's BNS object.


JsonPathstringNo

Endpoints may optionally have a JsonPath filter applied, to control which push notifications are to be sent.

Filtering is performed on the basis of the Work Item Notification object. For example:

  • To only include push notifications for regular jobs to the endpoint, the JsonPath filter could be set to:

    • $[?(@.WorkItemType==1)]
  • To exclude push notifications for breaks from the endpoint, the JsonPath filter could be set to:
    • $[?(@.WorkItemType!=3)]
  • To only include push notifications where the Work Item object for which the notification relates to is between 0 and 10, the JsonPath filter could be set to:
    • $[?(@.WorkItem.Priority<=10)]

ServiceTypestringYesThe endpoint service type. Currently, REST is the only supported endpoint service type, which causes an HTTP POST action to be made to the ServiceURL defined for the endpoint.

ServiceURLstringYesThe URL of the endpoint, when the endpoint is a REST ServiceType, including the required protocol (e.g. http:// or https://).

PropsobjectNoAn optional object defining additional properties for the endpoint.


headersobjectNoAn optional object containing additional supported HTTP headers for the endpoint, when the endpoint is a REST ServiceType.



AuthorizationstringNoAn optional value defining a value which should be sent to the REST endpoint as an Authorization header. This allows the ServiceBroker to pass the required authentication details to a REST endpoint, when required.

InventoryPushEndpoints

arrayYesTBC

EnabledbooleanYes

When true, the endpoint is enabled; when false, the endpoint is disabled.

This allows InventoryPushEndpoints to be disabled (and later re-enabled) without having to delete the endpoint from the tenant's BNS object.


JsonPathstringNo

Endpoints may optionally have a JsonPath filter applied, to control which push notifications are to be sent.

Filtering is performed on the basis of the (warning) Inventory Object? (warning). For example:

  • To only include push notifications for (warning) ??? (warning) to the endpoint, the JsonPath filter could be set to:

    • TBC
  • To exclude push notifications for (warning) ??? (warning) from the endpoint, the JsonPath filter could be set to:
    • ???
  • To only include push notifications where the (warning) Inventory Object? (warning) for which the notification relates to is between 0 and 10, the JsonPath filter could be set to:
    • ???

ServiceTypestringYesThe endpoint service type. Currently, REST is the only supported endpoint service type, which causes an HTTP POST action to be made to the ServiceURL defined for the endpoint.

ServiceURLstringYesThe URL of the endpoint, when the endpoint is a REST ServiceType, including the required protocol (e.g. http:// or https://).

PropsobjectNoAn optional object defining additional properties for the endpoint.


headersobjectNoAn optional object containing additional supported HTTP headers for the endpoint, when the endpoint is a REST ServiceType.



AuthorizationstringNoAn optional value defining a value which should be sent to the REST endpoint as an Authorization header. This allows the ServiceBroker to pass the required authentication details to a REST endpoint, when required.
AckOnErrorbooleanYes

The AckOnError settings controls how push notification failures by the ServiceBroker Notification Service are handled for the relevant tenant.

When set to false (the default), in the event of a push notification failure, the Notification Service will wait, and then retry once more. If this retry also fails, then the push notification will be discarded, and the service will move on to processing the next push notification.

When set to true, continue to retry a push notification failure until it succeeds, and will not move on to any other push notification processing until the failed push notification has been successfully completed. This ensures that all push notifications will be delivered, but means that queue processing will be halted by a failed end service point. This setting should be used with caution.

EnableDispatchWorkItem

booleanNoReserved field not in use; setting does not affect ServiceBroker behavior.

Related content

Notification Service APIs
Notification Service APIs
More like this
REST Notification Changed Items
REST Notification Changed Items
More like this
REST Objects Work Item Notification
REST Objects Work Item Notification
More like this