Home
Version 3
Service Brokers API

Service Brokers API

Create a Service Broker

POST /v2/service_brokers

Fields

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

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIyMCIsImVtYWlsIjoiZW1haWwtMTYxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjI5OTA4NzV9.GHdKvK0FFnAZ3xgaLPTitaZFRj0IAj-FxMzP9Sim2wc
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

POST /v2/service_brokers

Body

{
  "name": "service-broker-name",
  "broker_url": "https://broker.example.com",
  "auth_username": "admin",
  "auth_password": "secretpassw0rd"
}

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.eyJ1c2VyX2lkIjoidWFhLWlkLTIyMCIsImVtYWlsIjoiZW1haWwtMTYxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjI5OTA4NzV9.GHdKvK0FFnAZ3xgaLPTitaZFRj0IAj-FxMzP9Sim2wc" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_brokers/5ead0e72-fbdd-4b3e-8378-c2afd675ede4
X-VCAP-Request-ID: 4ef9e355-4d44-4e05-a85c-32c792909dfc
Content-Length: 342
X-Content-Type-Options: nosniff
X-Cf-Warnings: Warning%3A+Warning+message+may+go+here.

Status

201 Created

Body

{
  "metadata": {
    "guid": "5ead0e72-fbdd-4b3e-8378-c2afd675ede4",
    "created_at": "2015-01-27T19:14:35Z",
    "updated_at": null,
    "url": "/v2/service_brokers/5ead0e72-fbdd-4b3e-8378-c2afd675ede4"
  },
  "entity": {
    "name": "service-broker-name",
    "broker_url": "https://broker.example.com",
    "auth_username": "admin"
  }
}