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/3f6f3275-8935-482a-b3e2-d949fff5b1cc

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.eyJ1c2VyX2lkIjoidWFhLWlkLTMwOCIsImVtYWlsIjoiZW1haWwtMjA0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjM2MTg3MjB9.XIgPrN5ueI-5C_7PmjDEuqpRSZItd-hZeZ2O1Kwueao
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/user_provided_service_instances/3f6f3275-8935-482a-b3e2-d949fff5b1cc" -d '{
  "credentials": {
    "somekey": "somenewvalue"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMwOCIsImVtYWlsIjoiZW1haWwtMjA0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjM2MTg3MjB9.XIgPrN5ueI-5C_7PmjDEuqpRSZItd-hZeZ2O1Kwueao" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "3f6f3275-8935-482a-b3e2-d949fff5b1cc",
    "url": "/v2/user_provided_service_instances/3f6f3275-8935-482a-b3e2-d949fff5b1cc",
    "created_at": "2016-05-12T00:45:20Z",
    "updated_at": "2016-05-12T00:45:20Z"
  },
  "entity": {
    "name": "name-1713",
    "credentials": {
      "somekey": "somenewvalue"
    },
    "space_guid": "8d894486-3a48-41e7-b37f-85008f07f769",
    "type": "user_provided_service_instance",
    "syslog_drain_url": "https://foo.com/url-72",
    "route_service_url": null,
    "space_url": "/v2/spaces/8d894486-3a48-41e7-b37f-85008f07f769",
    "service_bindings_url": "/v2/user_provided_service_instances/3f6f3275-8935-482a-b3e2-d949fff5b1cc/service_bindings",
    "routes_url": "/v2/user_provided_service_instances/3f6f3275-8935-482a-b3e2-d949fff5b1cc/routes"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: b8526dd4-b6aa-407e-a056-fbf099cd0bbf
Content-Length: 823
X-Content-Type-Options: nosniff