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.eyJ1c2VyX2lkIjoidWFhLWlkLTM1MiIsImVtYWlsIjoiZW1haWwtMjU0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQ0NzE3MDh9.AxyT26eIceNLrYwN1CL0siE_8OVGj2IuikK6TtJVmbA
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.eyJ1c2VyX2lkIjoidWFhLWlkLTM1MiIsImVtYWlsIjoiZW1haWwtMjU0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQ0NzE3MDh9.AxyT26eIceNLrYwN1CL0siE_8OVGj2IuikK6TtJVmbA" \
	-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/73114846-6f9a-4edc-8e3f-e3ea655cc70a
X-VCAP-Request-ID: 2223c4af-7509-4339-a896-1285acfb5468
Content-Length: 342
X-Content-Type-Options: nosniff
X-Cf-Warnings: Warning%3A+Warning+message+may+go+here.

Status

201 Created

Body

{
  "metadata": {
    "guid": "73114846-6f9a-4edc-8e3f-e3ea655cc70a",
    "created_at": "2015-02-13T22:35:08Z",
    "updated_at": null,
    "url": "/v2/service_brokers/73114846-6f9a-4edc-8e3f-e3ea655cc70a"
  },
  "entity": {
    "name": "service-broker-name",
    "broker_url": "https://broker.example.com",
    "auth_username": "admin"
  }
}