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

Route

PUT /v2/user_provided_service_instances/4e80041b-301a-42de-8732-86f3592a9ccf

Body

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

cURL

curl "https://api.[your-domain.com]/v2/user_provided_service_instances/4e80041b-301a-42de-8732-86f3592a9ccf" -d '{
  "credentials": {
    "somekey": "somenewvalue"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIyMyIsImVtYWlsIjoiZW1haWwtMTY0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQzMTAxMzN9.mpycJsTUqhsOSfuS33jQpkSBZc-q2Ej0tdNuskDIcio" \
	-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: 2b39fc0a-d91a-4f0a-a272-fbf526efa3ea
Content-Length: 691
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "4e80041b-301a-42de-8732-86f3592a9ccf",
    "url": "/v2/user_provided_service_instances/4e80041b-301a-42de-8732-86f3592a9ccf",
    "created_at": "2015-02-12T01:42:13Z",
    "updated_at": "2015-02-12T01:42:13Z"
  },
  "entity": {
    "name": "name-1416",
    "credentials": {
      "somekey": "somenewvalue"
    },
    "space_guid": "d42efe7b-3006-473e-847a-fcdb78cb7353",
    "type": "user_provided_service_instance",
    "syslog_drain_url": "https://foo.com/url-70",
    "space_url": "/v2/spaces/d42efe7b-3006-473e-847a-fcdb78cb7353",
    "service_bindings_url": "/v2/user_provided_service_instances/4e80041b-301a-42de-8732-86f3592a9ccf/service_bindings"
  }
}