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/c4f1c73a-511f-4d1a-8d04-c1129d8c151f

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

cURL

curl "https://api.[your-domain.com]/v2/user_provided_service_instances/c4f1c73a-511f-4d1a-8d04-c1129d8c151f" -d '{
  "credentials": {
    "somekey": "somenewvalue"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQzMiIsImVtYWlsIjoiZW1haWwtMzAwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQyNjA2NjJ9.kEqnjFjssDT0onF6SVpbKhgYFK0S4EwRRUwNJy1Q1pk" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "c4f1c73a-511f-4d1a-8d04-c1129d8c151f",
    "url": "/v2/user_provided_service_instances/c4f1c73a-511f-4d1a-8d04-c1129d8c151f",
    "created_at": "2015-09-30T23:31:02Z",
    "updated_at": "2015-09-30T23:31:02Z"
  },
  "entity": {
    "name": "name-2318",
    "credentials": {
      "somekey": "somenewvalue"
    },
    "space_guid": "2c6c9b88-a4a2-4e5d-9460-17aad4cba1ed",
    "type": "user_provided_service_instance",
    "syslog_drain_url": "https://foo.com/url-84",
    "space_url": "/v2/spaces/2c6c9b88-a4a2-4e5d-9460-17aad4cba1ed",
    "service_bindings_url": "/v2/user_provided_service_instances/c4f1c73a-511f-4d1a-8d04-c1129d8c151f/service_bindings"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: abc2cd78-ad6c-45e7-9623-35d49a55d126
Content-Length: 691
X-Content-Type-Options: nosniff