> ## Documentation Index
> Fetch the complete documentation index at: https://aspect.inc/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List User All Projects Access

> List ALL projects in a workspace with detailed access info for a specific user.

This endpoint returns every project in the workspace with the user's access status,
effective role, and whether they have explicit permissions (overrides).
Works for both full users and stub users.

Response logic by workspace role:
- OWNER: has_access=True, role=FULL_ACCESS, is_override=False, is_explicit=False for all
- MEMBER (no explicit): has_access=(project.default_role != NO_ACCESS), role=project.default_role, is_override=False, is_explicit=False
- MEMBER (with explicit): has_access=(explicit_role != NO_ACCESS), role=explicit_role, is_override=True, is_explicit=True
- MEMBER_LIMITED (with explicit): has_access=True, role=explicit_role, is_override=False, is_explicit=True
- MEMBER_LIMITED (no explicit): has_access=False, role=None, is_override=False, is_explicit=False

Authorization: Requires workspace owner (ADMIN). Self-view is not allowed
because it would leak project names the user does not have access to.



## OpenAPI

````yaml /api-reference/openapi.json get /workspaces/{workspace_id}/users/{user_id}/all-projects
openapi: 3.1.0
info:
  title: Aspect Platform API
  description: A FastAPI application for Aspect Platform functionality
  version: 0.0.0
servers:
  - url: https://api.aspect.inc
security:
  - BearerAuth: []
  - ApiKeyAuth: []
paths:
  /workspaces/{workspace_id}/users/{user_id}/all-projects:
    get:
      tags:
        - Workspaces
      summary: List User All Projects Access
      description: >-
        List ALL projects in a workspace with detailed access info for a
        specific user.


        This endpoint returns every project in the workspace with the user's
        access status,

        effective role, and whether they have explicit permissions (overrides).

        Works for both full users and stub users.


        Response logic by workspace role:

        - OWNER: has_access=True, role=FULL_ACCESS, is_override=False,
        is_explicit=False for all

        - MEMBER (no explicit): has_access=(project.default_role != NO_ACCESS),
        role=project.default_role, is_override=False, is_explicit=False

        - MEMBER (with explicit): has_access=(explicit_role != NO_ACCESS),
        role=explicit_role, is_override=True, is_explicit=True

        - MEMBER_LIMITED (with explicit): has_access=True, role=explicit_role,
        is_override=False, is_explicit=True

        - MEMBER_LIMITED (no explicit): has_access=False, role=None,
        is_override=False, is_explicit=False


        Authorization: Requires workspace owner (ADMIN). Self-view is not
        allowed

        because it would leak project names the user does not have access to.
      operationId: get_Workspaces_workspaces_workspace_id_users_user_id_all_projects
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workspace Id
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/WorkspaceUserProjectAccessDetailResponse
                title: >-
                  Response List User All Projects Access Workspaces  Workspace
                  Id  Users  User Id  All Projects Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    WorkspaceUserProjectAccessDetailResponse:
      properties:
        project_id:
          type: string
          format: uuid
          title: Project Id
          description: Project ID
        project_name:
          type: string
          title: Project Name
          description: Project name
        project_icon:
          anyOf:
            - $ref: '#/components/schemas/CustomIconData'
            - type: 'null'
          description: Project icon data
        has_access:
          type: boolean
          title: Has Access
          description: True if user can access this project
        role:
          anyOf:
            - $ref: '#/components/schemas/ResourceRole'
            - type: 'null'
          description: User's effective role on this project (None if no access)
        is_override:
          type: boolean
          title: Is Override
          description: >-
            For MEMBER users: true if user has an explicit permission record
            (even if role matches default)
          default: false
        is_explicit:
          type: boolean
          title: Is Explicit
          description: True if user has an explicit permission record on this project
          default: false
        default_role:
          $ref: '#/components/schemas/ResourceRole'
          description: >-
            The project's default_role for reference (for UI to show 'Revert to
            X')
      type: object
      required:
        - project_id
        - project_name
        - has_access
        - default_role
      title: WorkspaceUserProjectAccessDetailResponse
      description: API response schema for detailed project access info.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CustomIconData:
      properties:
        type:
          $ref: '#/components/schemas/CustomIconType'
          description: Type of icon (emoji, upload, color, or url)
        emoji:
          anyOf:
            - type: string
            - type: 'null'
          title: Emoji
          description: Emoji character (if type is emoji)
        color:
          anyOf:
            - type: string
            - type: 'null'
          title: Color
          description: Hex color code (if type is color)
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
          description: External URL (if type is url)
        upload:
          anyOf:
            - $ref: '#/components/schemas/AttachmentResponse'
            - type: 'null'
          description: >-
            Full attachment object (if type is upload, populated by service
            layer)
      type: object
      required:
        - type
      title: CustomIconData
      description: |-
        Icon data for storage and API responses.

        Stored in JSONB `icon` column. For upload type icons:
        - The `upload` field is None in the database
        - The actual attachment is stored via `icon_attachment_id` FK
        - Service layer populates `upload` from the attachment when loading
    ResourceRole:
      type: string
      enum:
        - owner
        - member
        - member_limited
        - full_access
        - editor
        - commenter
        - downloader
        - viewer
        - no_access
      title: ResourceRole
      description: |-
        Unified role enum for both workspace and project permissions.
        Stored as PostgreSQL ENUM type 'resourcerole' in database.

        Pattern follows existing enums like AssetType:
        - Python enum: ResourceRole.OWNER = "owner" (lowercase value)
        - PostgreSQL ENUM: 'OWNER', 'MEMBER', etc. (uppercase in DB)
        - SQLAlchemy: sa.Enum('OWNER', 'MEMBER', ..., name='resourcerole')
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    CustomIconType:
      type: string
      enum:
        - emoji
        - upload
        - color
        - url
      title: CustomIconType
      description: Type of custom icon
    AttachmentResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Resource identifier
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
          description: Signed download URL
        url_expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Url Expires At
          description: When the URL expires
        user_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: User Id
          description: User who uploaded. None if deleted.
        filename:
          type: string
          title: Filename
          description: Original filename
        mime_type:
          type: string
          title: Mime Type
          description: MIME type of the file
        size_bytes:
          type: integer
          title: Size Bytes
          description: File size in bytes
        uploaded:
          type: boolean
          title: Uploaded
          description: Whether the file has been uploaded
        created:
          type: string
          format: date-time
          title: Created
          description: Created timestamp
        updated:
          type: string
          format: date-time
          title: Updated
          description: Updated timestamp
      type: object
      required:
        - id
        - user_id
        - filename
        - mime_type
        - size_bytes
        - uploaded
        - created
        - updated
      title: AttachmentResponse
      description: |-
        API response schema for an attachment.

        Inherits id, url, url_expires_at from SignedUrlData.
        Overrides url and url_expires_at as Optional since attachments
        may not be uploaded yet.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT in Authorization header. 'Bearer ' prefix optional.
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Aspect API key (sk_...) in Authorization header. 'Bearer ' optional.

````