Looker User API

Manage Looker users including creating, updating, and retrieving user accounts, credentials, roles, and sessions.

OpenAPI Specification

looker-user-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Looker Auth User API
  description: The Looker API 4.0 provides programmatic access to the Looker business intelligence platform. It allows you to manage and interact with Looks, dashboards, queries, users, and other Looker resources. The API uses client credentials (client_id and client_secret) for authentication and returns JSON responses. Looker is part of Google Cloud and the API is available on any Looker instance at the /api/4.0 path.
  version: '4.0'
  contact:
    name: Google Cloud Looker Support
    url: https://cloud.google.com/looker/docs/support
  termsOfService: https://cloud.google.com/terms
  license:
    name: Google Cloud Terms
    url: https://cloud.google.com/terms
servers:
- url: https://{instance}.looker.com/api/4.0
  description: Looker Instance API
  variables:
    instance:
      description: Your Looker instance hostname prefix
      default: your-instance
- url: https://{instance}.cloud.looker.com/api/4.0
  description: Looker (Google Cloud core) Instance API
  variables:
    instance:
      description: Your Looker (Google Cloud core) instance hostname prefix
      default: your-instance
security:
- bearerAuth: []
tags:
- name: User
  description: Manage Looker users including creating, updating, and retrieving user accounts, credentials, roles, and sessions.
paths:
  /users:
    get:
      operationId: allUsers
      summary: Looker List All Users
      description: Returns a list of all Looker user accounts. The response includes basic user information. Use the fields parameter to include additional details such as roles, credentials, and sessions.
      tags:
      - User
      parameters:
      - $ref: '#/components/parameters/fields'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      - name: sorts
        in: query
        description: Sort fields (e.g. last_name asc, created_at desc)
        schema:
          type: string
      - name: ids
        in: query
        description: Comma-separated list of user IDs to retrieve
        schema:
          type: string
      responses:
        '200':
          description: List of users
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/User'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      operationId: createUser
      summary: Looker Create a User
      description: Creates a new Looker user account. The new user will not have any credentials or roles assigned; those must be configured separately via the credentials and role endpoints.
      tags:
      - User
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WriteUser'
      responses:
        '200':
          description: User created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /users/search:
    get:
      operationId: searchUsers
      summary: Looker Search Users
      description: Searches for users matching the specified criteria. Supports filtering by name, email, and other user attributes. Results are paginated.
      tags:
      - User
      parameters:
      - $ref: '#/components/parameters/fields'
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      - name: first_name
        in: query
        description: Filter by first name
        schema:
          type: string
      - name: last_name
        in: query
        description: Filter by last name
        schema:
          type: string
      - name: email
        in: query
        description: Filter by email address
        schema:
          type: string
      - name: is_disabled
        in: query
        description: Filter by disabled status
        schema:
          type: boolean
      - name: sorts
        in: query
        description: Sort fields
        schema:
          type: string
      responses:
        '200':
          description: Search results
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/User'
        '400':
          description: Invalid search parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /users/{user_id}:
    get:
      operationId: user
      summary: Looker Get a User
      description: Retrieves a single user by their ID including their profile information, roles, and credential settings.
      tags:
      - User
      parameters:
      - $ref: '#/components/parameters/userId'
      - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: User details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '404':
          description: User not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      operationId: updateUser
      summary: Looker Update a User
      description: Updates an existing user account. Only the fields provided in the request body are updated. Credentials and roles are managed through separate endpoints.
      tags:
      - User
      parameters:
      - $ref: '#/components/parameters/userId'
      - $ref: '#/components/parameters/fields'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WriteUser'
      responses:
        '200':
          description: Updated user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '404':
          description: User not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      operationId: deleteUser
      summary: Looker Delete a User
      description: Permanently deletes the specified user account. This removes the user and all their credentials. Content created by the user (dashboards, Looks, etc.) is not deleted.
      tags:
      - User
      parameters:
      - $ref: '#/components/parameters/userId'
      responses:
        '204':
          description: User deleted successfully
        '404':
          description: User not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /users/me:
    get:
      operationId: me
      summary: Looker Get Current User
      description: Returns the user record for the currently authenticated user. This is useful for determining which user is associated with the current API session.
      tags:
      - User
      parameters:
      - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: Current user details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /users/{user_id}/roles:
    get:
      operationId: userRoles
      summary: Looker Get User Roles
      description: Returns all roles assigned to the specified user. Roles define the permissions and model access granted to the user.
      tags:
      - User
      parameters:
      - $ref: '#/components/parameters/userId'
      - $ref: '#/components/parameters/fields'
      responses:
        '200':
          description: List of user roles
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Role'
        '404':
          description: User not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    put:
      operationId: setUserRoles
      summary: Looker Set User Roles
      description: Replaces all roles assigned to the specified user. Provide the complete list of role IDs that should be assigned to the user. Any roles not included in the request will be removed.
      tags:
      - User
      parameters:
      - $ref: '#/components/parameters/userId'
      - $ref: '#/components/parameters/fields'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: integer
                format: int64
              description: Array of role IDs to assign
      responses:
        '200':
          description: Updated role assignments
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Role'
        '404':
          description: User not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    CredentialsApi3:
      type: object
      description: API3 client credentials for a user
      properties:
        id:
          type: integer
          format: int64
          description: Unique identifier
          readOnly: true
          example: abc123
        client_id:
          type: string
          description: API3 client ID
          example: '500123'
        created_at:
          type: string
          format: date-time
          description: Timestamp when these credentials were created
          example: '2026-01-15T10:30:00Z'
        is_disabled:
          type: boolean
          description: Whether these credentials are disabled
          example: true
        type:
          type: string
          description: Credential type
          example: example_value
        url:
          type: string
          description: Relative URL
          readOnly: true
          example: https://www.example.com
    Role:
      type: object
      description: A role defines a set of permissions and model access controls that can be assigned to users and groups.
      properties:
        id:
          type: integer
          format: int64
          description: Unique numeric identifier
          readOnly: true
          example: abc123
        name:
          type: string
          description: Display name of the role
          example: Example Title
        permission_set:
          $ref: '#/components/schemas/PermissionSet'
        permission_set_id:
          type: integer
          format: int64
          description: ID of the permission set assigned to this role
          example: '500123'
        model_set:
          $ref: '#/components/schemas/ModelSet'
        model_set_id:
          type: integer
          format: int64
          description: ID of the model set assigned to this role
          example: '500123'
        user_count:
          type: integer
          description: Number of users with this role
          readOnly: true
          example: 10
        url:
          type: string
          description: Relative URL for this role
          readOnly: true
          example: https://www.example.com
    CredentialsEmail:
      type: object
      description: Email/password credentials for a user
      properties:
        email:
          type: string
          description: Email address
          example: user@example.com
        is_disabled:
          type: boolean
          description: Whether these credentials are disabled
          example: true
        logged_in_at:
          type: string
          format: date-time
          nullable: true
          description: Timestamp of last login with these credentials
          example: '2026-01-15T10:30:00Z'
        created_at:
          type: string
          format: date-time
          description: Timestamp when these credentials were created
          example: '2026-01-15T10:30:00Z'
        url:
          type: string
          description: Relative URL
          readOnly: true
          example: https://www.example.com
    PermissionSet:
      type: object
      description: A set of permissions that can be assigned to a role
      properties:
        id:
          type: integer
          format: int64
          description: Unique numeric identifier
          readOnly: true
          example: abc123
        name:
          type: string
          description: Display name
          example: Example Title
        permissions:
          type: array
          description: List of permission strings
          items:
            type: string
          example: []
        built_in:
          type: boolean
          description: Whether this is a built-in permission set
          readOnly: true
          example: true
        all_access:
          type: boolean
          description: Whether this grants all permissions
          readOnly: true
          example: true
        url:
          type: string
          description: Relative URL
          readOnly: true
          example: https://www.example.com
    Session:
      type: object
      description: An active user session
      properties:
        id:
          type: integer
          format: int64
          description: Unique session identifier
          readOnly: true
          example: abc123
        ip_address:
          type: string
          description: IP address of the session
          example: example_value
        browser:
          type: string
          description: Browser used for this session
          example: example_value
        operating_system:
          type: string
          description: Operating system used for this session
          example: example_value
        city:
          type: string
          nullable: true
          description: City from which the session originates
          example: example_value
        state:
          type: string
          nullable: true
          description: State from which the session originates
          example: example_value
        country:
          type: string
          nullable: true
          description: Country from which the session originates
          example: example_value
        credentials_type:
          type: string
          description: Type of credentials used
          example: example_value
        extended_at:
          type: string
          format: date-time
          description: Timestamp when the session was last extended
          example: '2026-01-15T10:30:00Z'
        extended_count:
          type: integer
          description: Number of times the session has been extended
          example: 10
        sudo_user_id:
          type: integer
          format: int64
          nullable: true
          description: ID of the user being sudo'd as
          example: '500123'
        created_at:
          type: string
          format: date-time
          description: Timestamp when the session was created
          example: '2026-01-15T10:30:00Z'
        expires_at:
          type: string
          format: date-time
          description: Timestamp when the session expires
          example: '2026-01-15T10:30:00Z'
        url:
          type: string
          description: Relative URL
          readOnly: true
          example: https://www.example.com
    User:
      type: object
      description: A Looker user account. Users have credentials, roles, and can own content such as Looks, dashboards, and queries.
      properties:
        id:
          type: integer
          format: int64
          description: Unique numeric identifier
          readOnly: true
          example: abc123
        first_name:
          type: string
          description: First name
          example: example_value
        last_name:
          type: string
          description: Last name
          example: example_value
        display_name:
          type: string
          description: Full display name
          readOnly: true
          example: example_value
        email:
          type: string
          description: Email address
          example: user@example.com
        avatar_url:
          type: string
          description: URL of the user's avatar image
          readOnly: true
          example: https://www.example.com
        is_disabled:
          type: boolean
          description: Whether the user account is disabled
          example: true
        locale:
          type: string
          nullable: true
          description: User's locale setting
          example: example_value
        home_space_id:
          type: string
          nullable: true
          description: ID of the user's personal space (folder)
          readOnly: true
          example: '500123'
        home_folder_id:
          type: string
          nullable: true
          description: ID of the user's personal folder
          readOnly: true
          example: '500123'
        personal_space_id:
          type: integer
          format: int64
          nullable: true
          description: ID of the user's personal space
          readOnly: true
          example: '500123'
        personal_folder_id:
          type: integer
          format: int64
          nullable: true
          description: ID of the user's personal folder
          readOnly: true
          example: '500123'
        presumed_looker_employee:
          type: boolean
          description: Whether the user is a Looker employee
          readOnly: true
          example: true
        verified_looker_employee:
          type: boolean
          description: Whether the user is a verified Looker employee
          readOnly: true
          example: true
        roles_externally_managed:
          type: boolean
          description: Whether user roles are managed externally (e.g. via SAML)
          readOnly: true
          example: true
        allow_direct_roles:
          type: boolean
          description: Whether roles can be assigned directly to this user
          readOnly: true
          example: true
        allow_normal_group_membership:
          type: boolean
          description: Whether the user can be added to groups
          readOnly: true
          example: true
        allow_roles_from_normal_groups:
          type: boolean
          description: Whether the user inherits roles from groups
          readOnly: true
          example: true
        embed_group_space_id:
          type: integer
          format: int64
          nullable: true
          description: Embed group space ID
          readOnly: true
          example: '500123'
        credentials_email:
          $ref: '#/components/schemas/CredentialsEmail'
        credentials_api3:
          type: array
          description: API3 credentials for this user
          items:
            $ref: '#/components/schemas/CredentialsApi3'
          readOnly: true
          example: []
        sessions:
          type: array
          description: Active sessions for this user
          items:
            $ref: '#/components/schemas/Session'
          readOnly: true
          example: []
        role_ids:
          type: array
          description: IDs of roles assigned to this user
          items:
            type: integer
            format: int64
          readOnly: true
          example: []
        group_ids:
          type: array
          description: IDs of groups this user belongs to
          items:
            type: integer
            format: int64
          readOnly: true
          example: []
        url:
          type: string
          description: Relative URL for this user
          readOnly: true
          example: https://www.example.com
        created_at:
          type: string
          format: date-time
          description: Timestamp when the user was created
          readOnly: true
          example: '2026-01-15T10:30:00Z'
    ErrorResponse:
      type: object
      description: Error response from the Looker API
      properties:
        message:
          type: string
          description: Human-readable error message
          example: example_value
        documentation_url:
          type: string
          description: URL to relevant API documentation
          example: https://www.example.com
    WriteUser:
      type: object
      description: Writable fields for creating or updating a user
      properties:
        first_name:
          type: string
          description: First name
          example: example_value
        last_name:
          type: string
          description: Last name
          example: example_value
        email:
          type: string
          description: Email address
          example: user@example.com
        is_disabled:
          type: boolean
          description: Whether the account is disabled
          example: true
        locale:
          type: string
          nullable: true
          description: Locale setting
          example: example_value
    ModelSet:
      type: object
      description: A set of LookML models that can be assigned to a role
      properties:
        id:
          type: integer
          format: int64
          description: Unique numeric identifier
          readOnly: true
          example: abc123
        name:
          type: string
          description: Display name
          example: Example Title
        models:
          type: array
          description: List of model names included in this set
          items:
            type: string
          example: []
        built_in:
          type: boolean
          description: Whether this is a built-in model set
          readOnly: true
          example: true
        all_access:
          type: boolean
          description: Whether this grants access to all models
          readOnly: true
          example: true
        url:
          type: string
          description: Relative URL
          readOnly: true
          example: https://www.example.com
  parameters:
    limit:
      name: limit
      in: query
      description: Maximum number of results to return
      schema:
        type: integer
        default: 100
    userId:
      name: user_id
      in: path
      required: true
      description: The unique numeric ID of the user
      schema:
        type: integer
        format: int64
    fields:
      name: fields
      in: query
      description: Comma-separated list of field names to include in the response. Use this to limit response payload and improve performance.
      schema:
        type: string
    offset:
      name: offset
      in: query
      description: Number of results to skip before returning results
      schema:
        type: integer
        default: 0
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Access token obtained from the /login endpoint using client credentials. Include as Bearer token in the Authorization header.
externalDocs:
  description: Looker API 4.0 Documentation
  url: https://cloud.google.com/looker/docs/reference/looker-api/latest