Home
Version 3
Users API

Users API

Updating a User

PUT /v2/users/:guid

Request

Route

PUT /v2/users/uaa-id-46

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": "6c3f717e-1b7f-4b5f-aa69-755a00047f86"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ3IiwiZW1haWwiOiJlbWFpbC0yMkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ1NTU3OTI5fQ.5B8kmt2wWMLFpaqRxDeXga7bkZ44hMlr9IV537IwWYw
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/users/uaa-id-46" -d '{
  "default_space_guid": "6c3f717e-1b7f-4b5f-aa69-755a00047f86"
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ3IiwiZW1haWwiOiJlbWFpbC0yMkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ1NTU3OTI5fQ.5B8kmt2wWMLFpaqRxDeXga7bkZ44hMlr9IV537IwWYw" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "uaa-id-46",
    "url": "/v2/users/uaa-id-46",
    "created_at": "2015-10-15T23:52:09Z",
    "updated_at": "2015-10-15T23:52:09Z"
  },
  "entity": {
    "admin": false,
    "active": false,
    "default_space_guid": "6c3f717e-1b7f-4b5f-aa69-755a00047f86",
    "default_space_url": "/v2/spaces/6c3f717e-1b7f-4b5f-aa69-755a00047f86",
    "spaces_url": "/v2/users/uaa-id-46/spaces",
    "organizations_url": "/v2/users/uaa-id-46/organizations",
    "managed_organizations_url": "/v2/users/uaa-id-46/managed_organizations",
    "billing_managed_organizations_url": "/v2/users/uaa-id-46/billing_managed_organizations",
    "audited_organizations_url": "/v2/users/uaa-id-46/audited_organizations",
    "managed_spaces_url": "/v2/users/uaa-id-46/managed_spaces",
    "audited_spaces_url": "/v2/users/uaa-id-46/audited_spaces"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 5372ae7b-c97d-41bc-8b6d-33b3bc287ed6
Content-Length: 854
X-Content-Type-Options: nosniff