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

Fields

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"}

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5MyIsImVtYWlsIjoiZW1haWwtMTQ1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTk5ODk5NzN9.kfAgjA4Cp1SC7g3E_D6RUX0iwm0iGTlYvIRtBDpaaL8
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/user_provided_service_instances/3dccb1d3-c270-4217-842f-afdcf643b88a

Body

{
  "credentials": {
    "somekey": "somenewvalue"
  }
}

cURL

curl "https://api.[your-domain.com]/v2/user_provided_service_instances/3dccb1d3-c270-4217-842f-afdcf643b88a" -d '{
  "credentials": {
    "somekey": "somenewvalue"
  }
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5MyIsImVtYWlsIjoiZW1haWwtMTQ1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTk5ODk5NzN9.kfAgjA4Cp1SC7g3E_D6RUX0iwm0iGTlYvIRtBDpaaL8" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 3f4152be-0cbf-4ac4-9287-526d69aff258
Content-Length: 701
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "3dccb1d3-c270-4217-842f-afdcf643b88a",
    "url": "/v2/user_provided_service_instances/3dccb1d3-c270-4217-842f-afdcf643b88a",
    "created_at": "2014-12-24T01:39:33+00:00",
    "updated_at": "2014-12-24T01:39:33+00:00"
  },
  "entity": {
    "name": "name-1486",
    "credentials": {
      "somekey": "somenewvalue"
    },
    "space_guid": "3a06628f-0e72-437b-afad-81c040cde006",
    "type": "user_provided_service_instance",
    "syslog_drain_url": "https://foo.com/url-72",
    "space_url": "/v2/spaces/3a06628f-0e72-437b-afad-81c040cde006",
    "service_bindings_url": "/v2/user_provided_service_instances/3dccb1d3-c270-4217-842f-afdcf643b88a/service_bindings"
  }
}