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/d5bb7b59-93c1-4cbc-a8e6-57ad4c2d7945

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

cURL

curl "https://api.[your-domain.com]/v2/user_provided_service_instances/d5bb7b59-93c1-4cbc-a8e6-57ad4c2d7945" -d '{
  "credentials": {
    "somekey": "somenewvalue"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM4NiIsImVtYWlsIjoiZW1haWwtMjg4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjY2MzM5MjN9.LH6W9_O4FYN_9gjZ9wg_lLHXyrpfJ7wQR_kjHKS7RBo" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "d5bb7b59-93c1-4cbc-a8e6-57ad4c2d7945",
    "url": "/v2/user_provided_service_instances/d5bb7b59-93c1-4cbc-a8e6-57ad4c2d7945",
    "created_at": "2015-03-10T23:12:03Z",
    "updated_at": "2015-03-10T23:12:03Z"
  },
  "entity": {
    "name": "name-2098",
    "credentials": {
      "somekey": "somenewvalue"
    },
    "space_guid": "a885dd8e-cffd-4bdf-ba23-fb36746337a3",
    "type": "user_provided_service_instance",
    "syslog_drain_url": "https://foo.com/url-86",
    "space_url": "/v2/spaces/a885dd8e-cffd-4bdf-ba23-fb36746337a3",
    "service_bindings_url": "/v2/user_provided_service_instances/d5bb7b59-93c1-4cbc-a8e6-57ad4c2d7945/service_bindings"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: edaac4e2-563c-4655-8acb-31d1c34e51cd
Content-Length: 691
X-Content-Type-Options: nosniff