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/911f23d6-a2f8-4af8-af09-50e1746edf2b

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

cURL

curl "https://api.[your-domain.com]/v2/user_provided_service_instances/911f23d6-a2f8-4af8-af09-50e1746edf2b" -d '{
  "credentials": {
    "somekey": "somenewvalue"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2OCIsImVtYWlsIjoiZW1haWwtMTc4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzk0MjYyMDZ9.QGTZZWHi-L2Ozy8QmJfaqXsyK0iJBRqUQAUDrnmZdhk" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "911f23d6-a2f8-4af8-af09-50e1746edf2b",
    "url": "/v2/user_provided_service_instances/911f23d6-a2f8-4af8-af09-50e1746edf2b",
    "created_at": "2015-08-06T00:36:46Z",
    "updated_at": "2015-08-06T00:36:46Z"
  },
  "entity": {
    "name": "name-1779",
    "credentials": {
      "somekey": "somenewvalue"
    },
    "space_guid": "a65adf47-03d1-49d3-aaac-8a54809d8c0c",
    "type": "user_provided_service_instance",
    "syslog_drain_url": "https://foo.com/url-39",
    "space_url": "/v2/spaces/a65adf47-03d1-49d3-aaac-8a54809d8c0c",
    "service_bindings_url": "/v2/user_provided_service_instances/911f23d6-a2f8-4af8-af09-50e1746edf2b/service_bindings"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: b27e49ed-f843-4ad0-8ea1-ccb544fda15b
Content-Length: 691
X-Content-Type-Options: nosniff