CliQr is now part of Cisco Learn More About Cisco

Update User

Details

API Details
Name

Update User

Description

Updates the configured user details for a user with the specified user ID.

Provides a HTTP Location URL that you can use to query the system until this call returns a success or failure HTTP Status Codes.

MethodPUT
URIv1/users/userId
CloudCenter Release
  • Introduced in CloudCenter 4.0.
  • Enhanced in CloudCenter 4.2 to include the activationProfileId and hasSubscriptionPlanType attributes.
Notes

API Notes:

  • For additional context on <PORT> usage in the following example, see Base URI Format.

  • This API follows standard HTTP PUT idempotent semantics for all request attributes – except the password attribute.

Update User Notes:

  • Repeat the entire response returned by the View Users API as the request for this Update User API – even if you are only updating one field.
  • For this user to be functional (for example, to make API calls), the admin must first activate this user.
  • Even though the value of the id, username, type, and accountSource attributes cannot be changed (cannot changed their value), they must still be included along with their values derived from the GET response. If either of these conditions are not fulfilled, the API call fails.

  • The system ignores any other attribute that is not listed in the Request sections.
ESB Headeraction: update/users/userId

Example 1 – Update a User's Information

curl -k -X PUT -H "Accept: application/json" -H "Content-Type: application/json" -u cloudcenteradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v1/users/181"

Request Body

The following request updates only the user's phone number but all the remain fields must be present to ensure that the user's state does not change for the other attributes. The response indicates if the field was updated.

Response

Example 2 - Disable a User

curl -k -X PUT -H "Accept: application/json" -u cloudcenteradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v1/users/15"

Request Body

To disable the user, only set the enabled attribute to false. A user has to be in the ENABLED state in order for this user to be disabled. A successful response indicates if the user was disabled – verify the value of enabled attribute is false and status is DISABLED.

Response

Example 3 - Enabling a user

curl -k -X PUT -H "Accept: application/json" -u cloudcenteradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v1/users/15"

Request Body

To enable the user, only set the enabled attribute to true. A user has to be in the DISABLED state in order for this user to be enabled. A successful response indicates if the user was enabled – verify the value of enabled attribute is true and status is ENABLED.

Response

Request Attributes

userId
  • Description: Unique, system-generated identifier for a user
  • Type: String

Required

id
  • DescriptionUnique, system-generated identifier for this CloudCenter Resource.

  • Type: String

Required. Value must match the derived value from the GET response.

username
  • Description: Unique, CloudCenter-generated name reference for this user.
  • Type: String

Required. This system-generated attribute cannot be changed and must match the derived value from the GET response.

enabled
  • Description: Indicates that this resource has been enabled.

    • true = resource has been enabled
    • false = resource has not been enabled (default)
  • Type: Boolean

This system-generated attribute cannot be changed and is used to enable (if value = true) or disable (if value = false) the user after the user is activated (defaults to true).

type
  • DescriptionThe type of resource
  • Type: String

Required. Value must match the derived value from the GET response.

firstName
  • DescriptionCloudCenter user's first name. Defaults to empty string if not set.
  • Type: String

lastName
  • DescriptionCloudCenter user's last name. Defaults to empty string if not set.
  • Type: String
companyName
  • Description: The company name for this user. The default is an empty string.
  • Type: String

tenantId
  • DescriptionUnique, system-generated identifier for the tenant organization. A tenant admin must belong to this tenant to invoke any APIs for this tenant. See Add Sub-Tenants > Tenant ID and Tenant Name Dependency.

  • Type: String

Required

emailAddr
  • Description: Unique (in the system) email address for this resource and must match the regular expression
  • Type: String

Required

phoneNumber
  • Description: The phone number for this user. Defaults to empty string if not set.
  • Type: String
externalId
  • DescriptionIdentity provider ID for external access (for example, SSO). This value must match the corresponding user's SAML subject Name ID value. Defaults to empty string if not set.
  • Type: String

accountSource
  • Description: Indicates how this user account was created (system generated)
  • Type: Enumeration

    EnnumerationDescription
    adminCreated The account was created by an administrator
    selfActivated 

    The account was created by a user by using a self sign-up form

Required. This system-generated attribute cannot be changed and must match the derived value from the GET response.

activationProfileId
  • Description: Unique, system-generated identifier for the activationProfile
  • Type: String
hasSubscriptionPlanType
  • Description: Identifies if this user has a subscription (plan)type:
    • true = This user has this plan type
    • false = This user does not have this plan type.
  • Type: Boolean

Response Attributes

All configured attributes for this user.