Home
Version 3
User Provided Service Instances API

User Provided Service Instances API

Updating a User Provided Service Instance

PUT /v2/user_provided_service_instances/:guid

Request

Route

PUT /v2/user_provided_service_instances/2f793c83-a955-4aff-a4a1-5189e492cf8b

Body

Name Description Default Valid Values Example Values
name A name for the service instance
  • my-user-provided-instance
syslog_drain_url The url for the syslog_drain to direct to
  • syslog://example.com
credentials A hash that can be used to store credentials
  • {:somekey=>"somevalue"}
{
  "credentials": {
    "somekey": "somenewvalue"
  }
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM4OCIsImVtYWlsIjoiZW1haWwtMjkwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDk1MzE1Mzd9.89trQET2MjiJ8_CgzyegpB9p7AEyO7kOlFSkEeLo4G4
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/user_provided_service_instances/2f793c83-a955-4aff-a4a1-5189e492cf8b" -d '{
  "credentials": {
    "somekey": "somenewvalue"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM4OCIsImVtYWlsIjoiZW1haWwtMjkwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDk1MzE1Mzd9.89trQET2MjiJ8_CgzyegpB9p7AEyO7kOlFSkEeLo4G4" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "2f793c83-a955-4aff-a4a1-5189e492cf8b",
    "url": "/v2/user_provided_service_instances/2f793c83-a955-4aff-a4a1-5189e492cf8b",
    "created_at": "2015-11-30T23:38:57Z",
    "updated_at": "2015-11-30T23:38:57Z"
  },
  "entity": {
    "name": "name-2451",
    "credentials": {
      "somekey": "somenewvalue"
    },
    "space_guid": "058fe90e-26bd-4d85-b324-76f8c07801b4",
    "type": "user_provided_service_instance",
    "syslog_drain_url": "https://foo.com/url-100",
    "route_service_url": null,
    "space_url": "/v2/spaces/058fe90e-26bd-4d85-b324-76f8c07801b4",
    "service_bindings_url": "/v2/user_provided_service_instances/2f793c83-a955-4aff-a4a1-5189e492cf8b/service_bindings",
    "routes_url": "/v2/user_provided_service_instances/2f793c83-a955-4aff-a4a1-5189e492cf8b/routes"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 
Content-Length: 824
X-Content-Type-Options: nosniff