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": "02dbdbc6-2a8e-4eb3-8f19-cdc6ddbf5aef",
"name": "name-2107"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/service_keys" -d '{
"service_instance_guid": "02dbdbc6-2a8e-4eb3-8f19-cdc6ddbf5aef",
"name": "name-2107"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMxOCIsImVtYWlsIjoiZW1haWwtMjIxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQ3ODI5NDB9._yCZRUSoTSqWa8id_qxlXdOCdGFTrNXQi5WJV08kERg" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "0ad58f21-6a76-435a-8c02-702cf65d4058",
"url": "/v2/service_keys/0ad58f21-6a76-435a-8c02-702cf65d4058",
"created_at": "2015-10-07T00:35:40Z",
"updated_at": null
},
"entity": {
"name": "name-2107",
"service_instance_guid": "02dbdbc6-2a8e-4eb3-8f19-cdc6ddbf5aef",
"credentials": {
"creds-key-492": "creds-val-492"
},
"service_instance_url": "/v2/service_instances/02dbdbc6-2a8e-4eb3-8f19-cdc6ddbf5aef"
}
}
Headers