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/57e99558-64a7-4613-bfe8-49b86d798dca

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.eyJ1c2VyX2lkIjoidWFhLWlkLTQyMSIsImVtYWlsIjoiZW1haWwtMzEzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzY4Mjk4MDJ9.6Ps2S-BbI9k0Q2k1l1JmVcwci-csf-QM2qHbqzjEAmU
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/user_provided_service_instances/57e99558-64a7-4613-bfe8-49b86d798dca" -d '{
  "credentials": {
    "somekey": "somenewvalue"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQyMSIsImVtYWlsIjoiZW1haWwtMzEzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzY4Mjk4MDJ9.6Ps2S-BbI9k0Q2k1l1JmVcwci-csf-QM2qHbqzjEAmU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "57e99558-64a7-4613-bfe8-49b86d798dca",
    "url": "/v2/user_provided_service_instances/57e99558-64a7-4613-bfe8-49b86d798dca",
    "created_at": "2015-07-06T23:23:22Z",
    "updated_at": "2015-07-06T23:23:22Z"
  },
  "entity": {
    "name": "name-2334",
    "credentials": {
      "somekey": "somenewvalue"
    },
    "space_guid": "7b7db407-e406-4617-9f0f-7789499e408e",
    "type": "user_provided_service_instance",
    "syslog_drain_url": "https://foo.com/url-98",
    "space_url": "/v2/spaces/7b7db407-e406-4617-9f0f-7789499e408e",
    "service_bindings_url": "/v2/user_provided_service_instances/57e99558-64a7-4613-bfe8-49b86d798dca/service_bindings"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: f9c78725-70c5-4d9f-a4a2-e159fae146f1
Content-Length: 691
X-Content-Type-Options: nosniff