# Implementing Stable API for Apache Airflow

DevFeed: [Implementing Stable API for Apache Airflow](<https://devfeed.tech/articles/implementing-stable-api-for-apache-airflow-32563.md>)

Original publisher: [Read original article](<https://airflow.apache.org/blog/implementing-stable-api-for-apache-airflow/>)

Author: Apache Airflow

Published: 2020-07-19T00:00:00Z

Content type: article

Language: en

Sources: [Apache Airflow Blog](<https://devfeed.tech/sources/apache-airflow-blog.md>)

Topics: [REST API](<https://devfeed.tech/topics/rest-api.md>), [OpenAPI Specification](<https://devfeed.tech/topics/openapi.md>), [API](<https://devfeed.tech/topics/api.md>), [Database](<https://devfeed.tech/topics/database.md>), [unit tests](<https://devfeed.tech/topics/unit-tests.md>), [Flask](<https://devfeed.tech/topics/flask.md>)

Tags: [apache-airflow](<https://devfeed.tech/tags/apache-airflow.md>), [api](<https://devfeed.tech/tags/api.md>), [implementing](<https://devfeed.tech/tags/implementing.md>), [openapi](<https://devfeed.tech/tags/openapi.md>), [rest-api](<https://devfeed.tech/tags/rest-api.md>), [schema](<https://devfeed.tech/tags/schema.md>), [tests](<https://devfeed.tech/tags/tests.md>)

## AI overview

An Outreachy intern describes progress on extending and improving the Apache Airflow REST API. The article covers read-only Connection and DagRun endpoints, database schema work with Marshmallow 2, unit tests, OpenAPI date-time validation, and workarounds for library licensing and parsing issues.

## Source excerpt

My Outreachy internship is coming to its ends which is also the best time to look back and reflect on the progress so far. The goal of my project is to Extend and Improve the Apache Airflow REST API. In this post, I will be sharing my progress so far. We started a bit late implementing the REST API because it took time for the OpenAPI 3.0 specification we were to use for the project to be merged. Thanks to Kamil, who paved the way for us to start implementing the REST API endpoints. Below are the endpoints I implemented and the challenges I encountered, including how I overcame them. Implementing The Read-Only Connection Endpoints The read-only connection endpoints were the first endpoint I implemented. Looking back, I can see how much I have improved. I started by implementing the database schema for the Connection table using Marshmallow 2. We had to use Marshmallow 2 because Flask-AppBuilder was still using it and Flask-AppBuilder is deeply integrated to Apache Airflow. This meant I had to unlearn Marshmallow 3 that I had been studying before this realization, but thankfully, Marshmallow 3 isn't too different, so I was able to start using Marshmallow 2 in no time. This first PR would have been more difficult than it was unless there had been any reference endpoint to look at. Kamil implemented a draft PR in which I took inspiration from. Thanks to this, It was easy for me to write the unit tests. It was also in this endpoint that I learned using parameterized in unit tests :D. Implementing The Read-Only DagRuns Endpoints This endpoint came with its many challenges, especially on filtering with datetimes. This was because the connexion library we were using to build the REST API was not validating date-time format in OpenAPI 3.0 specification, what I eventually found out, was intentional. Connexion dropped strict-rfc3339 because of the later license which is not compatible with Apache 2.0 license. I implemented a workaround on this, by defining a function called c