Sanity · Arazzo Workflow

Sanity Discover Project Datasets

Version 1.0.0

List accessible projects, then enumerate the datasets of a chosen project.

1 workflow 1 source API 1 provider
View Spec View on GitHub Headless CMSContent ManagementGROQReal-TimeStructured ContentDeveloper PlatformArazzoWorkflows

Provider

sanity

Workflows

discover-project-datasets
Enumerate projects and drill into one project's details and datasets.
Lists accessible projects, and when at least one exists, reads the first project's details and lists its datasets.
3 steps inputs: apiToken outputs: datasets, displayName, projects
1
listProjects
List every project the token can access and capture the id of the first project for drill-down.
2
getProject
Read the details of the first accessible project.
3
listDatasets
List the datasets that belong to the chosen project.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Sanity Discover Project Datasets
  summary: List accessible projects, then enumerate the datasets of a chosen project.
  description: >-
    A discovery flow for a Sanity account. The workflow lists every project the
    authenticated token can reach, then branches: when at least one project is
    returned it fetches that project's details and enumerates its datasets, and
    when no projects are returned it ends. 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: projectsApi
  url: ../openapi/sanity-projects-api-openapi.yml
  type: openapi
workflows:
- workflowId: discover-project-datasets
  summary: Enumerate projects and drill into one project's details and datasets.
  description: >-
    Lists accessible projects, and when at least one exists, reads the first
    project's details and lists its datasets.
  inputs:
    type: object
    required:
    - apiToken
    properties:
      apiToken:
        type: string
        description: Sanity management API token used as a Bearer credential.
  steps:
  - stepId: listProjects
    description: >-
      List every project the token can access and capture the id of the first
      project for drill-down.
    operationId: listProjects
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.apiToken"
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      projects: $response.body
      firstProjectId: $response.body#/0/id
    onSuccess:
    - name: hasProjects
      type: goto
      stepId: getProject
      criteria:
      - context: $response.body
        condition: $.length > 0
        type: jsonpath
    - name: noProjects
      type: end
      criteria:
      - context: $response.body
        condition: $.length == 0
        type: jsonpath
  - stepId: getProject
    description: Read the details of the first accessible project.
    operationId: getProject
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.apiToken"
    - name: projectId
      in: path
      value: $steps.listProjects.outputs.firstProjectId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      displayName: $response.body#/displayName
  - stepId: listDatasets
    description: List the datasets that belong to the chosen project.
    operationId: listDatasets
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.apiToken"
    - name: projectId
      in: path
      value: $steps.listProjects.outputs.firstProjectId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      datasets: $response.body
  outputs:
    projects: $steps.listProjects.outputs.projects
    displayName: $steps.getProject.outputs.displayName
    datasets: $steps.listDatasets.outputs.datasets

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/sanity-discover-project-datasets-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.