Create Tenant

Details

API Details
Name

Create Tenant

Description
MethodPOST
URIv1/tenants
CloudCenter Release
  • Introduced in CloudCenter 4.0.
  • The minAppFeeRate, ccTransactionFeeRate, revShareRate, and enableConsolidatedBilling, and the enableConsolidatedBilling attributes are deprecated.
  • Enhanced in CloudCenter 4.6.0 to include the includeDeleted query parameter and the deleted response parameter
  • Enhanced in CloudCenter 4.8.1 to include the createUserSecurityGroup and allowVmConnection attributes.
Notes
  • For additional context on <PORT> usage in the following example(s), see Base URI Format.
  • To create a tenant, you must select an existing user as the tenant admin. So be sure to Create the User first. Once this user becomes a tenant administrator, his or her name is removed from the Users list. See Manage Admin Users for additional context.
  • Upload the logo image before creating a service (see Upload Logo). If you do not upload a logo and provide the existing logo path (loginLogo or homepageLogo) prior to creating a tenant, then the logo image from the currently-provided path is deleted and this logo image is moved to another location after the tenant is created.
  • The cliqr_user_security_group is created only if both the createUserSecurityGroup and the allowVmConnection attributes are both set to true. The security group is not created if a security group rule is not associated with it. See Security and Firewall Rules for additional context. See Example 2.

ESB Headeraction: create.tenants

Example 1

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

Request Body

{
    "userId": "23",
    "name": "Company, Inc",
    "shortName": "Company07",
    "domainName": "vtest01-07",
    "phone": "18005536387",
    "externalId": "",
    "url": "http://www.company.com",
    "contactEmail": "admin@company.com",
    "loginLogo": "/assets/img/temp/0cc7c98d-9ca0-42e0-9a9d-79e5a330e1dc-wordpress.png",
    "homePageLogo": "/assets/img/temp/c4a64f1d-cf4e-4970-ada3-25273a03320f-wordpress.png",
    "about": "",
    "termsOfService": "",
    "privacyPolicy": "",
    "enablePurchaseOrder": true,
    "enableEmailNotificationsToUsers": true,
    "enableMonthlyBilling": false,
    "defaultChargeType": "Hourly",
    "preferences": [
        {
            "name": "PASSWORD_MIN_LENGTH",
            "value": "5"
        },
        {
            "name": "PASSWORD_EXPIRATION_DAYS",
            "value": "8"
        },
        {
            "name": "PASSWORD_DISABLE_SELF_RESET",
            "value": "true"
        },
        {
            "name": "PASSWORD_REQUIRE_LOWERCASE",
            "value": "true"
        }
    ]
}

Response

{
    "id": "8",
    "resource": "https://<HOST>:<PORT>/v1/tenants/8",
    "perms": [],
    "name": "Company, Inc",
    "url": "http://www.company.com",
    "about": "",
    "contactEmail": "admin@company.com",
    "phone": "18005536387",
    "userId": "23",
    "termsOfService": "",
    "privacyPolicy": "",
    "ccTransactionFeeRate": 0,
    "minAppFeeRate": 0,
    "shortName": "Company07",
    "enablePurchaseOrder": true,
    "enableEmailNotificationsToUsers": true,
    "parentTenantId": 1,
    "externalId": "",
    "defaultActivationProfileId": null,
    "enableMonthlyBilling": false,
    "defaultChargeType": "Hourly",
    "loginLogo": "/assets/vendors/8/img/logo.png",
    "homePageLogo": "/assets/vendors/8/img/logo-loggedin.png",
    "domainName": "vtest01-07.company.com",
    "activationCodes": [],
    "firewallProfiles": [],
    "preferences": [
        {
            "name": "PASSWORD_MIN_LENGTH",
            "value": "5"
        },
        {
            "name": "PASSWORD_DISABLE_SELF_RESET",
            "value": "true"
        },
        {
            "name": "PASSWORD_REQUIRE_LOWERCASE",
            "value": "true"
        },
        {
            "name": "PASSWORD_EXPIRATION_DAYS",
            "value": "8"
        }
    ],
    "user": {
        "id": "23",
        "resource": null,
        "perms": [],
        "username": "admin_n",
        "password": "== red-acted ==",
        "enabled": true,
        "type": "TENANT",
        "firstName": "Admin",
        "lastName": "CloudCenter 07",
        "companyName": "Company, Inc",
        "tenantId": "8",
        "emailAddr": "admin@company.com",
        "emailVerified": true,
        "phoneNumber": "18005536387",
        "externalId": "",
        "accessKeys": "https://<HOST>:<PORT>/v1/users/23/keys",
        "disableReason": null,
        "accountSource": "AdminCreated",
        "status": "ENABLED",
        "detail": null,
        "activationData": null,
        "created": 1439722799000,
        "lastUpdated": 1439722799000,
        "coAdmin": false
    }
}

Example 2

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

The cliqr_user_security_group is created only if both the createUserSecurityGroup and the allowVmConnection attributes are both set to true. The security group is not created if a security group rule is not associated with it. See Security and Firewall Rules for additional context.

Request Body

{
   "userId":"2",
   "firewallProfiles":[
      {
         "tenantId":"1",
         "name":"worker",
         "description":"Firewall rules for job instances",
         "firewallRules":[
            {
               "protocol":"tcp",
               "fromPort":"22",
               "toPort":"22",
               "sourceIPRanges":[
                  "0.0.0.0/0"
               ],
               "cloudId":"1"
            },
            {
               "protocol":"tcp",
               "fromPort":"22",
               "toPort":"22",
               "sourceIPRanges":[
                  "0.0.0.0/0"
               ],
               "cloudId":"3"
            },
            {
               "protocol":"tcp",
               "fromPort":"22",
               "toPort":"22",
               "sourceIPRanges":[
                  "0.0.0.0/0"
               ],
               "cloudId":"4"
            }
         ]
      }
   ],
   "createUserSecurityGroup":true,
   "allowVmConnection":true,
   "disableAllEmailNotification":false,
   "preferences":[
      {
         "name":"PASSWORD_MIN_LENGTH",
         "value":"5"
      }
   ],
   "user":{
      "id":"2",
      "resource":null,
      "username":"cliqradmin",
      "password":"== red-acted ==",
      "enabled":true,
      "type":"TENANT",
      "firstName":"Cliqr",
      "lastName":"Admin",
      "companyName":"Cliqr",
      "tenantId":"1",
      "emailAddr":"admin@cliqrtech.com",
      "emailVerified":true,
      "phoneNumber":null,
      "externalId":null,
      "accessKeys":"https://<HOST>:<PORT>/v1/users/2/keys",
      "disableReason":null,
      "accountSource":null,
      "status":"ENABLED",
      "detail":null,
      "activationData":null,
      "created":1453326938000,
      "lastUpdated":1453327203000,
      "coAdmin":false,
      "tenantAdmin":true,
      "activationProfileId":null,
      "hasSubscriptionPlanType":true
   },
   "trademarkURL":"",
   "deleted":false
}

Response

{
   "id":"1",
   "resource":"https://<HOST>:<PORT>/v1/tenants/1",
   "name":"Cisco Systems",
   "url":"http://www.cisco.com",
   "about":"",
   "contactEmail":"info@cliqrtech.com",
   "phone":"1-888-837-2739",
   "userId":"2",
   "termsOfService":"",
   "privacyPolicy":"",
   "revShareRate":0.0,
   "ccTransactionFeeRate":0.0,
   "minAppFeeRate":0.0,
   "enableConsolidatedBilling":false,
   "shortName":"",
   "enablePurchaseOrder":true,
   "enableEmailNotificationsToUsers":false,
   "parentTenantId":null,
   "externalId":"",
   "defaultActivationProfileId":null,
   "enableMonthlyBilling":false,
   "defaultChargeType":"Hourly",
   "loginLogo":"/assets/vendors/1/img/logo.png",
   "homePageLogo":"/assets/vendors/1/img/logo-loggedin.png",
   "domainName":null,
   "activationCodes":[   ],
   "firewallProfiles":[
      {
         "tenantId":"1",
         "name":"worker",
         "description":"Firewall rules for job instances",
         "firewallRules":[
            {
               "protocol":"tcp",
               "fromPort":"22",
               "toPort":"22",
               "sourceIPRanges":[
                  "0.0.0.0/0"
               ],
               "cloudId":"1"
            },
            {
               "protocol":"tcp",
               "fromPort":"22",
               "toPort":"22",
               "sourceIPRanges":[
                  "0.0.0.0/0"
               ],
               "cloudId":"3"
            },
            {
               "protocol":"tcp",
               "fromPort":"22",
               "toPort":"22",
               "sourceIPRanges":[
                  "0.0.0.0/0"
               ],
               "cloudId":"4"
            }
         ]
      }
   ],
   "createUserSecurityGroup":true,
   "allowVmConnection":true,
   "disableAllEmailNotification":false,
   "preferences":[
      {
         "name":"PASSWORD_MIN_LENGTH",
         "value":"5"
      }
   ],
   "user":{
      "id":"2",
      "resource":null,
      "username":"cliqradmin",
      "password":"== red-acted ==",
      "enabled":true,
      "type":"TENANT",
      "firstName":"Cliqr",
      "lastName":"Admin",
      "companyName":"Cliqr",
      "tenantId":"1",
      "emailAddr":"admin@cliqrtech.com",
      "emailVerified":true,
      "phoneNumber":null,
      "externalId":null,
      "accessKeys":"https://<HOST>:<PORT>/v1/users/2/keys",
      "disableReason":null,
      "accountSource":null,
      "status":"ENABLED",
      "detail":null,
      "activationData":null,
      "created":1453326938000,
      "lastUpdated":1453327203000,
      "coAdmin":false,
      "tenantAdmin":true,
      "activationProfileId":null,
      "hasSubscriptionPlanType":true
   },
   "trademarkURL":"",
   "deleted":false
}

Request Attributes

userId
  • Description: Unique, system-generated identifier for a user
  • Type: String
name
  • DescriptionThe name assigned for this CloudCenter ResourceValid characters are letters, numbers, underscores, and spaces.

  • Type: String

shortName
  • Description: Unique short version of this tenant's name to be used in the Login page. See Add Sub-Tenants > Tenant ID and Tenant Name Dependency.
  • Type: String

Required

domainName
  • Description: DNS domain name for this tenant organization. Valid characters are letters, numbers, hyphens, and underscores. See Add Sub-TenantsTenant ID and Tenant Name Dependency for additional details. The behavior for this attribute differs based on it being a request or a response:
    • API Request: If the suffix company07.com is present in the CCM property file, and requiredname.company07.com is required dnsName, the domainName attribute should only contain the value requiredname.
    • API Response: The domainName attribute  displays requiredname.company07.com.
  • Type: String

Required if the CCM is set up to require a domain name for each tenant

phone
  • DescriptionThe phone number for this tenant organization 
  • 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
url
  • Description: The URL that is associated with the tenant's marketing website. See  Add Sub-TenantsTenant ID and Tenant Name Dependency for additional details.

    This is not the URL to access the CloudCenter platform

  • Type: String
contactEmail
  • Description: The contact email address for this tenant organization
  • Type: String
  • Description: URL of a saved image to be displayed as the logo on the Login page of the CCM uploading logos. See Upload Logo for additional context.
  • Type: String
  • Description: URL of a saved image to be displayed as the logo on the CCM home page after the user has logged into the CloudCenter platform. See Upload Logo for additional context.
  • Type: String
about
  • Description: Additional information about the tenant organization
  • Type: String
termsOfService
  • Description: The text of this contract
  • Type: String
privacyPolicy
  • Description: Privacy policy of the tenant organization
  • Type: String
  • Type: Boolean
enableEmailNotificationsToUsers
  • Description: Indicates if the invoice email at the end of each month must be sent to tenant users.
    • true = Email messages should be sent to users
    • false = email messages should not be sent to users
  • Type: Boolean
enableMonthlyBilling
  • Description: Indicates whether monthly billing should be enabled for this tenant. See Tenant Billing for additional context.
    • true = Enable monthly billing for this tenant
    • false = Do not enable monthly billing for this tenant
  • Type: Boolean

defaultChargeType
  • DescriptionThe default charge type for this account.  
  • Type: Enumeration

    EnumerationDescription
    HOURLYDefault, if not included in the request. See Tenant Billing for additional context.
    MONTHLYSee Tenant Billing for additional context.

createUserSecurityGroup
  • Description: Indicates if a security group should be created for each user. See Security and Firewall Rules for additional context.

    Effective CloudCenter 4.8.1, for AWS, Alibaba, and OpenStack clouds, the cliqr-user-security-group_userId security group is created if both createUserSecurityGroup and allowVmConnection are set to true.

  • Type: Boolean
    • false = The existing property to allow unrestricted access across VMs created by this user and the tenant specific firewall rules per cloud are ignored.
    • true = The existing property to allow unrestricted access across VMs created by this user and the tenant specific firewall rules per cloud are honored.

allowVmConnection
  • Description: Indicates if this user is allowed unrestricted access across VMs and/or if the tenant specific firewall rules per cloud is set. See Security and Firewall Rules for additional context.

    Effective CloudCenter 4.8.1, for AWS, Alibaba, and OpenStack clouds, the cliqr-user-security-group_userId security group is created if both createUserSecurityGroup and allowVmConnection are set to true.

  • Type: Boolean
    • false = The existing property to allow unrestricted access across VMs created by this user and the tenant specific firewall rules per cloud are ignored.
    • true = The existing property to allow unrestricted access across VMs created by this user and the tenant specific firewall rules per cloud are honored.

preferences
  • Description: Identifies the preferences set for all uses within a tenant
  • Type: Array of name-value pairs

    name
    • Description: Tenant administrators can specify password rules. If specified, these rules are enforced for all users within the specified tenant. Effective Cloud Center 4.6.1, the CloudCenter platform enforces a minimum password length of 5 characters for all settings. See Add Sub-Tenants > User Password Rules for additional context
    • Type: Enumeration

      EnumerationDescription
       PASSWORD_MIN_LENGTH

      Specify the minimum length for password
      Default = 5

       PASSWORD_REQUIRE_UPPERCASERequire at least one uppercase character in every password
      Default = false
      PASSWORD_REQUIRE_LOWERCASERequire at least one lowercase character in every password
      Default = false
      PASSWORD_REQUIRE_DIGIT Require at least one digit in every password
      Default = false
      PASSWORD_REQUIRE_SPECIAL_CHARACTER Require at least one special character in every password
      Default = false
       PASSWORD_DISABLE_SELF_RESET Disable the users ability to reset their own passwords
      Default = false
      PASSWORD_EXPIRATION_DAYSSpecify that the password expires in X number of days

      Default = null

     

    value
    • Description: Indicates the set value for this property
    • Type: Float

Response Attributes

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

  • Type: String
resource
  • Description: Unique URL to access this resource.
  • Type: String
perms

Click for additional context

name
  • DescriptionThe name assigned for this CloudCenter ResourceValid characters are letters, numbers, underscores, and spaces.

  • Type: String

url
  • Description: The URL that is associated with the tenant's marketing website. See  Add Sub-TenantsTenant ID and Tenant Name Dependency for additional details.

    This is not the URL to access the CloudCenter platform

  • Type: String
about
  • Description: Additional information about the tenant organization
  • Type: String
contactEmail
  • Description: The contact email address for this tenant organization
  • Type: String
phone
  • DescriptionThe phone number for this tenant organization 
  • Type: String
userId
  • Description: Unique, system-generated identifier for a user
  • Type: String
termsOfService
  • Description: The text of this contract
  • Type: String
privacyPolicy
  • Description: Privacy policy of the tenant organization
  • Type: String
shortName
  • Description: Unique short version of this tenant's name to be used in the Login page. See Add Sub-Tenants > Tenant ID and Tenant Name Dependency.
  • Type: String
  • Type: Boolean
enableEmailNotificationsToUsers
  • Description: Indicates if the invoice email at the end of each month must be sent to tenant users.
    • true = Email messages should be sent to users
    • false = email messages should not be sent to users
  • Type: Boolean
parentTenantId
  • Description: Unique, system-generated identifier for the parent tenant organization
  • Type: Integer
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
defaultActivationProfileId
  • Description: Activation profile ID to use when activating a user if another activation profile ID is not specified. See Map an Activation Profile for additional context.
  • Type: String
enableMonthlyBilling
  • Description: Indicates whether monthly billing should be enabled for this tenant. See Tenant Billing for additional context.
    • true = Enable monthly billing for this tenant
    • false = Do not enable monthly billing for this tenant
  • Type: Boolean
defaultChargeType
  • DescriptionThe default charge type for this account.  
  • Type: Enumeration

    EnumerationDescription
    HOURLYDefault, if not included in the request. See Tenant Billing for additional context.
    MONTHLYSee Tenant Billing for additional context.
loginLogo
  • Description: URL of a saved image to be displayed as the logo on the Login page of the CCM uploading logos. See Upload Logo for additional context.
  • Type: String
homePageLogo
  • Description: URL of a saved image to be displayed as the logo on the CCM home page after the user has logged into the CloudCenter platform. See Upload Logo for additional context.
  • Type: String
domainName
  • Description: DNS domain name for this tenant organization. Valid characters are letters, numbers, hyphens, and underscores. See Add Sub-TenantsTenant ID and Tenant Name Dependency for additional details. The behavior for this attribute differs based on it being a request or a response:
    • API Request: If the suffix company07.com is present in the CCM property file, and requiredname.company07.com is required dnsName, the domainName attribute should only contain the value requiredname.
    • API Response: The domainName attribute  displays requiredname.company07.com.
  • Type: String
activationCodes
  • Description: Information about the activated user
  • Type: Sequence of name-value pairs

    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
    name
    • DescriptionThe name assigned for this CloudCenter ResourceValid characters are letters, numbers, underscores, and spaces.

    • Type: String

    activationProfileId
    • Description: Unique, system-generated identifier for the activationProfile
    • Type: String
firewallProfiles (click for additional details)

createUserSecurityGroup
  • Description: Indicates if a security group should be created for each user. See Security and Firewall Rules for additional context.

    Effective CloudCenter 4.8.1, for AWS, Alibaba, and OpenStack clouds, the cliqr-user-security-group_userId security group is created if both createUserSecurityGroup and allowVmConnection are set to true.

  • Type: Boolean
    • false = The existing property to allow unrestricted access across VMs created by this user and the tenant specific firewall rules per cloud are ignored.
    • true = The existing property to allow unrestricted access across VMs created by this user and the tenant specific firewall rules per cloud are honored.

allowVmConnection
  • Description: Indicates if this user is allowed unrestricted access across VMs and/or if the tenant specific firewall rules per cloud is set. See Security and Firewall Rules for additional context.

    Effective CloudCenter 4.8.1, for AWS, Alibaba, and OpenStack clouds, the cliqr-user-security-group_userId security group is created if both createUserSecurityGroup and allowVmConnection are set to true.

  • Type: Boolean
    • false = The existing property to allow unrestricted access across VMs created by this user and the tenant specific firewall rules per cloud are ignored.
    • true = The existing property to allow unrestricted access across VMs created by this user and the tenant specific firewall rules per cloud are honored.

preferences (click for additional details)
user (click for additional details)