Update Role

Details

API Details
Name

Update Role

Description

Updates any attribute in the configured Roles with the specified Role ID within the specified tenant.

MethodPUT
URIv1/tenants/tenantId/roles/roleId
CloudCenter ReleaseIntroduced in CloudCenter 4.0.
NotesFor additional context on <PORT> usage in the following example(s), see Base URI Format.
ESB Headeraction: update.tenants.tenantId.roles.roleId

Example

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

Request Body

{
    "id": "52",
    "tenantId": 1,
    "name": "Testing02",
    "description": "Testing02",
    "users": [
        {
            "id": "18"
        }
    ],
    "groups": [
        {
            "id": "5"
        }
    ],
    "objectPerms": [
        {
            "objectType": "APP",
            "perms": [
                "CREATE_APP"
            ]
        },
        {
            "objectType": "APP_PROFILE",
            "perms": []
        },
        {
            "objectType": "POLICY",
            "perms": []
        },
        {
            "objectType": "DEPLOYMENT_ENVIRONMENT",
            "perms": [
                "CREATE_DEPLOYMENT_ENVIRONMENT"
            ]
        },
        {
            "objectType": "CLOUD",
            "perms": []
        },
        {
            "objectType": "CLOUD_ACCOUNT",
            "perms": []
        }
    ]
}

 

Response

{
    "id": "52",
    "resource": "https://<HOST>:<PORT>/v1/tenants/1/roles/52",
    "perms": [],
    "name": "Testing02",
    "description": "Testing02",
    "tenantId": "1",
    "objectPerms": [
        {
            "objectType": "DEPLOYMENT_ENVIRONMENT",
            "perms": [
                "CREATE_DEPLOYMENT_ENVIRONMENT"
            ]
        },
        {
            "objectType": "APP",
            "perms": [
                "CREATE_APP"
            ]
        },
        {
            "objectType": "CLOUD",
            "perms": []
        },
        {
            "objectType": "POLICY",
            "perms": []
        },
        {
            "objectType": "APP_VENDOR_STORE",
            "perms": []
        },
        {
            "objectType": "CLOUD_ACCOUNT",
            "perms": []
        },
        {
            "objectType": "APP_PROFILE",
            "perms": []
        }
    ],
    "users": [
        {
            "id": "18",
            "resource": "https://<HOST>:<PORT>/v1/users/18",
            "perms": [],
            "username": "user.07_i",
            "password": "===readacted===",
            "enabled": true,
            "type": "STANDARD",
            "firstName": "User 07",
            "lastName": "CloudCenter",
            "companyName": "Company, Inc",
            "tenantId": "1",
            "emailAddr": "user.07@company.com",
            "emailVerified": true,
            "phoneNumber": "14085467899",
            "externalId": "",
            "accessKeys": null,
            "disableReason": null,
            "accountSource": "AdminCreated",
            "status": null,
            "detail": null,
            "activationData": null,
            "created": 1439007624000,
            "lastUpdated": 1439007624000,
            "coAdmin": false
        }
    ],
    "groups": [
        {
            "id": "5",
            "resource": "https://<HOST>:<PORT>/v1/tenants/1/groups/5",
            "perms": [],
            "name": "Development 3",
            "description": "Development",
            "tenantId": "1",
            "users": [
                {
                    "id": "11",
                    "resource": "https://<HOST>:<PORT>/v1/users/11",
                    "perms": [],
                    "username": "user.01_b",
                    "password": "===readacted===",
                    "enabled": true,
                    "type": "STANDARD",
                    "firstName": "User 01",
                    "lastName": "CloudCenter",
                    "companyName": "Company, Inc",
                    "tenantId": "1",
                    "emailAddr": "user.01@company.com",
                    "emailVerified": true,
                    "phoneNumber": "14085467899",
                    "externalId": "",
                    "accessKeys": null,
                    "disableReason": null,
                    "accountSource": "AdminCreated",
                    "status": null,
                    "detail": null,
                    "activationData": null,
                    "created": 1438980545000,
                    "lastUpdated": 1438980545000,
                    "coAdmin": false
                },
                {
                    "id": "15",
                    "resource": "https://<HOST>:<PORT>/v1/users/15",
                    "perms": [],
                    "username": "user.04_f",
                    "password": "===readacted===",
                    "enabled": true,
                    "type": "STANDARD",
                    "firstName": "User 04",
                    "lastName": "CloudCenter",
                    "companyName": "Company, Inc",
                    "tenantId": "1",
                    "emailAddr": "user.04@company.com",
                    "emailVerified": true,
                    "phoneNumber": "14085467900",
                    "externalId": "",
                    "accessKeys": null,
                    "disableReason": null,
                    "accountSource": "AdminCreated",
                    "status": null,
                    "detail": null,
                    "activationData": null,
                    "created": 1438986155000,
                    "lastUpdated": 1438986155000,
                    "coAdmin": false
                }
            ],
            "roles": [],
            "created": 1449332534000,
            "lastUpdated": 1439337703000
        }
    ],
    "oobRole": false,
    "created": 1440995584000,
    "lastUpdated": 1441003542000
}

 

Request Attributes

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

roleId
  • DescriptionUnique, system-generated identifier for a role
  • Type: String

Required

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

  • Type: String

description
  • DescriptionA brief description for this CloudCenter Resource.

  • Type: String

users (click for additional details)

If specified, provide the corresponding User ID.

group (click for additional details)
If specified, provide the corresponding Group ID .

objectPerms
  • Description: Identifies the permissions for this resource
  • Type: Array of name-value pairs

    objectType
    • Description: The name for each type of permission that a user or group can create, update, view, or delete a resource. See Permission Control >Tenant Owner Permission Nuances for additional details.
    • Type: Enumeration

    Required

    perms
    • Description: The permission level for each resource. See Permission Control >Tenant Owner Permission Nuances for additional details.
    • Type: Enumeration

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 details)

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

  • Type: String

Required

description
  • DescriptionA brief description for this CloudCenter Resource.

  • 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

objectPerms
  • Description: Identifies the permissions for this resource
  • Type: Array of name-value pairs

    objectType
    • Description: The name for each type of permission that a user or group can create, update, view, or delete a resource. See Permission Control >Tenant Owner Permission Nuances for additional details.
    • Type: Enumeration

    Required

    perms
    • Description: The permission level for each resource. See Permission Control >Tenant Owner Permission Nuances for additional details.
    • Type: Enumeration

 users (click for additional details)

 groups (click for additional details)

oobRole
  • Description: Indicates whether this role is a predefined system role for this tenant organization
    • true = this role is a predefined system role for this tenant organization
    • false = this role is not a predefined system role for this tenant organization
  • Type: Boolean
created
  • Description: The date that this resource or favorite was created (system generated). This is a read-only attribute and cannot be configured.
  • Type: Long
lastUpdated
  • Description: Date that this resource was last updated. This attribute is the same as the lastUpdatedTime attribute.

  • Type: Long