Files
prefect-go/api
Gregor Schulte 43b4910a63 Initial commit
2026-02-02 08:41:48 +01:00
..
2026-02-02 08:41:48 +01:00
2026-02-02 08:41:48 +01:00

OpenAPI Specification for Prefect Server API

This directory contains the OpenAPI specification for the Prefect v3 Server REST API.

How to obtain the OpenAPI spec

The OpenAPI specification is available from a running Prefect server instance.

Option 1: From a local Prefect server

  1. Start a Prefect server:
prefect server start
  1. Download the OpenAPI specification:
curl http://localhost:4200/openapi.json -o api/openapi.json

Option 2: From Prefect Cloud

curl https://api.prefect.cloud/api/openapi.json -o api/openapi.json

Generating Go code

After obtaining the OpenAPI specification, run:

make generate

This will generate Go types and client code from the OpenAPI spec.

Note

The openapi.json file is not included in the repository by default. You need to obtain it from a running Prefect server instance as described above.

For development purposes, a minimal placeholder spec is provided to allow the project to compile without a full Prefect server setup.