Perform User Actions

Details

API Details
Name

Perform User Actions (Asynchronous or Synchronous API based on the requested action – identified in the examples below)

Description

Allows you to perform actions that a specified user can perform (at least one attribute is required).

This API is useful when you change passwords or qualify the user account with additional attributes.

Unspecified attributes are not changed.

MethodPOST
URI/v1/users/userId (or any other attribute provided in the Request section.)
CloudCenter Release
  • Introduced in CloudCenter 4.0.
  • Payload change for MANAGE_CLOUDS (see Example 10 below) in CloudCenter 4.6 and later.
Notes

API Notes:

User Action Notes:

  • The request body changes based on the selected action.
ESB Headeraction: create.users.userId

Examples

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

Request Body Examples

Example 1 – Activate User (Asynchronous API)

This is an asynchronous POST request and the precondition for this API call to succeed is that the user has to be in the NEW state with at least one cloud enabled for this user (in the request body).

{
    "action": "ACTIVATE",
    "userActivationData": {
        "planId": "4",
        "contractId": "1",
        "activateRegions": [
            {
                "regionId": "1"
            },
            {
                "regionId": "2"
            }
        ],
        "agreeToContract": true,
        "sendActivationEmail": false,
        "defaultStorageSize": 0,
        "importApps": [
            "1"
        ]
    }
}

Example 2 – Assign a Bundle to a User

The user must be activated for this operation to succeed. A successful request results in a HTTP 204 status.

{

    "action": "BUNDLE_CREDIT",

    "bundleCreditData": 
{
        "bundleId": "1"
    }
}

Example 3 – Assign a Plan and Contract to a User

The user must be activated for this operation to succeed. A successful request results in a HTTP 204 status.

{
    "action": "MANAGE_PLANS",
    "userManagePlansData": {
        "planId": "4",
        "contractId": "1",
        "type": "CHANGE_PRORATE",
        "renewContract": false,
        "userId": 15
    }
}

Example 4 – Admin Resets User Password

The user must be activated for this operation to succeed. A successful request results in a HTTP 200 status.

{
    "action": "ADMIN_RESET_PASSWORD"
}

The response for this operation differs from other operations

{
    "newPassword": "GH3zNSsf"
} 

Example 5 – User Change User (Self) Password

The user must be activated for this operation to succeed. A successful request results in a HTTP 204 status.

{

    "action": "CHANGE_PASSWORD",

    "changePasswordData": 
{
        "oldPassword": "pw007",
        "newPassword": "0p0w7oo7"
    }
}

Example 6 – Tenant Admin (Owner) Converts Standard User to Co-Admin

The user must be activated for this operation to succeed. A successful request results in a HTTP 204 status.

{
    "action": "CONVERT_TO_TENANT_ADMIN"
}

Example 7 – Tenant Admin (Owner) Converts Co-Admin to a Standard User

The user must be activated for this operation to succeed. A successful request results in a HTTP 204 status.

{
    "action": "CONVERT_TO_STANDARD_USER"
} 

Example 8 – Tenant Admin (Owner) Activates User's Payment Profile

The user must be activated for this operation to succeed. A successful request results in a HTTP 204 status.

{
    "action": "ACTIVATE_PAYMENT_PROFILE"
} 

Example 9 – Tenant Admin (Owner) Deactivates User's Payment Profile

The user must be activated for this operation to succeed. A successful request results in a HTTP 204 status.

{
    "action": "DEACTIVATE_PAYMENT_PROFILE"
} 

Example 10 – Tenant Admin Adds Cloud for User without Cloud Assignment (Asynchronous API)

This is an asynchronous POST request (for CloudCenter 4.5.x and earlier releases).

{
    "action": "MANAGE_CLOUDS",
    "manageCloudsData": {
        "activateRegions": [
            {
                "regionId": "2"
            }
        ],
        "storageSize": 0
    }
}

This is an asynchronous POST request (for CloudCenter 4.6.x and later releases).

{
    "action": "MANAGE_CLOUDS",
    "activateRegions": [{
        "regionId": "1"
    }]
}

Example 11 – Tenant Admin Imports App for User from Tenant Marketplace (Asynchronous API)

This is an asynchronous POST request and the precondition for this API call to succeed is that the user should not have been assigned a cloud previously.

{
    "action": "IMPORT_APPS",
    "importApps": [
        "2"
    ]
}

Example 12 – Activate User Using Activation Profile ID (Asynchronous API)

This is an asynchronous POST request and the precondition for this API call to succeed is that the user has to be in the NEW state with at least one cloud enabled for this user (in the request body). You must provide the activationProfileId for this call to succeed.

{
    "action": "ACTIVATE_USING_ACTIVATION_PROFILE",
    "activationProfileId": "3"
}

Response for All Examples

A success or failure HTTP Status Code.

See HTTP Location URL for the link to the newly created user resource.

Request Attributes

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

Required

action
  • Description: Allows administrators to perform administrator tasks. See Manage Admin Users for additional context.
  • Type: Enumeration

    Enumeration DescriptionApplicable APIs
    ACTIVATEAllows newly-added users to begin using the CloudCenter platform. See Create Standard Users for additional context.Perform User Actions
    IMPORT_APPSAllows users to import application profiles. See Import Application Profiles for additional context.
    RESET_PASSWORDIssues a new password and sends an email listing the new password to the user. Effective Cloud Center 4.6.1, the CloudCenter platform enforces a minimum password length of 5 characters for all settings.
    See Reset Password for additional context.
    CONVERT_TO_TENANT_ADMINThe primary administrator can promote a Standard User to be a co-administrator at the same level. The co-admin will have the same privileges as the primary administrator. See Manage Admin Users for additional context.
    CONVERT_TO_STANDARD_USERAdministrators can convert another administrator back to being a Standard User. See Manage Admin Users for additional context.
    ADMIN_RESET_PASSWORDOnly a Platform Administrator (Root) or the SysAdmin can change their respective passwords using this API. All other users (including tenant owners) must have the password reset by the admin. Effective Cloud Center 4.6.1, the CloudCenter platform enforces a minimum password length of 5 characters for all settings.
    See Manage Admin Users for additional context.
    ACTIVATE_USING_ACTIVATION_PROFILEAdministrators can activate new users using the activationProfileId so they can begin using the CloudCenter platform. See Activation Profiles for additional context.
    MANAGE_CLOUDSAllows users to manage various cloud configurations in concert. See Clouds for additional context.
    MANAGE_PLANSAllows users to assign plans and contracts. See Configure Bundles for additional context.
    ACTIVATE_PAYMENT_PROFILEActivates the payment profile for this user. See Financial Overview for additional context.
    DEACTIVATE_PAYMENT_PROFILEDe-activates the payment profile for this user. See Financial Overview for additional context.
    BUNDLE_CREDITLimits the user to the bundle credit plan. See Financial Overview for additional context. Requires the bundleCreditData attribute.

Required

userManagePlansData (click for additional context)
manageCloudsData (click for additional context)

Response Attributes

All configured attributes for this user.