Skip to main content
Version: 52.0.0

Configure a Callback URL

It is possible to configure the anynines Service Broker with an URL which will be called when different events occur. For all events the same URL will be called with a HTTP POST request. The HTTP body of the POST request differs for each event.The following table shows the different events and the HTTP body that will be send to the callback URL for the corresponding event.

Configure Callback URL

To configure a callback URL, insert the following value in your iaas-config file:

broker_callback_url: <your-url>

Once you have configured the broker_callback_url value in the iaas-config deploy all services (e.g. postgresql-service/postgresql-service.yml) with the ops/broker_callback.yml ops file.

Note: Some values depend on the cloud-config of the BOSH director. The examples below used a BOSH lite cloud-config. This is why you see "not defined in BOSH cloud config" in some fields.

Request Tracing

When creating, updating or deleting a service instance via Broker API, it is possible to pass a request id. This id will then be present in the callbacks.

curl -X PUT <broker-url>/v2/service_instances/0f47392f-5874-40cc-a399-7f9616a82b49 -d '{"tracing_id":"12345678", "service_id": "7ee52a02-8839-43c2-a550-728ad736bbda", "plan_id":"eb79b44b-90ec-4bd1-9cb5-3d1e52f1a6ab"}'

Events and their HTTP Post Body

Service Instance creation started

{
"service_instance_guid":"35307a08-a377-11e7-abc4-cec278b6b50a",
"service_plan_guid":"eb79b44b-90ec-4bd1-9cb5-3d1e52f1a6ab",
"status":"CREATING",
"created_at":"2017-09-27T14:37:25.238Z",
"nodes":[
{
"vm_identifier":"pg-0",
"cpu":"not defined in BOSH cloud config",
"ephemeral_disk":"not defined in BOSH cloud config",
"persistent_disk":2048,
"memory":"not defined in BOSH cloud config",
"instance_type":"not defined in BOSH cloud config",
"hostname":"d448b93.pg-0.node.a9svs"
}
]
}

Service Instance creation finished successful

{
"service_instance_guid":"35307a08-a377-11e7-abc4-cec278b6b50a",
"service_plan_guid":"eb79b44b-90ec-4bd1-9cb5-3d1e52f1a6ab",
"status":"CREATED",
"created_at":"2017-09-27T14:41:06.193Z",
"nodes":[
{
"vm_identifier":"pg-0",
"cpu":"not defined in BOSH cloud config",
"ephemeral_disk":"not defined in BOSH cloud config",
"persistent_disk":2048,
"memory":"not defined in BOSH cloud config",
"instance_type":"not defined in BOSH cloud config",
"hostname":"d448b93.pg-0.node.a9svs"
}
]
}

Service Instance creation failed

{
"service_instance_guid":"35307a08-a377-11e7-abc4-cec278b6b50a",
"service_plan_guid":"eb79b44b-90ec-4bd1-9cb5-3d1e52f1a6ab",
"status":"CREATE_FAILED",
"created_at":"2017-09-27T14:41:06.193Z",
"nodes":[
{
"vm_identifier":"pg-0",
"cpu":"not defined in BOSH cloud config",
"ephemeral_disk":"not defined in BOSH cloud config",
"persistent_disk":2048,
"memory":"not defined in BOSH cloud config",
"instance_type":"not defined in BOSH cloud config",
"hostname":"d448b93.pg-0.node.a9svs"
}
]
}

Service Instance update started

{
"service_instance_guid":"35307a08-a377-11e7-abc4-cec278b6b50a",
"service_plan_guid":"6b1973db-e057-4a71-9832-a4b3f27a0d8f",
"status":"UPDATING",
"created_at":"2017-09-27T15:01:16.302Z",
"nodes":[
{
"vm_identifier":"pg-0",
"cpu":"not defined in BOSH cloud config",
"ephemeral_disk":4096,
"persistent_disk":6144,
"memory":"not defined in BOSH cloud config",
"instance_type":"not defined in BOSH cloud config",
"hostname":"d448b93.pg-0.node.a9svs"
}
]
}

Service Instance update finished successful

{
"service_instance_guid":"35307a08-a377-11e7-abc4-cec278b6b50a",
"service_plan_guid":"6b1973db-e057-4a71-9832-a4b3f27a0d8f",
"status":"UPDATED",
"created_at":"2017-09-27T15:04:02.996Z",
"nodes":[
{
"vm_identifier":"pg-0",
"cpu":"not defined in BOSH cloud config",
"ephemeral_disk":4096,
"persistent_disk":6144,
"memory":"not defined in BOSH cloud config",
"instance_type":"not defined in BOSH cloud config",
"hostname":"d448b93.pg-0.node.a9svs"
}
]
}

Service Instance update failed

{
"service_instance_guid":"35307a08-a377-11e7-abc4-cec278b6b50a",
"service_plan_guid":"6b1973db-e057-4a71-9832-a4b3f27a0d8f",
"status":"UPDATE_FAILED",
"created_at":"2017-09-27T15:04:02.996Z",
"nodes":[
{
"vm_identifier":"pg-0",
"cpu":"not defined in BOSH cloud config",
"ephemeral_disk":4096,
"persistent_disk":6144,
"memory":"not defined in BOSH cloud config",
"instance_type":"not defined in BOSH cloud config",
"hostname":"d448b93.pg-0.node.a9svs"
}
]
}

Service Instance deletion started

{
"service_instance_guid":"35307a08-a377-11e7-abc4-cec278b6b50a",
"service_plan_guid":"6b1973db-e057-4a71-9832-a4b3f27a0d8f",
"status":"DELETING",
"created_at":"2017-09-27T15:01:16.302Z",
"nodes":[
{
"vm_identifier":"pg-0",
"cpu":"not defined in BOSH cloud config",
"ephemeral_disk":4096,
"persistent_disk":6144,
"memory":"not defined in BOSH cloud config",
"instance_type":"not defined in BOSH cloud config",
"hostname":"d448b93.pg-0.node.a9svs"
}
]
}

Service Instance deletion finished successful

{
"service_instance_guid":"35307a08-a377-11e7-abc4-cec278b6b50a",
"service_plan_guid":"6b1973db-e057-4a71-9832-a4b3f27a0d8f",
"status":"DELETED",
"created_at":"2017-09-27T15:04:02.996Z",
"nodes":[
{
"vm_identifier":"pg-0",
"cpu":"not defined in BOSH cloud config",
"ephemeral_disk":4096,
"persistent_disk":6144,
"memory":"not defined in BOSH cloud config",
"instance_type":"not defined in BOSH cloud config",
"hostname":"d448b93.pg-0.node.a9svs"
}
]
}

Service Instance deletion failed

{
"service_instance_guid":"35307a08-a377-11e7-abc4-cec278b6b50a",
"service_plan_guid":"6b1973db-e057-4a71-9832-a4b3f27a0d8f",
"status":"DELETE_FAILED",
"created_at":"2017-09-27T15:04:02.996Z",
"nodes":[
{
"vm_identifier":"pg-0",
"cpu":"not defined in BOSH cloud config",
"ephemeral_disk":4096,
"persistent_disk":6144,
"memory":"not defined in BOSH cloud config",
"instance_type":"not defined in BOSH cloud config",
"hostname":"d448b93.pg-0.node.a9svs"
}
]
}