Home
Version 3
Service Brokers API

Service Brokers API

Create a Service Broker

POST /v2/service_brokers

Request

Route

POST /v2/service_brokers

Body

Name Description Default Valid Values Example Values
name The name of the service broker.
  • service-broker-name
broker_url The URL of the service broker.
  • https://broker.example.com
auth_username The username with which to authenticate against the service broker.
  • admin
auth_password The password with which to authenticate against the service broker.
  • secretpassw0rd
{
  "name": "service-broker-name",
  "broker_url": "https://broker.example.com",
  "auth_username": "admin",
  "auth_password": "secretpassw0rd"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMyIiwiZW1haWwiOiJlbWFpbC0zMkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDMyNzc0OTc5fQ.UZ6YX_7FgY-0A8xRzs9fI4O0dnnAU0LSLl72KACwdwE
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/service_brokers" -d '{
  "name": "service-broker-name",
  "broker_url": "https://broker.example.com",
  "auth_username": "admin",
  "auth_password": "secretpassw0rd"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMyIiwiZW1haWwiOiJlbWFpbC0zMkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDMyNzc0OTc5fQ.UZ6YX_7FgY-0A8xRzs9fI4O0dnnAU0LSLl72KACwdwE" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "0e575054-133e-48e4-9f2d-5b8213d1d1a4",
    "created_at": "2015-05-21T01:02:59Z",
    "updated_at": null,
    "url": "/v2/service_brokers/0e575054-133e-48e4-9f2d-5b8213d1d1a4"
  },
  "entity": {
    "name": "service-broker-name",
    "broker_url": "https://broker.example.com",
    "auth_username": "admin"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_brokers/0e575054-133e-48e4-9f2d-5b8213d1d1a4
X-VCAP-Request-ID: 9398c01b-f4bb-4765-8b3d-65926a183ef0
Content-Length: 342
X-Content-Type-Options: nosniff
X-Cf-Warnings: Warning%3A+Warning+message+may+go+here.