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/943014ef-776f-4fa6-b174-e7bd97c7badc

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

cURL

curl "https://api.[your-domain.com]/v2/user_provided_service_instances/943014ef-776f-4fa6-b174-e7bd97c7badc" -d '{
  "credentials": {
    "somekey": "somenewvalue"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM0NSIsImVtYWlsIjoiZW1haWwtMjYxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzUxMDI4NjR9.dZR469pxXTj8a0-Hg2uIegYQfO_xNHCH4vz17YYsTt8" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "943014ef-776f-4fa6-b174-e7bd97c7badc",
    "url": "/v2/user_provided_service_instances/943014ef-776f-4fa6-b174-e7bd97c7badc",
    "created_at": "2015-06-16T23:41:04Z",
    "updated_at": "2015-06-16T23:41:04Z"
  },
  "entity": {
    "name": "name-2133",
    "credentials": {
      "somekey": "somenewvalue"
    },
    "space_guid": "8f5f94e4-3062-40bf-a3dc-334c71be2881",
    "type": "user_provided_service_instance",
    "syslog_drain_url": "https://foo.com/url-90",
    "space_url": "/v2/spaces/8f5f94e4-3062-40bf-a3dc-334c71be2881",
    "service_bindings_url": "/v2/user_provided_service_instances/943014ef-776f-4fa6-b174-e7bd97c7badc/service_bindings"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 11d0c441-b547-4a8d-925f-9c19c882c113
Content-Length: 691
X-Content-Type-Options: nosniff