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/095a4e19-4ec2-423c-8aff-c9bd8780d224

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

cURL

curl "https://api.[your-domain.com]/v2/user_provided_service_instances/095a4e19-4ec2-423c-8aff-c9bd8780d224" -d '{
  "credentials": {
    "somekey": "somenewvalue"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTY5IiwiZW1haWwiOiJlbWFpbC00MEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI5NjY0MTM0fQ.UwqQ0WtEiYuwQ6mZZv_VRUO7vAdIQF6hd_KvN1S9RV0" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "095a4e19-4ec2-423c-8aff-c9bd8780d224",
    "url": "/v2/user_provided_service_instances/095a4e19-4ec2-423c-8aff-c9bd8780d224",
    "created_at": "2015-04-15T00:55:34Z",
    "updated_at": "2015-04-15T00:55:34Z"
  },
  "entity": {
    "name": "name-252",
    "credentials": {
      "somekey": "somenewvalue"
    },
    "space_guid": "63053675-6d1e-465c-afce-57b0e8d9c832",
    "type": "user_provided_service_instance",
    "syslog_drain_url": "https://foo.com/url-15",
    "space_url": "/v2/spaces/63053675-6d1e-465c-afce-57b0e8d9c832",
    "service_bindings_url": "/v2/user_provided_service_instances/095a4e19-4ec2-423c-8aff-c9bd8780d224/service_bindings"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: f965cde4-9042-491d-849b-c7dcf2767f7e
Content-Length: 690
X-Content-Type-Options: nosniff