View Roles

Details

API Details
Name

View Roles

Description

Displays information for each User Role or for a specified user role within the specified tenant 

MethodGET
URI
  • v1/tenants/tenantId/roles
  • v1/tenants/tenantId/roles/roleId
CloudCenter ReleaseIntroduced in CloudCenter 4.0.
Notes
  • For additional context on <PORT> usage in the following example(s), see Base URI Format.
  • The CloudCenter GET APIs display up to 20 entities in the listing by default. If you have more than 20 entities in your resource listing, use the pagination query parameters to view them beyond the first 20 entities returned by default. See the CloudCenter API Overview  > Pagination  section for additional context.
  • If you include a roleId to identify a role, the response includes information for that role only.
ESB Header
  • action: get.tenants.tenantId.roles
  • action: get.tenants.tenantId.roles.roleId

Example 1 – v1/tenants/tenantId/roles

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

Response

{
    "resource": "https://<HOST>:<PORT>/v1/tenants/1/roles",
    "size": 7,
    "pageNumber": 0,
    "totalElements": 7,
    "totalPages": 1,
    "roles": [
        {
            "id": "1",
            "resource": https://<HOST>:<PORT>/v1/tenants/1/roles/1,
            "perms": [],
            "name": "Admin",
            "description": "",
            "tenantId": "1",
            "objectPerms": [
                {
                    "objectType": "CLOUD_ACCOUNT",
                    "perms": [
                        "CREATE_CLOUD_ACCOUNT"
                    ]
                },
                {
                    "objectType": "APP",
                    "perms": [
                        "CREATE_APP",
                        "UPDATE_APP",
                        "DELETE_APP",
                        "START_APP",
                        "STOP_APP",
                        "RESTART_APP",
                        "CANCEL_APP",
                        "SCALE_UP_APP",
                        "SCALE_DOWN_APP"
                    ]
                },
                {
                    "objectType": "APP_VENDOR_STORE",
                    "perms": []
                },
                {
                    "objectType": "CLOUD",
                    "perms": [
                        "CREATE_CLOUD"
                    ]
                },
                {
                    "objectType": "DEPLOYMENT_ENVIRONMENT",
                    "perms": [
                        "CREATE_DEPLOYMENT_ENVIRONMENT"
                    ]
                },
                {
                    "objectType": "POLICY",
                    "perms": [
                        "CREATE_POLICY"
                    ]
                },
                {
                    "objectType": "APP_PROFILE",
                    "perms": [
                        "CREATE_APP_PROFILE"
                    ]
                }
            ],
            "users": [
                {
                    "id": "1",
                    "resource": https://<HOST>:<PORT>/v1/tenants/1/roles/1/users/1,
                    "perms": [],
                    "username": "sysadmin",
                    "password": "xxxxxxx",
                    "enabled": true,
                    "type": "STANDARD",
                    "firstName": "Admin",
                    "lastName": "Admin",
                    "companyName": "Osmosix",
                    "tenantId": "1",
                    "emailAddr": "admin@osmosix.com",
                    "emailVerified": true,
                    "phoneNumber": "",
                    "externalId": null,
                    "accessKeys": null,
                    "disableReason": null,
                    "accountSource": null,
                    "status": null,
                    "detail": null,
                    "activationData": null,
                    "created": 1433242061000,
                    "lastUpdated": 1433242063000,
                    "coAdmin": false
                },
                {
                    "id": "4",
                    "resource": https://<HOST>:<PORT>/v1/tenants/1/roles/1/users/4,
                    "perms": [],
                    "username": "marketing_4",
                    "password": "xxxxxxxx",
                    "enabled": true,
                    "type": "TENANT",
                    "firstName": "Marketing",
                    "lastName": "CloudCenter",
                    "companyName": "Company",
                    "tenantId": "2",
                    "emailAddr": "marketing@company.com",
                    "emailVerified": true,
                    "phoneNumber": "18005536387",
                    "externalId": "",
                    "accessKeys": null,
                    "disableReason": null,
                    "accountSource": "AdminCreated",
                    "status": null,
                    "detail": null,
                    "activationData": null,
                    "created": 1433265468000,
                    "lastUpdated": 1433265468000,
                    "coAdmin": false
                },
                {
                    "id": "3",
                    "resource": https://<HOST>:<PORT>/v1/tenants/1/roles/1/users/3,
                    "perms": [],
                    "username": "sales_3",
                    "password": "xxxxxxxxx",
                    "enabled": true,
                    "type": "TENANT",
                    "firstName": "Sales",
                    "lastName": "Engineering",
                    "companyName": "Sales",
                    "tenantId": "3",
                    "emailAddr": "sales@company.com",
                    "emailVerified": true,
                    "phoneNumber": "18005536387",
                    "externalId": "",
                    "accessKeys": null,
                    "disableReason": null,
                    "accountSource": "AdminCreated",
                    "status": null,
                    "detail": null,
                    "activationData": null,
                    "created": 1433265283000,
                    "lastUpdated": 1433265283000,
                    "coAdmin": false
                }
            ],
            "groups": [],
            "oobRole": true,
            "created": 1433242061000,
            "lastUpdated": 1433522038000
        },
        {
            "id": "2",
            "resource": https://<HOST>:<PORT>/v1/tenants/1/roles/2,
            "perms": [],
            "name": "Standard User",
            "description": null,
            "tenantId": "1",
            "objectPerms": [
                {
                    "objectType": "CLOUD_ACCOUNT",
                    "perms": []
                },
                {
                    "objectType": "APP",
                    "perms": [
                        "CREATE_APP",
                        "UPDATE_APP",
                        "DELETE_APP",
                        "START_APP",
                        "STOP_APP",
                        "RESTART_APP",
                        "CANCEL_APP",
                        "SCALE_UP_APP",
                        "SCALE_DOWN_APP"
                    ]
                },
                {
                    "objectType": "APP_VENDOR_STORE",
                    "perms": [
                        "START_APP_VENDOR_STORE"
                    ]
                },
                {
                    "objectType": "CLOUD",
                    "perms": []
                },
                {
                    "objectType": "DEPLOYMENT_ENVIRONMENT",
                    "perms": []
                },
                {
                    "objectType": "POLICY",
                    "perms": [
                        "CREATE_POLICY"
                    ]
                },
                {
                    "objectType": "APP_PROFILE",
                    "perms": []
                }
            ],
            "users": [
                {
                    "id": "12",
                    "resource": https://<HOST>:<PORT>/v1/tenants/1/roles/2/users/12,
                    "perms": [],
                    "username": "1_c",
                    "password": "xxxx",
                    "enabled": false,
                    "type": "STANDARD",
                    "firstName": "t",
                    "lastName": "u",
                    "companyName": "1",
                    "tenantId": "1",
                    "emailAddr": "1@company.com",
                    "emailVerified": false,
                    "phoneNumber": "18005536387",
                    "externalId": "",
                    "accessKeys": null,
                    "disableReason": null,
                    "accountSource": "AdminCreated",
                    "status": null,
                    "detail": null,
                    "activationData": null,
                    "created": 1433800135000,
                    "lastUpdated": 1433800135000,
                    "coAdmin": false
                },
                {
                    "id": "13",
                    "resource": https://<HOST>:<PORT>/v1/tenants/1/roles/2/users/13,
                    "perms": [],
                    "username": "test_d",
                    "password": "xxx",
                    "enabled": false,
                    "type": "STANDARD",
                    "firstName": "Test",
                    "lastName": "Test",
                    "companyName": "test",
                    "tenantId": "1",
                    "emailAddr": "test@company.com",
                    "emailVerified": false,
                    "phoneNumber": "18005536387",
                    "externalId": "",
                    "accessKeys": null,
                    "disableReason": null,
                    "accountSource": "AdminCreated",
                    "status": null,
                    "detail": null,
                    "activationData": null,
                    "created": 1433800673000,
                    "lastUpdated": 1433800673000,
                    "coAdmin": false
                },
                {
                    "id": "7",
                    "resource": https://<HOST>:<PORT>/v1/tenants/1/roles/2/users/7,
                    "perms": [],
                    "username": "user1_7",
                    "password": "xxxxx",
                    "enabled": false,
                    "type": "STANDARD",
                    "firstName": "User1",
                    "lastName": "User1",
                    "companyName": "Company",
                    "tenantId": "1",
                    "emailAddr": "user1@company.com",
                    "emailVerified": false,
                    "phoneNumber": "18005536387",
                    "externalId": "",
                    "accessKeys": null,
                    "disableReason": null,
                    "accountSource": "AdminCreated",
                    "status": null,
                    "detail": null,
                    "activationData": null,
                    "created": 1433553650000,
                    "lastUpdated": 1433553650000,
                    "coAdmin": false
                },
                {
                    "id": "14",
                    "resource": https://<HOST>:<PORT>/v1/tenants/1/roles/2/users/14,
                    "perms": [],
                    "username": "user2_e",
                    "password": "xxxxxx",
                    "enabled": false,
                    "type": "STANDARD",
                    "firstName": "Test2",
                    "lastName": "Test2",
                    "companyName": "Company",
                    "tenantId": "1",
                    "emailAddr": "user2@company.com",
                    "emailVerified": false,
                    "phoneNumber": "18005536387",
                    "externalId": "",
                    "accessKeys": null,
                    "disableReason": null,
                    "accountSource": "AdminCreated",
                    "status": null,
                    "detail": null,
                    "activationData": null,
                    "created": 1433873080000,
                    "lastUpdated": 1433873080000,
                    "coAdmin": false
                }
            ],
            "groups": [],
            "oobRole": true,
            "created": 1433242061000,
            "lastUpdated": 1433242063000
        },
        {
            "id": "3",
            "resource": https://<HOST>:<PORT>/v1/tenants/1/roles/3,
            "perms": [],
            "name": "Dev/Test",
            "description": null,
            "tenantId": "1",
            "objectPerms": [
                {
                    "objectType": "CLOUD_ACCOUNT",
                    "perms": []
                },
                {
                    "objectType": "APP",
                    "perms": [
                        "CREATE_APP",
                        "UPDATE_APP",
                        "DELETE_APP",
                        "START_APP",
                        "STOP_APP",
                        "RESTART_APP",
                        "CANCEL_APP",
                        "SCALE_UP_APP",
                        "SCALE_DOWN_APP"
                    ]
                },
                {
                    "objectType": "APP_VENDOR_STORE",
                    "perms": []
                },
                {
                    "objectType": "CLOUD",
                    "perms": []
                },
                {
                    "objectType": "DEPLOYMENT_ENVIRONMENT",
                    "perms": [
                        "CREATE_DEPLOYMENT_ENVIRONMENT"
                    ]
                },
                {
                    "objectType": "POLICY",
                    "perms": [
                        "CREATE_POLICY"
                    ]
                },
                {
                    "objectType": "APP_PROFILE",
                    "perms": [
                        "CREATE_APP_PROFILE"
                    ]
                }
            ],
            "users": [],
            "groups": [],
            "oobRole": true,
            "created": 1433242061000,
            "lastUpdated": 1433242063000
        },
        {
            "id": "4",
            "resource": https://<HOST>:<PORT>/v1/tenants/1/roles/4,
            "perms": [],
            "name": "Ops",
            "description": null,
            "tenantId": "1",
            "objectPerms": [
                {
                    "objectType": "CLOUD_ACCOUNT",
                    "perms": []
                },
                {
                    "objectType": "APP",
                    "perms": [
                        "CREATE_APP",
                        "UPDATE_APP",
                        "DELETE_APP",
                        "START_APP",
                        "STOP_APP",
                        "RESTART_APP",
                        "CANCEL_APP",
                        "SCALE_UP_APP",
                        "SCALE_DOWN_APP"
                    ]
                },
                {
                    "objectType": "APP_VENDOR_STORE",
                    "perms": [
                        "START_APP_VENDOR_STORE",
                        "STOP_APP_VENDOR_STORE",
                        "DELETE_APP_VENDOR_STORE",
                        "SCALE_APP_VENDOR_STORE",
                        "BENCHMARK_APP_VENDOR_STORE"
                    ]
                },
                {
                    "objectType": "CLOUD",
                    "perms": []
                },
                {
                    "objectType": "DEPLOYMENT_ENVIRONMENT",
                    "perms": [
                        "CREATE_DEPLOYMENT_ENVIRONMENT"
                    ]
                },
                {
                    "objectType": "POLICY",
                    "perms": [
                        "CREATE_POLICY"
                    ]
                },
                {
                    "objectType": "APP_PROFILE",
                    "perms": []
                }
            ],
            "users": [],
            "groups": [],
            "oobRole": true,
            "created": 1433242061000,
            "lastUpdated": 1433242063000
        },
        {
            "id": "5",
            "resource": https://<HOST>:<PORT>/v1/tenants/1/roles/5,
            "perms": [],
            "name": "Business User",
            "description": null,
            "tenantId": "1",
            "objectPerms": [
                {
                    "objectType": "CLOUD_ACCOUNT",
                    "perms": []
                },
                {
                    "objectType": "APP",
                    "perms": [
                        "CREATE_APP",
                        "UPDATE_APP",
                        "DELETE_APP",
                        "START_APP",
                        "STOP_APP",
                        "RESTART_APP",
                        "CANCEL_APP",
                        "SCALE_UP_APP",
                        "SCALE_DOWN_APP"
                    ]
                },
                {
                    "objectType": "APP_VENDOR_STORE",
                    "perms": [
                        "START_APP_VENDOR_STORE",
                        "STOP_APP_VENDOR_STORE",
                        "DELETE_APP_VENDOR_STORE",
                        "SCALE_APP_VENDOR_STORE",
                        "BENCHMARK_APP_VENDOR_STORE"
                    ]
                },
                {
                    "objectType": "CLOUD",
                    "perms": []
                },
                {
                    "objectType": "DEPLOYMENT_ENVIRONMENT",
                    "perms": []
                },
                {
                    "objectType": "POLICY",
                    "perms": []
                },
                {
                    "objectType": "APP_PROFILE",
                    "perms": []
                }
            ],
            "users": [],
            "groups": [],
            "oobRole": true,
            "created": 1433242061000,
            "lastUpdated": 1433242063000
        },
        {
            "id": "6",
            "resource": https://<HOST>:<PORT>/v1/tenants/1/roles/6,
            "perms": [],
            "name": "Manage Cloud Accounts",
            "description": null,
            "tenantId": "1",
            "objectPerms": [
                {
                    "objectType": "CLOUD_ACCOUNT",
                    "perms": [
                        "CREATE_CLOUD_ACCOUNT"
                    ]
                },
                {
                    "objectType": "APP",
                    "perms": [
                        "CREATE_APP",
                        "UPDATE_APP",
                        "DELETE_APP",
                        "START_APP",
                        "STOP_APP",
                        "RESTART_APP",
                        "CANCEL_APP",
                        "SCALE_UP_APP",
                        "SCALE_DOWN_APP"
                    ]
                },
                {
                    "objectType": "APP_VENDOR_STORE",
                    "perms": [
                        "START_APP_VENDOR_STORE",
                        "STOP_APP_VENDOR_STORE",
                        "DELETE_APP_VENDOR_STORE",
                        "SCALE_APP_VENDOR_STORE",
                        "BENCHMARK_APP_VENDOR_STORE"
                    ]
                },
                {
                    "objectType": "CLOUD",
                    "perms": []
                },
                {
                    "objectType": "DEPLOYMENT_ENVIRONMENT",
                    "perms": []
                },
                {
                    "objectType": "POLICY",
                    "perms": []
                },
                {
                    "objectType": "APP_PROFILE",
                    "perms": []
                }
            ],
            "users": [],
            "groups": [],
            "oobRole": true,
            "created": 1433242846000,
            "lastUpdated": 1433242846000
        },
        {
            "id": "7",
            "resource": https://<HOST>:<PORT>/v1/tenants/1/roles/7,
            "perms": [],
            "name": "Manage Clouds",
            "description": null,
            "tenantId": "1",
            "objectPerms": [
                {
                    "objectType": "CLOUD_ACCOUNT",
                    "perms": []
                },
                {
                    "objectType": "APP",
                    "perms": [
                        "CREATE_APP",
                        "UPDATE_APP",
                        "DELETE_APP",
                        "START_APP",
                        "STOP_APP",
                        "RESTART_APP",
                        "CANCEL_APP",
                        "SCALE_UP_APP",
                        "SCALE_DOWN_APP"
                    ]
                },
                {
                    "objectType": "APP_VENDOR_STORE",
                    "perms": [
                        "START_APP_VENDOR_STORE",
                        "STOP_APP_VENDOR_STORE",
                        "DELETE_APP_VENDOR_STORE",
                        "SCALE_APP_VENDOR_STORE",
                        "BENCHMARK_APP_VENDOR_STORE"
                    ]
                },
                {
                    "objectType": "CLOUD",
                    "perms": [
                        "CREATE_CLOUD"
                    ]
                },
                {
                    "objectType": "DEPLOYMENT_ENVIRONMENT",
                    "perms": []
                },
                {
                    "objectType": "POLICY",
                    "perms": []
                },
                {
                    "objectType": "APP_PROFILE",
                    "perms": []
                }
            ],
            "users": [],
            "groups": [],
            "oobRole": true,
            "created": 1433242846000,
            "lastUpdated": 1433242846000
        }
    ]
} 

Example 2 – v1/tenants/tenantId/roles/roleId

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

{
    "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": [
                "CREATE_POLICY"
            ]
        },
        {
            "objectType": "CLOUD_ACCOUNT",
            "perms": []
        },
        {
            "objectType": "APP_PROFILE",
            "perms": []
        }
    ],
    "users": [
        {
            "id": "18",
            "resource": "https://<HOST>:<PORT>/v1/users/18",
            "perms": [],
            "username": "user.07_i",
            "password": "===red-acted===",
            "enabled": true,
            "type": "STANDARD",
            "firstName": "User 07",
            "lastName": "CloudCenter",
            "companyName": "Company, Inc",
            "tenantId": "1",
            "emailAddr": "user.07@company.com",
            "emailVerified": true,
            "phoneNumber": "18005536387",
            "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": "===red-acted===",
                    "enabled": true,
                    "type": "STANDARD",
                    "firstName": "User 01",
                    "lastName": "CloudCenter",
                    "companyName": "Company, Inc",
                    "tenantId": "1",
                    "emailAddr": "user.01@company.com",
                    "emailVerified": true,
                    "phoneNumber": "18005536387",
                    "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": "===red-acted===",
                    "enabled": true,
                    "type": "STANDARD",
                    "firstName": "User 04",
                    "lastName": "CloudCenter",
                    "companyName": "Company, Inc",
                    "tenantId": "1",
                    "emailAddr": "user.04@company.com",
                    "emailVerified": true,
                    "phoneNumber": "18005536387",
                    "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": 1440995584000
}

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
roleId
  • DescriptionUnique, system-generated identifier for a role
  • Type: String

Response Attributes

roles
  • Description: Identifies information about roles
  • Type: Array of roles

    See pageResource or Pagination for additional context

    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