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/89b79db7-4bc6-4a2c-9b0a-fff0adeb5f1c

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.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOSIsImVtYWlsIjoiZW1haWwtMjk5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDE2NjI2MTl9.pv82eBAIlhdFD0NHaOIbNADMS0uMaj3sP6Udsn8FY9E
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/user_provided_service_instances/89b79db7-4bc6-4a2c-9b0a-fff0adeb5f1c" -d '{
  "credentials": {
    "somekey": "somenewvalue"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOSIsImVtYWlsIjoiZW1haWwtMjk5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDE2NjI2MTl9.pv82eBAIlhdFD0NHaOIbNADMS0uMaj3sP6Udsn8FY9E" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "89b79db7-4bc6-4a2c-9b0a-fff0adeb5f1c",
    "url": "/v2/user_provided_service_instances/89b79db7-4bc6-4a2c-9b0a-fff0adeb5f1c",
    "created_at": "2015-08-31T21:50:19Z",
    "updated_at": "2015-08-31T21:50:19Z"
  },
  "entity": {
    "name": "name-2402",
    "credentials": {
      "somekey": "somenewvalue"
    },
    "space_guid": "60216b48-c828-4998-ba52-8075cd09e986",
    "type": "user_provided_service_instance",
    "syslog_drain_url": "https://foo.com/url-108",
    "space_url": "/v2/spaces/60216b48-c828-4998-ba52-8075cd09e986",
    "service_bindings_url": "/v2/user_provided_service_instances/89b79db7-4bc6-4a2c-9b0a-fff0adeb5f1c/service_bindings"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 96f9441c-7d0d-43b5-b734-661ef65a2beb
Content-Length: 692
X-Content-Type-Options: nosniff