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.eyJ1c2VyX2lkIjoidWFhLWlkLTI4OSIsImVtYWlsIjoiZW1haWwtMTkyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQxMzczNzN9.8wGz9GoWetqu-W0CE4w1BPSa1Ko08btkEb_ZimO5xr0
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/user_provided_service_instances/e4d845fb-83a4-4305-ac19-b00d837a88a4

Body

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

cURL

curl "https://api.[your-domain.com]/v2/user_provided_service_instances/e4d845fb-83a4-4305-ac19-b00d837a88a4" -d '{
  "credentials": {
    "somekey": "somenewvalue"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4OSIsImVtYWlsIjoiZW1haWwtMTkyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQxMzczNzN9.8wGz9GoWetqu-W0CE4w1BPSa1Ko08btkEb_ZimO5xr0" \
	-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: afff0fca-97bd-4911-86cf-1f2df3e215ab
Content-Length: 691
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "e4d845fb-83a4-4305-ac19-b00d837a88a4",
    "url": "/v2/user_provided_service_instances/e4d845fb-83a4-4305-ac19-b00d837a88a4",
    "created_at": "2015-02-10T01:42:53Z",
    "updated_at": "2015-02-10T01:42:53Z"
  },
  "entity": {
    "name": "name-1405",
    "credentials": {
      "somekey": "somenewvalue"
    },
    "space_guid": "4454d175-976d-4b6b-a103-1c7a568da837",
    "type": "user_provided_service_instance",
    "syslog_drain_url": "https://foo.com/url-42",
    "space_url": "/v2/spaces/4454d175-976d-4b6b-a103-1c7a568da837",
    "service_bindings_url": "/v2/user_provided_service_instances/e4d845fb-83a4-4305-ac19-b00d837a88a4/service_bindings"
  }
}