Home
Version 3
Users API

Users API

Updating a User

PUT /v2/users/:guid

Fields

Name Description Default Valid Values Example Values
default_space_guid The guid of the default space for apps created by this user.
admin Whether the user is an admin (Use UAA instead).

Parameters

Name Description Valid Values Example Values
guid The guid of the User

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTkzIiwiZW1haWwiOiJlbWFpbC04NUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE2NTI2NzAxfQ.frzYGfUJJG67ksAoe3In4K-ppv6fgOUl2I0gujq2iTc
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/users/uaa-id-92

Body

{
  "default_space_guid": "be7b027a-73f2-4b1c-887d-003af8b94776"
}

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-92" -d '{
  "default_space_guid": "be7b027a-73f2-4b1c-887d-003af8b94776"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTkzIiwiZW1haWwiOiJlbWFpbC04NUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE2NTI2NzAxfQ.frzYGfUJJG67ksAoe3In4K-ppv6fgOUl2I0gujq2iTc" \
	-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: c9256d1e-a32c-467c-bf03-694089d60ee2
Content-Length: 864
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-92",
    "url": "/v2/users/uaa-id-92",
    "created_at": "2014-11-13T23:38:21+00:00",
    "updated_at": "2014-11-13T23:38:21+00:00"
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "be7b027a-73f2-4b1c-887d-003af8b94776",
    "default_space_url": "/v2/spaces/be7b027a-73f2-4b1c-887d-003af8b94776",
    "spaces_url": "/v2/users/uaa-id-92/spaces",
    "organizations_url": "/v2/users/uaa-id-92/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-92/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-92/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-92/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-92/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-92/audited_spaces"
  }
}