Home
Version 3
Service Brokers API

Service Brokers API

can create a Private 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
space_guid Guid of a space the broker is scoped to. Space developers are able to create service brokers scoped to a space.
{
  "name": "service-broker-name",
  "broker_url": "https://broker.example.com",
  "auth_username": "admin",
  "auth_password": "secretpassw0rd",
  "space_guid": "dd2cc86f-5796-4727-9585-f461dcce9be1"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ1MyIsImVtYWlsIjoiZW1haWwtMzIxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQ3ODI5NDh9.bb6JQr8gn_oxdPCmnrtKI4zXBY4b4k8ZXMjj7agW0EI
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",
  "space_guid": "dd2cc86f-5796-4727-9585-f461dcce9be1"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ1MyIsImVtYWlsIjoiZW1haWwtMzIxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQ3ODI5NDh9.bb6JQr8gn_oxdPCmnrtKI4zXBY4b4k8ZXMjj7agW0EI" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "e250479e-17cf-4ca2-9d57-c5b047b21a4d",
    "created_at": "2015-10-07T00:35:47Z",
    "updated_at": null,
    "url": "/v2/service_brokers/e250479e-17cf-4ca2-9d57-c5b047b21a4d"
  },
  "entity": {
    "name": "service-broker-name",
    "broker_url": "https://broker.example.com",
    "auth_username": "admin",
    "space_guid": "dd2cc86f-5796-4727-9585-f461dcce9be1"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_brokers/e250479e-17cf-4ca2-9d57-c5b047b21a4d
X-VCAP-Request-ID: 4b39daa2-e582-4cfe-96f0-d88806f50701
Content-Length: 400
X-Content-Type-Options: nosniff
X-Cf-Warnings: Warning%3A+Warning+message+may+go+here.