> ## 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 Recent Resources

> List the current user's recently accessed resources in a workspace.



## OpenAPI

````yaml /api-reference/openapi.json get /recents
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:
  /recents:
    get:
      tags:
        - Recents
      summary: List Recent Resources
      description: List the current user's recently accessed resources in a workspace.
      operationId: get_Recents_recents
      parameters:
        - name: workspace_id
          in: query
          required: true
          schema:
            type: string
            format: uuid
            description: Workspace to list recent resources for
            title: Workspace Id
          description: Workspace to list recent resources for
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 50
            minimum: 1
            default: 20
            title: Limit
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Offset
        - name: exclude_types
          in: query
          required: false
          schema:
            type: array
            items:
              $ref: '#/components/schemas/ResourceType'
            description: >-
              Resource types to exclude from the results (e.g. workspace,
              project)
            default: []
            title: Exclude Types
          description: Resource types to exclude from the results (e.g. workspace, project)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecentResourcesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ResourceType:
      type: string
      enum:
        - workspace
        - project
        - directory
        - asset
        - symlink
        - collection
      title: ResourceType
      description: |-
        Types of resources in the system hierarchy.

        - Python enum value (``.value``) is the lowercase wire format, e.g.
          ``"workspace"``. This is what crosses the JSON boundary.
        - Python enum name (``.name``) is the uppercase identifier used as the
          PostgreSQL ENUM literal, e.g. ``'WORKSPACE'`` — SQLAlchemy uses
          ``.name`` by default for ``sa.Enum`` columns, so no DB migration is
          needed when this pattern is adopted.

        Raw SQL comparisons against the ``resources.type`` column must use
        ``.name`` (not ``.value``) to match the PG ENUM literal.
    RecentResourcesResponse:
      properties:
        resources:
          items:
            oneOf:
              - $ref: '#/components/schemas/WorkspaceResourceInfo'
              - $ref: '#/components/schemas/ProjectResourceInfo'
              - $ref: '#/components/schemas/CollectionResourceInfo'
              - $ref: '#/components/schemas/DirectoryResourceInfo'
              - $ref: '#/components/schemas/AssetResourceInfo'
            discriminator:
              propertyName: type
              mapping:
                asset:
                  $ref: '#/components/schemas/AssetResourceInfo'
                collection:
                  $ref: '#/components/schemas/CollectionResourceInfo'
                directory:
                  $ref: '#/components/schemas/DirectoryResourceInfo'
                project:
                  $ref: '#/components/schemas/ProjectResourceInfo'
                workspace:
                  $ref: '#/components/schemas/WorkspaceResourceInfo'
          type: array
          title: Resources
          description: Recently accessed resources in most-recent-first order
        has_more:
          type: boolean
          title: Has More
          description: Whether another page of recent resources is available
      type: object
      required:
        - resources
        - has_more
      title: RecentResourcesResponse
      description: API response with the user's recently accessed resources.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    WorkspaceResourceInfo:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Resource ID
        type:
          type: string
          const: workspace
          title: Type
          description: Workspace resource type
        name:
          type: string
          title: Name
          description: Resource display name
        workspace_id:
          type: string
          format: uuid
          title: Workspace Id
          description: Workspace ID containing the resource
        project_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Project Id
          description: Project ID containing the resource, when applicable
        actions:
          type: integer
          title: Actions
          description: Caller's permitted actions bitmap
          default: 0
        icon:
          anyOf:
            - $ref: '#/components/schemas/CustomIconData'
            - type: 'null'
          description: Workspace icon metadata
      type: object
      required:
        - id
        - type
        - name
        - workspace_id
      title: WorkspaceResourceInfo
      description: Lightweight display metadata for a workspace resource.
    ProjectResourceInfo:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Resource ID
        type:
          type: string
          const: project
          title: Type
          description: Project resource type
        name:
          type: string
          title: Name
          description: Resource display name
        workspace_id:
          type: string
          format: uuid
          title: Workspace Id
          description: Workspace ID containing the resource
        project_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Project Id
          description: Project ID containing the resource, when applicable
        actions:
          type: integer
          title: Actions
          description: Caller's permitted actions bitmap
          default: 0
        icon:
          anyOf:
            - $ref: '#/components/schemas/CustomIconData'
            - type: 'null'
          description: Project icon metadata
        dominant_color:
          anyOf:
            - type: string
            - type: 'null'
          title: Dominant Color
          description: Dominant color extracted from the project icon
        root_directory_id:
          type: string
          format: uuid
          title: Root Directory Id
          description: Project root directory ID
      type: object
      required:
        - id
        - type
        - name
        - workspace_id
        - root_directory_id
      title: ProjectResourceInfo
      description: Lightweight display metadata for a project resource.
    CollectionResourceInfo:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Resource ID
        type:
          type: string
          const: collection
          title: Type
          description: Collection resource type
        name:
          type: string
          title: Name
          description: Resource display name
        workspace_id:
          type: string
          format: uuid
          title: Workspace Id
          description: Workspace ID containing the resource
        project_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Project Id
          description: Project ID containing the resource, when applicable
        actions:
          type: integer
          title: Actions
          description: Caller's permitted actions bitmap
          default: 0
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Collection description
        icon:
          anyOf:
            - $ref: '#/components/schemas/CustomIconData'
            - type: 'null'
          description: Collection icon metadata
      type: object
      required:
        - id
        - type
        - name
        - workspace_id
      title: CollectionResourceInfo
      description: Lightweight display metadata for a collection resource.
    DirectoryResourceInfo:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Resource ID
        type:
          type: string
          const: directory
          title: Type
          description: Directory resource type
        name:
          type: string
          title: Name
          description: Resource display name
        workspace_id:
          type: string
          format: uuid
          title: Workspace Id
          description: Workspace ID containing the resource
        project_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Project Id
          description: Project ID containing the resource, when applicable
        actions:
          type: integer
          title: Actions
          description: Caller's permitted actions bitmap
          default: 0
        color:
          anyOf:
            - type: string
            - type: 'null'
          title: Color
          description: Directory icon color
        parent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Id
          description: Parent resource ID
        breadcrumb_path:
          items:
            type: string
          type: array
          title: Breadcrumb Path
          description: >-
            Ancestor directory names ordered root-first, excluding the directory
            itselfand the project's auto-created root/trash directories. Empty
            for the project root.
      type: object
      required:
        - id
        - type
        - name
        - workspace_id
        - breadcrumb_path
      title: DirectoryResourceInfo
      description: Lightweight display metadata for a directory resource.
    AssetResourceInfo:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Resource ID
        type:
          type: string
          const: asset
          title: Type
          description: Asset resource type
        name:
          type: string
          title: Name
          description: Resource display name
        workspace_id:
          type: string
          format: uuid
          title: Workspace Id
          description: Workspace ID containing the resource
        project_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Project Id
          description: Project ID containing the resource, when applicable
        actions:
          type: integer
          title: Actions
          description: Caller's permitted actions bitmap
          default: 0
        mime_type:
          type: string
          title: Mime Type
          description: Asset MIME type
        parent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Id
          description: Parent resource ID
        preview_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Preview Id
          description: Asset preview ID, when available
        scrub_preview_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Scrub Preview Id
          description: Asset scrub preview ID, when available
        breadcrumb_path:
          items:
            type: string
          type: array
          title: Breadcrumb Path
          description: >-
            Ancestor directory names ordered root-first, excluding the project's
            auto-created root/trash directories. Empty for the project root.
      type: object
      required:
        - id
        - type
        - name
        - workspace_id
        - mime_type
        - breadcrumb_path
      title: AssetResourceInfo
      description: Lightweight display metadata for an asset resource.
    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
    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
    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.

````