Prisma · Arazzo Workflow

Prisma Client List and Count Records

Version 1.0.0

Count records matching a filter, then fetch the first page of matching records ordered and paginated.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub ArazzoWorkflows

Provider

prisma

Workflows

list-and-count-records
Count records matching a filter and then list the first page of matches.
Counts records matching a filter, then lists the first page of matching records ordered and limited by a take value.
2 steps inputs: model, orderBy, take, where outputs: records, total
1
countRecords
Count how many records match the supplied filter so pagination can be sized before fetching any rows.
2
listRecords
Fetch the first page of records matching the same filter, ordered and limited by the supplied take value.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Prisma Client List and Count Records
  summary: Count records matching a filter, then fetch the first page of matching records ordered and paginated.
  description: >-
    A reporting pattern over the Prisma Client REST facade. The workflow first
    counts how many records match a filter so a caller can size pagination, then
    fetches the first page of matching records using the same filter with
    ordering and a take limit. Counting before listing avoids over-fetching and
    lets the caller decide how many pages to request. The Client API is a local
    library facade and does not require an Authorization header. Every step
    spells out its request inline so the flow can be read and executed without
    opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: aggregationApi
  url: ../openapi/prisma-aggregation-api-openapi.yml
  type: openapi
- name: crudApi
  url: ../openapi/prisma-crud-api-openapi.yml
  type: openapi
workflows:
- workflowId: list-and-count-records
  summary: Count records matching a filter and then list the first page of matches.
  description: >-
    Counts records matching a filter, then lists the first page of matching
    records ordered and limited by a take value.
  inputs:
    type: object
    required:
    - model
    - where
    properties:
      model:
        type: string
        description: The Prisma model name to query (e.g. user, post).
      where:
        type: string
        description: JSON-encoded filter conditions using Prisma query operators.
      orderBy:
        type: string
        description: JSON-encoded sort specification with field names and asc/desc.
      take:
        type: integer
        description: Number of records to return in the first page.
  steps:
  - stepId: countRecords
    description: >-
      Count how many records match the supplied filter so pagination can be
      sized before fetching any rows.
    operationId: count
    parameters:
    - name: model
      in: path
      value: $inputs.model
    - name: where
      in: query
      value: $inputs.where
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      total: $response.body
  - stepId: listRecords
    description: >-
      Fetch the first page of records matching the same filter, ordered and
      limited by the supplied take value.
    operationId: findMany
    parameters:
    - name: model
      in: path
      value: $inputs.model
    - name: where
      in: query
      value: $inputs.where
    - name: orderBy
      in: query
      value: $inputs.orderBy
    - name: take
      in: query
      value: $inputs.take
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      firstRecordId: $response.body#/0/id
      records: $response.body
  outputs:
    total: $steps.countRecords.outputs.total
    records: $steps.listRecords.outputs.records

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/prisma-client-list-and-count-records-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.