ad-m commented on a change in pull request #7549: [AIRFLOW-6929][DONT-MERGE] Add OpenAPI spec URL: https://github.com/apache/airflow/pull/7549#discussion_r384857666
########## File path: openapi.yaml ########## @@ -0,0 +1,2094 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +--- +openapi: 3.0.3 + +info: + title: "Airflow API (Stable)" + description: | + Apache Airflow management API + version: '1.0.0' + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html + +servers: + - url: /api/v1 + description: Airfow Stable API + +paths: + # Database entities + /connections/: + get: + summary: Get all conneciton entry + tags: [Connection] + parameters: + - $ref: '#/components/parameters/PageLimit' + - $ref: '#/components/parameters/PageOffset' + responses: + '200': + description: List of connection entry + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/ConnectionCollection' + - $ref: '#/components/schemas/CollectionInfo' + '401': + $ref: '#/components/responses/Unauthenticated' + '403': + $ref: '#/components/responses/PermissionDenied' + + post: + summary: Create conneciton entry + tags: [Connection] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Connection' + responses: + '200': + description: Successfull response + content: + application/json: + schema: + $ref: '#/components/schemas/Connection' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthenticated' + '403': + $ref: '#/components/responses/PermissionDenied' + + /connections/{connection_id}: + parameters: + - $ref: '#/components/parameters/ConnectionID' + + get: + summary: Get connection entry + tags: [Connection] + responses: + '200': + description: Successfull response + content: + application/json: + schema: + $ref: '#/components/schemas/Connection' + '401': + $ref: '#/components/responses/Unauthenticated' + '403': + $ref: '#/components/responses/PermissionDenied' + '404': + $ref: '#/components/responses/NotFound' + + patch: + summary: Update a connection entry + tags: [Connection] + parameters: + - $ref: '#/components/parameters/UpdateMask' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Connection' + + responses: + '200': + description: Successfull response + content: + application/json: + schema: + $ref: '#/components/schemas/Connection' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthenticated' + '403': + $ref: '#/components/responses/PermissionDenied' + '404': + $ref: '#/components/responses/NotFound' + + delete: + summary: Delete connection entry + tags: [Connection] + responses: + '204': + description: No content + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthenticated' + '403': + $ref: '#/components/responses/PermissionDenied' + + /dags/: + get: + summary: Get all DAGs + tags: [DAG] + parameters: + - $ref: '#/components/parameters/PageLimit' + - $ref: '#/components/parameters/PageOffset' + responses: + '200': + description: List of DAGs + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/DAGCollection' + - $ref: '#/components/schemas/CollectionInfo' + '401': + $ref: '#/components/responses/Unauthenticated' + + /dags/{dag_id}: + parameters: + - $ref: '#/components/parameters/DAGID' + + get: + summary: Get basic information about DAG. + description: It's contains only information from database (DAGModel). + tags: [DAG] + responses: + '200': + description: Successfull response + content: + application/json: + schema: + $ref: '#/components/schemas/Connection' + '401': + $ref: '#/components/responses/Unauthenticated' + '403': + $ref: '#/components/responses/PermissionDenied' + '404': + $ref: '#/components/responses/NotFound' + + patch: + summary: Update the specific DAG + tags: [DAG] + responses: + '200': + description: Successfull response + content: + application/json: + schema: + $ref: '#/components/schemas/DAG' + '401': + $ref: '#/components/responses/Unauthenticated' + '403': + $ref: '#/components/responses/PermissionDenied' + '404': + $ref: '#/components/responses/NotFound' + + /dags/{dag_id}/dagRuns: + parameters: + - $ref: '#/components/parameters/DAGID' + + get: + summary: Get all DAG Runs + description: This endpoint support reading resources across multiple DAGs by specify a "-" as a dag_id. + tags: [DAGRun] + parameters: + - $ref: '#/components/parameters/PageLimit' + - $ref: '#/components/parameters/PageOffset' + responses: + '200': + description: List of DAG Runs + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/DAGRunCollection' + - $ref: '#/components/schemas/CollectionInfo' + '401': + $ref: '#/components/responses/Unauthenticated' + + /dags/{dag_id}/dagRuns/{dag_run_id}: + parameters: + - $ref: '#/components/parameters/DAGRunID' + + get: + summary: Get DAG Run + tags: [DAGRun] + responses: + '200': + description: Successfull response + content: + application/json: + schema: + $ref: '#/components/schemas/DAGRun' + '401': + $ref: '#/components/responses/Unauthenticated' + '403': + $ref: '#/components/responses/PermissionDenied' + '404': + $ref: '#/components/responses/NotFound' + + patch: + summary: Update a DAG Run + tags: [DAGRun] + parameters: + - $ref: '#/components/parameters/UpdateMask' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/DAGRun' + + responses: + '200': + description: Successfull response + content: + application/json: + schema: + $ref: '#/components/schemas/DAGRun' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthenticated' + '403': + $ref: '#/components/responses/PermissionDenied' + '404': + $ref: '#/components/responses/NotFound' + + delete: + summary: Delete DAG Run. + tags: [DAGRun] + responses: + '204': + description: No content + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthenticated' + '403': + $ref: '#/components/responses/PermissionDenied' + + /eventLogs/: + get: + summary: Get log entries from event log + tags: [EventLog] + parameters: + - $ref: '#/components/parameters/PageLimit' + - $ref: '#/components/parameters/PageOffset' + responses: + '200': + description: List of log entries + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/EventLogCollection' + - $ref: '#/components/schemas/CollectionInfo' + '401': + $ref: '#/components/responses/Unauthenticated' + '403': + $ref: '#/components/responses/PermissionDenied' + + post: + summary: Create event log + tags: [EventLog] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/EventLog' + responses: + '200': + description: Successfull response + content: + application/json: + schema: + $ref: '#/components/schemas/EventLog' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthenticated' + '403': + $ref: '#/components/responses/PermissionDenied' + + /eventLogs/{event_log_id}: + parameters: + - $ref: '#/components/parameters/EventLogID' + + get: + summary: Get log entry + tags: [EventLog] + responses: + '200': + description: Successfull response + content: + application/json: + schema: + $ref: '#/components/schemas/EventLog' + '401': + $ref: '#/components/responses/Unauthenticated' + '403': + $ref: '#/components/responses/PermissionDenied' + '404': + $ref: '#/components/responses/NotFound' + + patch: + summary: Update a log entry + tags: [EventLog] + parameters: + - $ref: '#/components/parameters/UpdateMask' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/EventLog' + + responses: + '200': + description: Successfull response + content: + application/json: + schema: + $ref: '#/components/schemas/EventLog' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthenticated' + '403': + $ref: '#/components/responses/PermissionDenied' + '404': + $ref: '#/components/responses/NotFound' + + delete: + summary: Delete a log entry + tags: [EventLog] + responses: + '204': + description: No content + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthenticated' + '403': + $ref: '#/components/responses/PermissionDenied' + + /importErrors: + get: + summary: Get import error + tags: [ImportError] + parameters: + - $ref: '#/components/parameters/PageLimit' + - $ref: '#/components/parameters/PageOffset' + responses: + '200': + description: List of import error + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/ImportErrorCollection' + - $ref: '#/components/schemas/CollectionInfo' + '401': + $ref: '#/components/responses/Unauthenticated' + '403': + $ref: '#/components/responses/PermissionDenied' + + /importErrors/{import_error_id}: + parameters: + - $ref: '#/components/parameters/ImportErrorID' + + get: + summary: Get import errors + tags: [ImportError] + responses: + '200': + description: Successfull response + content: + application/json: + schema: + $ref: '#/components/schemas/ImportError' + '401': + $ref: '#/components/responses/Unauthenticated' + '403': + $ref: '#/components/responses/PermissionDenied' + '404': + $ref: '#/components/responses/NotFound' + + delete: + summary: Delete import error + tags: [ImportError] + responses: + '204': + description: No content + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthenticated' + '403': + $ref: '#/components/responses/PermissionDenied' + + /pools/: + get: + summary: Get all pools + tags: [Pool] + parameters: + - $ref: '#/components/parameters/PageLimit' + - $ref: '#/components/parameters/PageOffset' + responses: + '200': + description: List of pools + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PoolCollection' + - $ref: '#/components/schemas/CollectionInfo' + '401': + $ref: '#/components/responses/Unauthenticated' + '403': + $ref: '#/components/responses/PermissionDenied' + + post: + summary: Create pool. + tags: [Pool] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Pool' + responses: + '200': + description: Successfull response + content: + application/json: + schema: + $ref: '#/components/schemas/Pool' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthenticated' + '403': + $ref: '#/components/responses/PermissionDenied' + + /pools/{pool_id}: + parameters: + - $ref: '#/components/parameters/PoolID' + + get: + summary: Get pool. + tags: [Pool] + responses: + '200': + description: Successfull response + content: + application/json: + schema: + $ref: '#/components/schemas/Pool' + '401': + $ref: '#/components/responses/Unauthenticated' + '403': + $ref: '#/components/responses/PermissionDenied' + '404': + $ref: '#/components/responses/NotFound' + + patch: + summary: Update a pool + tags: [Pool] + parameters: + - $ref: '#/components/parameters/UpdateMask' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Pool' + + responses: + '200': + description: Successfull response + content: + application/json: + schema: + $ref: '#/components/schemas/Connection' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthenticated' + '403': + $ref: '#/components/responses/PermissionDenied' + '404': + $ref: '#/components/responses/NotFound' + + delete: + summary: Delete pool. + tags: [Pool] + responses: + '204': + description: No content + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthenticated' + '403': + $ref: '#/components/responses/PermissionDenied' + + /dags/{dag_id}/taskInstances/: + get: + summary: Get list of task instance. Review comment: ```suggestion summary: Get list of task instances of DAG ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services