Create a Service Key
POST /v2/service_keys
Request
Route
POST /v2/service_keys
Body
Name |
Description |
Default |
Valid Values |
Example Values |
service_instance_guid
|
The guid of the service instance for which to create service key
|
|
|
|
name
|
The name of the service key
|
|
|
|
parameters
|
Arbitrary parameters to pass along to the service broker. Must be a JSON object
|
|
|
|
{
"service_instance_guid": "9465c478-2d2a-4a97-adcf-033daeeb12ac",
"name": "name-127"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/service_keys" -d '{
"service_instance_guid": "9465c478-2d2a-4a97-adcf-033daeeb12ac",
"name": "name-127"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIyIiwiZW1haWwiOiJlbWFpbC0yMkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDY2MDA4ODgyfQ.4l8JG9IgtGUSz6e33Ma9cgosfHfzo0VaeOVNVm2QdFs" \
-H "Host: example.org" \
-H "Content-Type: application/json" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "03e514de-acc9-4803-a696-641c3aed6219",
"url": "/v2/service_keys/03e514de-acc9-4803-a696-641c3aed6219",
"created_at": "2016-06-08T16:41:22Z",
"updated_at": "2016-06-08T16:41:26Z"
},
"entity": {
"name": "name-127",
"service_instance_guid": "9465c478-2d2a-4a97-adcf-033daeeb12ac",
"credentials": {
"creds-key-3": "creds-val-3"
},
"service_instance_url": "/v2/service_instances/9465c478-2d2a-4a97-adcf-033daeeb12ac",
"service_key_parameters_url": "/v2/service_keys/03e514de-acc9-4803-a696-641c3aed6219/parameters"
}
}
Headers