Muhammad Saad
Muhammad Saad

Reputation: 21

Trigger Airflow in postman

I want to trigger airflow dags in postman. recently I am hitting http://localhost:8080/api/v1/dags/a_pipline/dagRuns/run_id

It's asking for run_id. How can I specify run id in dags

Upvotes: 1

Views: 1740

Answers (2)

Angus Looney
Angus Looney

Reputation: 1

Coming to Airflow from 15 years of using LSF, the terminology trips me up.

A dag_id is its "name"

The above is a "dag_run_id", which is the id of an instance of a dag having run, or in the process of running. What LSF would call it's flow_id.

In LSF these are purely numerical, issued sequentially across all flow instances, 1,2,3 and so on.

In Airflow, these are datetimestamps, which theoretically are not unique across the whole system, but should be within a dag.

In the airflow CLI - you trigger a dag as follows:

airflow dags trigger name_of_the_dag

(glossing over authentication)

I'm just getting to grips with scripts doing this via the REST API...

Upvotes: 0

Muhammad Saad
Muhammad Saad

Reputation: 21

I have found answers after a lot of struggle. Its working on postman restAPI POST: http://localhost:8080/api/v1/dags/a_pipline/dagRuns

body: select json formate {

        "dag_run_id": "manual__2022-10-22T11:05:59.461142+00:00"
    }
    

Upvotes: 1

Related Questions