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

Route

PUT /v2/users/uaa-id-19

Body

{
  "default_space_guid": "c55afaf5-4919-483c-ac3c-c4938e65fd75"
}

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-19" -d '{
  "default_space_guid": "c55afaf5-4919-483c-ac3c-c4938e65fd75"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIwIiwiZW1haWwiOiJlbWFpbC0xNUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI0MzEwMTE5fQ.vsoRT6k2xNide4vmvIZasYX775exbKZ7h_7ta2zZ9mY" \
	-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: a564d20b-56a2-4167-a421-3eb3a95aa037
Content-Length: 854
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-19",
    "url": "/v2/users/uaa-id-19",
    "created_at": "2015-02-12T01:41:59Z",
    "updated_at": "2015-02-12T01:41:59Z"
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "c55afaf5-4919-483c-ac3c-c4938e65fd75",
    "default_space_url": "/v2/spaces/c55afaf5-4919-483c-ac3c-c4938e65fd75",
    "spaces_url": "/v2/users/uaa-id-19/spaces",
    "organizations_url": "/v2/users/uaa-id-19/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-19/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-19/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-19/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-19/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-19/audited_spaces"
  }
}