You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/06/22 13:23:12 UTC

[GitHub] [airflow] OmairK commented on a change in pull request #9473: [WIP] Dag Runs CRUD endpoints

OmairK commented on a change in pull request #9473:
URL: https://github.com/apache/airflow/pull/9473#discussion_r443553805



##########
File path: airflow/api_connexion/openapi/v1.yaml
##########
@@ -276,6 +276,34 @@ paths:
                   - $ref: '#/components/schemas/CollectionInfo'
         '401':
           $ref: '#/components/responses/Unauthenticated'
+    
+    post:
+      summary: Trigger a DAG Run
+      operationId: airflow.api_connexion.endpoints.dag_run_endpoint.post_dag_run
+      tags: [DAGRun]
+      requestBody:
+        required: true
+        content:
+          application/json:
+            schema:
+              $ref: '#/components/schemas/DAGRun'
+      responses:
+        '200':
+          description: Successful response.
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/DAGRun'
+        '400':
+          $ref: '#/components/responses/BadRequest'
+        '401':
+          $ref: '#/components/responses/Unauthenticated'
+        '409':
+          $ref: '#/components/responses/AlreadyExists'
+        '403':
+          $ref: '#/components/responses/PermissionDenied'
+        '404':
+          $ref: '#/components/responses/NotFound'

Review comment:
       I moved the `post request` from endpoint `/dags/{dag_id}/dagRuns/{dag_run_id}` to `/dags/{dag_id}/dagRuns` as having dag_run_id as a url parameter as well as in request.body seemed redundant.




----------------------------------------------------------------
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:
users@infra.apache.org