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.eyJ1c2VyX2lkIjoidWFhLWlkLTE3MyIsImVtYWlsIjoiZW1haWwtMTI1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTk5ODk5NzF9.4ub4W6D-ro0C10mykLIYchfkGT2bXjWAuHjl_Sf4aiI
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.eyJ1c2VyX2lkIjoidWFhLWlkLTE3MyIsImVtYWlsIjoiZW1haWwtMTI1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTk5ODk5NzF9.4ub4W6D-ro0C10mykLIYchfkGT2bXjWAuHjl_Sf4aiI" \
	-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/76a965ee-960b-4cbb-a47a-33eed1c3d1c2
X-VCAP-Request-ID: d105c55a-c0f3-4562-962a-9e3dfc34cdc9
Content-Length: 347
X-Content-Type-Options: nosniff
X-Cf-Warnings: Warning%3A+Warning+message+may+go+here.

Status

201 Created

Body

{
  "metadata": {
    "guid": "76a965ee-960b-4cbb-a47a-33eed1c3d1c2",
    "created_at": "2014-12-24T01:39:31+00:00",
    "updated_at": null,
    "url": "/v2/service_brokers/76a965ee-960b-4cbb-a47a-33eed1c3d1c2"
  },
  "entity": {
    "name": "service-broker-name",
    "broker_url": "https://broker.example.com",
    "auth_username": "admin"
  }
}