Querying for user information

Querying for users

To retrieve information about a user, you can use the following endpoints:

  • GET /admin/v1/users
  • GET /admin/v1/users/{userId}

For example, the following is the snippet of the response payload when retrieving the information for user pc:S-sAtIMQDbK0z3b2E7Mvw (Alice Applegate).

GET /admin/v1/users/pc:S-sAtIMQDbK0z3b2E7Mvw

{
    "data": {
        "attributes": {
            "active": true,
            "displayName": "Alice Applegate",
            "externalUser": false,
            "firstName": "Alice",
            "groups": [
                {
                    "displayName": "Los Angeles Branch UW",
                    "id": "pc:SSXQ8EaLxQq4LZ33Ia76r"
                },
                {
                    "displayName": "Eastern Region Underwriting",
                    "id": "pc:SVZTqTgdrHJKYQV9aGCbN"
                }
            ],
            "id": "pc:S-sAtIMQDbK0z3b2E7Mvw",
            "lastName": "Applegate",
            "organization": {
                "displayName": "Enigma Fire & Casualty",
                "id": "systemTables:1",
                "type": "Organization",
                "uri": "/admin/v1/organizations/systemTables:1"
            },
            "roles": [
                {
                    "displayName": "Reinsurance Manager",
                    "id": "reinsurance_manager",
                    "type": "Role"
                },
                {
                    "displayName": "Underwriter",
                    "id": "underwriter",
                    "type": "Role"
                }
            ],
            "useOrgAddress": true,
            "useProducerCodeSecurity": false,
            "userType": {
                "code": "underwriter",
                "name": "Underwriter"
            },
            "username": "aapplegate",
            "uwAuthorityProfiles": [
                {
                    "displayName": "Underwriter 1",
                    "id": "pc:underwriter1",
                    "type": "UWAuthorityProfile",
                    "uri": "/admin/v1/uw-authority-profiles/pc:underwriter1"
                }
            ],
            "vacationStatus": {
                "code": "atwork",
                "name": "At work"
            },
            "workPhone": {
                "displayName": "213-555-8164",
                "number": "2135558164"
            }
        }
    }
}

Querying for user roles

A user role is a named group of system permissions. User roles simplify the work of granting access by allowing a set of related system permissions to be assigned to a user.

You cannot create or modify user roles through Cloud API. However, you can retrieve information about user roles. This is useful when you want to create users and assign roles to them through Cloud API.

To retrieve information about user roles, use the following endpoints:

  • GET /admin/v1/roles

For example, the following is the snippet of the response payload when retrieving the first five roles in the base configuration.

GET /admin/v1/roles?pageSize=5

{
    "count": 5,
    "data": [
        {
            "attributes": {
                "carrierInternal": true,
                "description": "Role with full permissions, deprecated" 
                "displayName": "All Permissions (Deprecated)",
                "id": "superuser",
                "name": "All Permissions (Deprecated)",
                "roleType": {
                    "code": "user",
                    "name": "User Role"
                }
            }
        },
        {
            "attributes": {
                "carrierInternal": true,
                "description": "Permissions for audit examiner",
                "displayName": "Audit Examiner",
                "id": "audit_examiner",
                "name": "Audit Examiner",
                "roleType": {
                    "code": "user",
                    "name": "User Role"
                }
            }
        },
        {
            "attributes": {
                "carrierInternal": true,
                "description": "Permissions for audit supervisor",
                "displayName": "Audit Supervisor",
                "id": "audit_supervisor",
                "name": "Audit Supervisor",
                "roleType": {
                    "code": "user",
                    "name": "User Role"
                }
            }
        },
        {
            "attributes": {
                "carrierInternal": false,
                "description": "Base permissions for a claims adjuster",
                "displayName": "Claims Adjuster",
                "id": "claims_adjuster",
                "name": "Claims Adjuster",
                "roleType": {
                    "code": "userproducercode",
                    "name": "User Producer Code Role"
                }
            }
        },
        {
            "attributes": {
                "carrierInternal": true,
                "description": "Permissions for community admin",
                "displayName": "Community Admin",
                "id": "community_admin",
                "name": "Community Admin",
                "roleType": {
                    "code": "user",
                    "name": "User Role"
                }
            }
        }
    ]
}