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

# Query project template rows

> Project template table rows. Default columns: name, tags, task count, automated-task count, trigger types and schedule count. Opt-in via `columns`: n_active_projects (projects launched from the template that aren't complete), n_active_tasks (the incomplete tasks on those projects) and created_at. Task counts include the tasks inside conditional branches.



## OpenAPI

````yaml /api-reference/cx/swagger.json post /library/project/_query
openapi: 3.0.0
info:
  description: CX API.
  title: CX API
  contact:
    name: API Support
    url: https://stax.ai
    email: support@stax.ai
  version: '1.0'
servers:
  - url: https://api.cx.stax.ai
security: []
paths:
  /library/project/_query:
    post:
      tags:
        - library
      summary: Query project template rows
      description: >-
        Project template table rows. Default columns: name, tags, task count,
        automated-task count, trigger types and schedule count. Opt-in via
        `columns`: n_active_projects (projects launched from the template that
        aren't complete), n_active_tasks (the incomplete tasks on those
        projects) and created_at. Task counts include the tasks inside
        conditional branches.
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/pkg_routes_library_project_templates.QueryTemplatesRequest
        description: Query project templates request
        required: true
      responses:
        '200':
          description: Project template rows
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/pkg_routes_library_project_templates.QueryTemplatesResponse
        '400':
          description: Bad request - invalid request body
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      security:
        - ApiKeyAuth: []
components:
  schemas:
    pkg_routes_library_project_templates.QueryTemplatesRequest:
      type: object
      properties:
        columns:
          description: Columns names the optional cells to add to the default response.
          type: array
          items:
            type: string
        filters:
          $ref: >-
            #/components/schemas/pkg_routes_library_project_templates.QueryTemplatesFilters
        page:
          $ref: '#/components/schemas/types.ListPagination'
        sort:
          $ref: '#/components/schemas/types.ListSort'
    pkg_routes_library_project_templates.QueryTemplatesResponse:
      type: object
      properties:
        rows:
          type: array
          items:
            $ref: >-
              #/components/schemas/pkg_routes_library_project_templates.TemplateRow
        total:
          type: integer
    pkg_routes_library_project_templates.QueryTemplatesFilters:
      type: object
      properties:
        category:
          type: array
          items:
            type: string
        created:
          $ref: '#/components/schemas/types.ListFilterDate'
        data:
          type: array
          items:
            $ref: '#/components/schemas/types.ListFilterData'
        has_schedules:
          type: boolean
        has_triggers:
          description: |-
            HasTriggers and HasSchedules narrow to the templates that launch
            themselves, or away from them.
          type: boolean
        ids:
          type: array
          items:
            type: string
        search:
          type: string
        tags:
          type: array
          items:
            type: string
    types.ListPagination:
      type: object
      properties:
        limit:
          type: integer
        skip:
          type: integer
    types.ListSort:
      type: object
      properties:
        field:
          type: string
        last: {}
        order:
          type: integer
    pkg_routes_library_project_templates.TemplateRow:
      type: object
      properties:
        _id:
          type: string
        created_at:
          type: string
        n_active_projects:
          description: The opt-in cells, null unless their column was requested.
          type: integer
        n_active_tasks:
          type: integer
        n_automated_tasks:
          description: >-
            NumAutomatedTasks is the subset of those tasks an automation
            completes.
          type: integer
        n_schedules:
          type: integer
        n_tasks:
          description: >-
            NumTasks counts every task the template can launch, the tasks inside
            its

            conditional branches included — a branch's tasks are as much part of
            the

            template as the ones on the main path, they just may not all run.
          type: integer
        name:
          type: string
        tags:
          type: array
          items:
            type: string
        triggers:
          description: >-
            Triggers names the events that launch this template; NumSchedules
            counts

            the standing schedules that do the same on a timer.
          type: array
          items:
            type: string
    types.ListFilterDate:
      type: object
      properties:
        after:
          type: string
        before:
          type: string
    types.ListFilterData:
      type: object
      properties:
        key:
          type: string
        op:
          type: string
        value: {}
  securitySchemes:
    ApiKeyAuth:
      description: CX API key. Create one in CX under Settings → Advanced → API Keys.
      in: header
      name: x-api-key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.