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/31347cf5-df83-48fd-9f78-09e7b369806f

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

cURL

curl "https://api.[your-domain.com]/v2/user_provided_service_instances/31347cf5-df83-48fd-9f78-09e7b369806f" -d '{
  "credentials": {
    "somekey": "somenewvalue"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMyNyIsImVtYWlsIjoiZW1haWwtMjI5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjEzNzQ2NDB9.V_umtlb89nQyguhi-cj3QwiMZ1aSlGfUMMFwgjNEpBU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "31347cf5-df83-48fd-9f78-09e7b369806f",
    "url": "/v2/user_provided_service_instances/31347cf5-df83-48fd-9f78-09e7b369806f",
    "created_at": "2016-04-16T01:24:00Z",
    "updated_at": "2016-04-16T01:24:00Z"
  },
  "entity": {
    "name": "name-1063",
    "credentials": {
      "somekey": "somenewvalue"
    },
    "space_guid": "562db60f-e28a-4d05-95d1-b70b3b619208",
    "type": "user_provided_service_instance",
    "syslog_drain_url": "https://foo.com/url-64",
    "route_service_url": null,
    "space_url": "/v2/spaces/562db60f-e28a-4d05-95d1-b70b3b619208",
    "service_bindings_url": "/v2/user_provided_service_instances/31347cf5-df83-48fd-9f78-09e7b369806f/service_bindings",
    "routes_url": "/v2/user_provided_service_instances/31347cf5-df83-48fd-9f78-09e7b369806f/routes"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 70fb2e7f-124e-4f57-b377-2f03440ee0c5
Content-Length: 823
X-Content-Type-Options: nosniff