Home
Version 3
Services API

Services API

Updating a Service (deprecated)

PUT /v2/services

Fields

Name Description Default Valid Values Example Values
guid The guid of the service
label The name of the service
  • SomeMysqlService
description A short blurb describing the service
  • Mysql stores things for you
long_description A longer description of the service
  • Mysql is a database. It stores things. Use it in your apps...
info_url A url that points to an info page for the service
  • http://info.somemysqlservice.com
documentation_url A url that points to a documentation page for the service
  • http://docs.somemysqlservice.com
timeout A timeout used by the v1 service gateway client
active A boolean describing that the service can be provisioned by users false
bindable A boolean describing that the service can be bound to applications true
extra A JSON field with extra data pertaining to the service
  • {"providerDisplayName": "MyServiceProvider"}
unique_id A guid that identifies the service with the broker (not the same as the guid above)
tags A list of tags for the service []
  • database
  • mysql
requires A list of dependencies for services []
  • syslog_drain
provider The name of the service provider (used only by v1 service gateways)
  • MySql Provider
version The version of the service (used only by v1 service gateways)
  • 2.0
url The url of ther service provider (used only by v1 service gateways)
  • http://myql.provider.com
service_broker_guid The guid of the v2 service broker associated with the service

Request

Headers

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

Route

PUT /v2/services/01adc17d-59bb-488e-89a7-2ba239bd2db1

Body

{
  "label": "SomeMysqlService",
  "description": "Mysql stores things for you",
  "provider": "MySql Provider",
  "version": "2.0",
  "url": "http://myql.provider.com"
}

cURL

curl "https://api.[your-domain.com]/v2/services/01adc17d-59bb-488e-89a7-2ba239bd2db1" -d '{
  "label": "SomeMysqlService",
  "description": "Mysql stores things for you",
  "provider": "MySql Provider",
  "version": "2.0",
  "url": "http://myql.provider.com"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE2IiwiZW1haWwiOiJlbWFpbC0xNkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE1NzU0MTMwfQ.KhGa9AlXpv52zue8r3r7oCVJ3qvRnSwy6lv6JawEJXA" \
	-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: 28c7a711-1b00-455c-acbd-9ecab3b4abce
Content-Length: 866
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "01adc17d-59bb-488e-89a7-2ba239bd2db1",
    "url": "/v2/services/01adc17d-59bb-488e-89a7-2ba239bd2db1",
    "created_at": "2014-11-05T01:02:10+00:00",
    "updated_at": "2014-11-05T01:02:10+00:00"
  },
  "entity": {
    "label": "SomeMysqlService",
    "provider": "MySql Provider",
    "url": "http://myql.provider.com",
    "description": "Mysql stores things for you",
    "long_description": null,
    "version": "2.0",
    "info_url": null,
    "active": true,
    "bindable": true,
    "unique_id": "2ed2456a-c417-4a94-9a3d-c345d9f86a1b",
    "extra": null,
    "tags": [

    ],
    "requires": [

    ],
    "documentation_url": null,
    "service_broker_guid": "109aa94d-54c6-4d89-a0de-32edfc097875",
    "plan_updateable": false,
    "service_plans_url": "/v2/services/01adc17d-59bb-488e-89a7-2ba239bd2db1/service_plans"
  }
}