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/ac5a100b-c52d-48de-8454-67a9f61bbb6f

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

cURL

curl "https://api.[your-domain.com]/v2/user_provided_service_instances/ac5a100b-c52d-48de-8454-67a9f61bbb6f" -d '{
  "credentials": {
    "somekey": "somenewvalue"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMxOCIsImVtYWlsIjoiZW1haWwtMjQ1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzE2NDY2NDN9.ZIgcb9GCdCBWdHbHLbUMZt8N6o9I0wsfRkfei0xDR8U" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "ac5a100b-c52d-48de-8454-67a9f61bbb6f",
    "url": "/v2/user_provided_service_instances/ac5a100b-c52d-48de-8454-67a9f61bbb6f",
    "created_at": "2015-05-07T23:37:23Z",
    "updated_at": "2015-05-07T23:37:23Z"
  },
  "entity": {
    "name": "name-1967",
    "credentials": {
      "somekey": "somenewvalue"
    },
    "space_guid": "fef061e8-4e5f-4167-83cc-84a7fbf2158a",
    "type": "user_provided_service_instance",
    "syslog_drain_url": "https://foo.com/url-82",
    "space_url": "/v2/spaces/fef061e8-4e5f-4167-83cc-84a7fbf2158a",
    "service_bindings_url": "/v2/user_provided_service_instances/ac5a100b-c52d-48de-8454-67a9f61bbb6f/service_bindings"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: f3230f68-f933-4a9b-8c7d-cce845b6e9a9
Content-Length: 691
X-Content-Type-Options: nosniff