Skip to content

Expose JSON endpoints with parsed data #60

@avdata99

Description

@avdata99

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions