Home
Version 3
Users API

Users API

Updating a User

PUT /v2/users/:guid

Request

Route

PUT /v2/users/uaa-id-244

Parameters

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

Body

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).
{
  "default_space_guid": "1f0357d7-7996-4718-be48-342f75195c5b"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NSIsImVtYWlsIjoiZW1haWwtMTgyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjczMjM5NzB9.MjE1axvAFywI4kLuSEC11a7HN87kGFQ8BjKDjoa9J-g
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-244" -d '{
  "default_space_guid": "1f0357d7-7996-4718-be48-342f75195c5b"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NSIsImVtYWlsIjoiZW1haWwtMTgyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjczMjM5NzB9.MjE1axvAFywI4kLuSEC11a7HN87kGFQ8BjKDjoa9J-g" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-244",
    "url": "/v2/users/uaa-id-244",
    "created_at": "2015-03-18T22:52:50Z",
    "updated_at": "2015-03-18T22:52:50Z"
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "1f0357d7-7996-4718-be48-342f75195c5b",
    "default_space_url": "/v2/spaces/1f0357d7-7996-4718-be48-342f75195c5b",
    "spaces_url": "/v2/users/uaa-id-244/spaces",
    "organizations_url": "/v2/users/uaa-id-244/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-244/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-244/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-244/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-244/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-244/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 0c8d7f5c-207a-4c65-a5fa-22db12be9a37
Content-Length: 863
X-Content-Type-Options: nosniff