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/3fcd7a70-d944-4783-ae76-ca28561e5e42

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

cURL

curl "https://api.[your-domain.com]/v2/user_provided_service_instances/3fcd7a70-d944-4783-ae76-ca28561e5e42" -d '{
  "credentials": {
    "somekey": "somenewvalue"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM2MyIsImVtYWlsIjoiZW1haWwtMjY1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5Njh9.sCauQNnOcuT8MSI_86bcmxlwClrYnQKh8VQZJowl4LI" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "3fcd7a70-d944-4783-ae76-ca28561e5e42",
    "url": "/v2/user_provided_service_instances/3fcd7a70-d944-4783-ae76-ca28561e5e42",
    "created_at": "2015-10-15T23:52:48Z",
    "updated_at": "2015-10-15T23:52:48Z"
  },
  "entity": {
    "name": "name-2343",
    "credentials": {
      "somekey": "somenewvalue"
    },
    "space_guid": "f653c44e-1393-4e43-8d51-149d37ef795d",
    "type": "user_provided_service_instance",
    "syslog_drain_url": "https://foo.com/url-116",
    "route_service_url": null,
    "space_url": "/v2/spaces/f653c44e-1393-4e43-8d51-149d37ef795d",
    "service_bindings_url": "/v2/user_provided_service_instances/3fcd7a70-d944-4783-ae76-ca28561e5e42/service_bindings",
    "routes_url": "/v2/user_provided_service_instances/3fcd7a70-d944-4783-ae76-ca28561e5e42/routes"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 3b8edc29-612d-41db-96c8-9614c9cff659
Content-Length: 824
X-Content-Type-Options: nosniff