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

# Get Portfolio Groups

> Get all portfolio groups in the organization with pagination.
Groups are sorted by created_at in descending order.
Optionally filter by group name using the 'q' parameter.



## OpenAPI

````yaml /api-reference/openapi.json get /portfolio/groups
openapi: 3.1.0
info:
  title: baselayer-api-service
  version: 0.1.0
servers:
  - url: https://api.baselayer.com/
security: []
paths:
  /portfolio/groups:
    get:
      tags:
        - Portfolio Monitoring
      summary: Get Portfolio Groups
      description: |-
        Get all portfolio groups in the organization with pagination.
        Groups are sorted by created_at in descending order.
        Optionally filter by group name using the 'q' parameter.
      operationId: get_portfolio_groups_portfolio_groups_get
      parameters:
        - name: q
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: q
            description: >-
              The query param to search by portfolio group name. If provided,
              only groups with names containing this term (case-insensitive)
              will be returned.
          description: >-
            The query param to search by portfolio group name. If provided, only
            groups with names containing this term (case-insensitive) will be
            returned.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            description: >-
              Maximum number of records to return in a single page. Must be
              between 1 and 1000.
            default: 10
            title: Limit
          description: >-
            Maximum number of records to return in a single page. Must be
            between 1 and 1000.
        - name: offset
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 0
              - type: 'null'
            description: >-
              Number of records to skip from the beginning. Use 0 for the first
              page. Cannot be used with cursor.
            title: Offset
          description: >-
            Number of records to skip from the beginning. Use 0 for the first
            page. Cannot be used with cursor.
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Opaque pagination cursor token that identifies the position in the
              result set. Use the cursor from the previous response to get the
              next page. Cannot be used with offset.
            title: Cursor
          description: >-
            Opaque pagination cursor token that identifies the position in the
            result set. Use the cursor from the previous response to get the
            next page. Cannot be used with offset.
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/v1.PortfolioGroupSummaryResponse'
            application/vnd.baselayer.v1+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/v1.PortfolioGroupSummaryResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    v1.PortfolioGroupSummaryResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: The unique identifier of the portfolio group.
        name:
          type: string
          title: Name
          description: The name of the portfolio group.
        items_count:
          type: integer
          title: Items Count
          description: The number of items in this portfolio group.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the portfolio group was created.
        updated_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Updated At
          description: When the portfolio group was last updated.
        console_url:
          readOnly: true
          title: Console Url
          type: string
      type: object
      required:
        - id
        - name
        - items_count
        - created_at
        - updated_at
        - console_url
      title: PortfolioGroupSummaryResponse (v1)
      description: Represents a summary of a portfolio group.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````