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.eyJ1c2VyX2lkIjoidWFhLWlkLTg3IiwiZW1haWwiOiJlbWFpbC04MEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE2NTI2NzAwfQ.HO6ste0LWV2Rm_wVCPVAKo2sTc5sWh03hopylWks2q4
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.eyJ1c2VyX2lkIjoidWFhLWlkLTg3IiwiZW1haWwiOiJlbWFpbC04MEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE2NTI2NzAwfQ.HO6ste0LWV2Rm_wVCPVAKo2sTc5sWh03hopylWks2q4" \
	-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/7831de29-3267-4ebb-8238-3e6cff8d822f
X-VCAP-Request-ID: 7bc8c572-2530-4c28-b464-d0cc52e580c8
Content-Length: 347
X-Content-Type-Options: nosniff
X-Cf-Warnings: Warning%3A+Warning+message+may+go+here.

Status

201 Created

Body

{
  "metadata": {
    "guid": "7831de29-3267-4ebb-8238-3e6cff8d822f",
    "created_at": "2014-11-13T23:38:20+00:00",
    "updated_at": null,
    "url": "/v2/service_brokers/7831de29-3267-4ebb-8238-3e6cff8d822f"
  },
  "entity": {
    "name": "service-broker-name",
    "broker_url": "https://broker.example.com",
    "auth_username": "admin"
  }
}