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

Fields

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"}

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTUiLCJlbWFpbCI6ImVtYWlsLTVAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQxNjUyNjY5NH0.OshC4FDpS8oohXNEn47YqeAjnf61cQjfD4e0J6Q02bs
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/user_provided_service_instances/ccc0fa97-cce1-4616-a28a-4749af9502d5

Body

{
  "credentials": {
    "somekey": "somenewvalue"
  }
}

cURL

curl "https://api.[your-domain.com]/v2/user_provided_service_instances/ccc0fa97-cce1-4616-a28a-4749af9502d5" -d '{
  "credentials": {
    "somekey": "somenewvalue"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTUiLCJlbWFpbCI6ImVtYWlsLTVAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQxNjUyNjY5NH0.OshC4FDpS8oohXNEn47YqeAjnf61cQjfD4e0J6Q02bs" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 0a27c3cf-01e3-456a-8984-12a5493039d9
Content-Length: 697
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "ccc0fa97-cce1-4616-a28a-4749af9502d5",
    "url": "/v2/user_provided_service_instances/ccc0fa97-cce1-4616-a28a-4749af9502d5",
    "created_at": "2014-11-13T23:38:14+00:00",
    "updated_at": "2014-11-13T23:38:14+00:00"
  },
  "entity": {
    "name": "name-7",
    "credentials": {
      "somekey": "somenewvalue"
    },
    "space_guid": "0898b630-5288-4e85-bc7c-792f61f7ade6",
    "type": "user_provided_service_instance",
    "syslog_drain_url": "https://foo.com/url-1",
    "space_url": "/v2/spaces/0898b630-5288-4e85-bc7c-792f61f7ade6",
    "service_bindings_url": "/v2/user_provided_service_instances/ccc0fa97-cce1-4616-a28a-4749af9502d5/service_bindings"
  }
}