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": "775b6226-e9d4-4ed1-91ed-88e61a5ea051",
"name": "name-2331"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/service_keys" -d '{
"service_instance_guid": "775b6226-e9d4-4ed1-91ed-88e61a5ea051",
"name": "name-2331"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQxMiIsImVtYWlsIjoiZW1haWwtMjc0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjM2MTg3Mjd9.T7PUg65bnQ3zQN1i5XZmXtxN0Sh0CvSoM1WTzPkTs1k" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "65ca509c-91df-486c-980a-6ba2d85b42d5",
"url": "/v2/service_keys/65ca509c-91df-486c-980a-6ba2d85b42d5",
"created_at": "2016-05-12T00:45:27Z",
"updated_at": null
},
"entity": {
"name": "name-2331",
"service_instance_guid": "775b6226-e9d4-4ed1-91ed-88e61a5ea051",
"credentials": {
"creds-key-61": "creds-val-61"
},
"service_instance_url": "/v2/service_instances/775b6226-e9d4-4ed1-91ed-88e61a5ea051"
}
}
Headers