Apache Airflow - OpenApi Client for Go

Clone this repo:


  1. 275741a Prepare for rename default branch to main (#8) by Ash Berlin-Taylor · 3 weeks ago master
  2. b3eb67a Make sample code self-contained & fix errors inside (#7) by Xiaodong DENG · 4 weeks ago
  3. 424e074 enable issue tracking for the repo (#6) by QP Hou · 4 weeks ago
  4. e1deffd add test & doc for authentication (#5) by QP Hou · 8 months ago
  5. 781c285 Fix PostDagRun method name (#4) by QP Hou · 9 months ago

Airflow Go client

Go Airflow OpenAPI client generated from openapi spec.


package main

import (

func main() {
	cli := airflow.NewAPIClient(&airflow.Configuration{
		Scheme:   "http",
		Host:     "localhost:8080",
		BasePath: "/api/v1",

	cred := airflow.BasicAuth{
		UserName: "username",
		Password: "password",
	ctx := context.WithValue(context.Background(), airflow.ContextBasicAuth, cred)

	variable, _, err := cli.VariableApi.GetVariable(ctx, "foo")
	if err != nil {
	} else {

See README for full client API documentation.

Release process

Go client is versioned using semantic import versioning.

To release a new version 1.x.y, simply push a new tag to this repo named airflow/v1.x.y.

Major version upgrade requires changing package import path based on semantic import versioning, which needs to be done manually.