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": "c786144b-a95c-4827-adb3-fe3b4269cec8",
"name": "name-1692"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/service_keys" -d '{
"service_instance_guid": "c786144b-a95c-4827-adb3-fe3b4269cec8",
"name": "name-1692"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMzNiIsImVtYWlsIjoiZW1haWwtMjA1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDgwMzg5NjJ9.UbSnw8sPxMvI4lM4Z7gD4dQ3B0Sl1yURqGL72NUJRvw" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "1b0a5e68-9564-45b8-b226-7140dd11962b",
"url": "/v2/service_keys/1b0a5e68-9564-45b8-b226-7140dd11962b",
"created_at": "2015-11-13T17:02:42Z",
"updated_at": null
},
"entity": {
"name": "name-1692",
"service_instance_guid": "c786144b-a95c-4827-adb3-fe3b4269cec8",
"credentials": {
"creds-key-447": "creds-val-447"
},
"service_instance_url": "/v2/service_instances/c786144b-a95c-4827-adb3-fe3b4269cec8"
}
}
Headers