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/ad504cf1-9a0a-4cbb-bae0-9cd02b2b3fa8

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

cURL

curl "https://api.[your-domain.com]/v2/user_provided_service_instances/ad504cf1-9a0a-4cbb-bae0-9cd02b2b3fa8" -d '{
  "credentials": {
    "somekey": "somenewvalue"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIwIiwiZW1haWwiOiJlbWFpbC0yMEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDMyNzc0OTc4fQ.vZ1sDHCI5Jz6fn5oBSqBQIyRydPNNzhQCb5MKPIdym8" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "ad504cf1-9a0a-4cbb-bae0-9cd02b2b3fa8",
    "url": "/v2/user_provided_service_instances/ad504cf1-9a0a-4cbb-bae0-9cd02b2b3fa8",
    "created_at": "2015-05-21T01:02:58Z",
    "updated_at": "2015-05-21T01:02:58Z"
  },
  "entity": {
    "name": "name-88",
    "credentials": {
      "somekey": "somenewvalue"
    },
    "space_guid": "13c2ab1b-1cbf-40b6-a611-ee87440e8495",
    "type": "user_provided_service_instance",
    "syslog_drain_url": "https://foo.com/url-12",
    "space_url": "/v2/spaces/13c2ab1b-1cbf-40b6-a611-ee87440e8495",
    "service_bindings_url": "/v2/user_provided_service_instances/ad504cf1-9a0a-4cbb-bae0-9cd02b2b3fa8/service_bindings"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: d8b1bdd7-7507-4b73-8518-b363c980e898
Content-Length: 689
X-Content-Type-Options: nosniff