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": "1a35eee6-ab4b-418b-a402-6f1168e871e1"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2MCIsImVtYWlsIjoiZW1haWwtMTg2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDE2NjI2MDh9.2mzyzAK7S00IdhTEzKo4yzTp34Gt-WPKF_ecsdG56Yw
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": "1a35eee6-ab4b-418b-a402-6f1168e871e1"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2MCIsImVtYWlsIjoiZW1haWwtMTg2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDE2NjI2MDh9.2mzyzAK7S00IdhTEzKo4yzTp34Gt-WPKF_ecsdG56Yw" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "793760ec-758d-41ed-bd03-4620aa252d67",
    "created_at": "2015-08-31T21:50:08Z",
    "updated_at": null,
    "url": "/v2/service_brokers/793760ec-758d-41ed-bd03-4620aa252d67"
  },
  "entity": {
    "name": "service-broker-name",
    "broker_url": "https://broker.example.com",
    "auth_username": "admin",
    "space_guid": "1a35eee6-ab4b-418b-a402-6f1168e871e1"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_brokers/793760ec-758d-41ed-bd03-4620aa252d67
X-VCAP-Request-ID: e91fc5ec-15a2-40a3-8659-ccfffb3cb741
Content-Length: 400
X-Content-Type-Options: nosniff
X-Cf-Warnings: Warning%3A+Warning+message+may+go+here.