teamclairvoyant/airflow-rest-api-plugin

Expose JSON endpoints with parsed data

avdata99 opened this issue · 0 comments

To use data from another applications maybe is a good idea to expose data in a JSON format.

For example, the DAG's list requires to be parsed before use.
We expect something like this:

{"dags": [
   "DAG 01",
   "DAG 02",
   ]
}

but we get:

{
  "airflow_cmd": "airflow list_dags",
  "arguments": {
    "api": "list_dags"
  },
  "call_time": "Wed, 08 Jan 2020 14:13:19 GMT",
  "http_response_code": 200,
  "output": {
    "stderr": "************************\nStarting process\nhttp://localhost:5000\nSearching http://localhost:5000/api/search\nSearch data \n1 results\ntask added TASK_01 <Task(BashOperator): TASK_01>",
    "stdin": "",

    "stdout": "\n\n-------------------------------------------------------------------\nDAGS\n-------------------------------------------------------------------\nDAG_01\n-------------------------------------------------------------------\nDAG_02\n\n"

  },
  "post_arguments": {},
  "response_time": "Wed, 08 Jan 2020 15:42:54 GMT",
  "status": "OK"
}

Maybe this is not in the scope of this plugin?