openapi: 3.1.0
info: {}
paths:
  /v1/registry/packages:
    get:
      tags:
        - sf.substreams.dev.registry.v1.RegistryApi
      summary: SearchPackages returns registry packages matching the given filters.
      description: |-
        Each result carries two package references for the latest release: use
         `spkg` (a full URL) when EXECUTING a command programmatically (e.g.
         `substreams run <spkg> <module>`), and use `reference` (the short
         `<slug>@<version>` form) when DISPLAYING a command to a human. Both resolve
         to the same package.
      operationId: sf.substreams.dev.registry.v1.RegistryApi.SearchPackages
      parameters:
        - name: query
          in: query
          description: Free-text search over package name/keywords.
          schema:
            type: string
            title: query
        - name: network
          in: query
          description: Optional network filter (e.g. "mainnet").
          schema:
            type: string
            title: network
        - name: organization
          in: query
          description: Optional organization slug filter.
          schema:
            type: string
            title: organization
        - name: user
          in: query
          description: Optional publisher user login filter.
          schema:
            type: string
            title: user
        - name: featured
          in: query
          description: Restrict to featured packages only.
          schema:
            type: boolean
            title: featured
        - name: page
          in: query
          description: 1-based page number; defaults to 1 when unset.
          schema:
            type: integer
            title: page
        - name: pageSize
          in: query
          description: Page size; defaults to 24, capped at 100.
          schema:
            type: integer
            title: page_size
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sf.substreams.dev.registry.v1.SearchPackagesResponse'
components:
  schemas:
    sf.substreams.dev.registry.v1.Organization:
      type: object
      properties:
        name:
          type: string
          title: name
        slug:
          type: string
          title: slug
      title: Organization
      additionalProperties: false
    sf.substreams.dev.registry.v1.Package:
      type: object
      properties:
        name:
          type: string
          title: name
        slug:
          type: string
          title: slug
        organization:
          title: organization
          $ref: '#/components/schemas/sf.substreams.dev.registry.v1.Organization'
        repository:
          type: string
          title: repository
        downloads:
          type: integer
          title: downloads
        releaseCount:
          type: integer
          title: release_count
        latestVersion:
          type: string
          title: latest_version
          description: latest_version is the most recent release version, when known.
        network:
          type: string
          title: network
          description: network of the latest release, when known.
        spkg:
          type: string
          title: spkg
          description: |-
            spkg is the full package URL for the latest release. USE THIS WHEN EXECUTING
             a command programmatically: pass it directly to `substreams run <spkg>
             <module>` or `substreams gui <spkg>`. Empty when no release version is known.
        reference:
          type: string
          title: reference
          description: |-
            reference is the short `<slug>@<version>` notation for the latest release
             (e.g. "uniswap-v3@v0.1.0"). USE THIS WHEN DISPLAYING a command to a human; it
             is more readable and resolves to the same package as `spkg`. Empty when no
             release version is known.
      title: Package
      additionalProperties: false
    sf.substreams.dev.registry.v1.SearchPackagesRequest:
      type: object
      properties:
        query:
          type: string
          title: query
          description: Free-text search over package name/keywords.
        network:
          type: string
          title: network
          description: Optional network filter (e.g. "mainnet").
        organization:
          type: string
          title: organization
          description: Optional organization slug filter.
        user:
          type: string
          title: user
          description: Optional publisher user login filter.
        featured:
          type: boolean
          title: featured
          description: Restrict to featured packages only.
        page:
          type: integer
          title: page
          description: 1-based page number; defaults to 1 when unset.
        pageSize:
          type: integer
          title: page_size
          description: Page size; defaults to 24, capped at 100.
      title: SearchPackagesRequest
      additionalProperties: false
    sf.substreams.dev.registry.v1.SearchPackagesResponse:
      type: object
      properties:
        packages:
          type: array
          items:
            $ref: '#/components/schemas/sf.substreams.dev.registry.v1.Package'
          title: packages
        hasMore:
          type: boolean
          title: has_more
          description: has_more is true when more pages are available after this one.
      title: SearchPackagesResponse
      additionalProperties: false
security: []
tags:
  - name: sf.substreams.dev.registry.v1.RegistryApi
    description: |-
      RegistryApi is the public, agent-facing API for the substreams.dev package
       registry. It is served as REST+JSON via Vanguard transcoding.
