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/959aa02a-e494-4e6a-b252-55ea77fad823

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"}
route_service_url URL to which requests for bound routes will be forwarded.
  • https://logger.example.com
{
  "credentials": {
    "somekey": "somenewvalue"
  }
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMyOCIsImVtYWlsIjoiZW1haWwtMjMwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjE5NTg0MDh9.xAMNn5p-HakpTW62y4GJ-jkqbYbc8pTV22K8uaRXAG4
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/user_provided_service_instances/959aa02a-e494-4e6a-b252-55ea77fad823" -d '{
  "credentials": {
    "somekey": "somenewvalue"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMyOCIsImVtYWlsIjoiZW1haWwtMjMwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjE5NTg0MDh9.xAMNn5p-HakpTW62y4GJ-jkqbYbc8pTV22K8uaRXAG4" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "959aa02a-e494-4e6a-b252-55ea77fad823",
    "url": "/v2/user_provided_service_instances/959aa02a-e494-4e6a-b252-55ea77fad823",
    "created_at": "2016-04-22T19:33:28Z",
    "updated_at": "2016-04-22T19:33:28Z"
  },
  "entity": {
    "name": "name-1110",
    "credentials": {
      "somekey": "somenewvalue"
    },
    "space_guid": "177f5d67-d3f7-482c-a4f3-e9ff0191faf3",
    "type": "user_provided_service_instance",
    "syslog_drain_url": "https://foo.com/url-69",
    "route_service_url": null,
    "space_url": "/v2/spaces/177f5d67-d3f7-482c-a4f3-e9ff0191faf3",
    "service_bindings_url": "/v2/user_provided_service_instances/959aa02a-e494-4e6a-b252-55ea77fad823/service_bindings",
    "routes_url": "/v2/user_provided_service_instances/959aa02a-e494-4e6a-b252-55ea77fad823/routes"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 73eb0ebe-aa38-4ae3-91c4-ba3827b2e18c
Content-Length: 823
X-Content-Type-Options: nosniff