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/b9ae51e0-5386-4748-ba5d-c7d0c0a68068

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

cURL

curl "https://api.[your-domain.com]/v2/user_provided_service_instances/b9ae51e0-5386-4748-ba5d-c7d0c0a68068" -d '{
  "credentials": {
    "somekey": "somenewvalue"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1OCIsImVtYWlsIjoiZW1haWwtOTZAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ1MTQxMzY4M30.wqfn6rUeT1m1i55BX_o98fUVSKGf2NqksavMD1uUtC8" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "b9ae51e0-5386-4748-ba5d-c7d0c0a68068",
    "url": "/v2/user_provided_service_instances/b9ae51e0-5386-4748-ba5d-c7d0c0a68068",
    "created_at": "2015-12-22T18:28:03Z",
    "updated_at": "2015-12-22T18:28:03Z"
  },
  "entity": {
    "name": "name-509",
    "credentials": {
      "somekey": "somenewvalue"
    },
    "space_guid": "d4922f80-ab7a-49d5-80ec-a4a7613077a7",
    "type": "user_provided_service_instance",
    "syslog_drain_url": "https://foo.com/url-25",
    "route_service_url": null,
    "space_url": "/v2/spaces/d4922f80-ab7a-49d5-80ec-a4a7613077a7",
    "service_bindings_url": "/v2/user_provided_service_instances/b9ae51e0-5386-4748-ba5d-c7d0c0a68068/service_bindings",
    "routes_url": "/v2/user_provided_service_instances/b9ae51e0-5386-4748-ba5d-c7d0c0a68068/routes"
  }
}

Headers

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