Auxiliar endpoints#
DAG endpoint#
Internal endpoint for getting and posting execution data These are the endpoints used by airflow in its communication with cornflow
- class cornflow.endpoints.dag.DAGDetailEndpoint#
Bases:
BaseMetaResourceEndpoint used for the DAG endpoint
- ROLES_WITH_ACCESS = [3, 4]#
- get(idx)#
API method to get the data of the instance that is going to be executed It requires authentication to be passed in the form of a token that has to be linked to an existing session (login) made by the superuser created for the airflow webserver
- Parameters:
idx (str) – ID of the execution
- Returns:
the execution data (body) in a dictionary with structure of
ConfigSchemaandDataSchemaand an integer for HTTP status code- Return type:
Tuple(dict, integer)
- put(idx, **kwargs)#
API method to write the results of the execution It requires authentication to be passed in the form of a token that has to be linked to an existing session (login) made by the superuser created for the airflow webserver
- Parameters:
idx (str) – ID of the execution
- Returns:
A dictionary with a message (body) and an integer with the HTTP status code
- Return type:
Tuple(dict, integer)
- methods: ClassVar[Collection[str] | None] = {'GET', 'PUT'}#
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]) asrouteandadd_url_ruleby default.
- class cornflow.endpoints.dag.DAGInstanceEndpoint#
Bases:
BaseMetaResourceEndpoint used by airflow to write instance checks
- ROLES_WITH_ACCESS = [3, 4]#
- put(idx, **req_data)#
- methods: ClassVar[Collection[str] | None] = {'PUT'}#
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]) asrouteandadd_url_ruleby default.
- class cornflow.endpoints.dag.DAGCaseEndpoint#
Bases:
BaseMetaResourceEndpoint used by airflow to write case checks and KPIs
- ROLES_WITH_ACCESS = [3, 4]#
- put(idx, **req_data)#
- methods: ClassVar[Collection[str] | None] = {'PUT'}#
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]) asrouteandadd_url_ruleby default.
- class cornflow.endpoints.dag.DAGEndpointManual#
Bases:
BaseMetaResource- ROLES_WITH_ACCESS = [2, 3, 4]#
- post(**kwargs)#
- methods: ClassVar[Collection[str] | None] = {'POST'}#
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]) asrouteandadd_url_ruleby default.
- class cornflow.endpoints.dag.DeployedDAGEndpoint#
Bases:
BaseMetaResource- ROLES_WITH_ACCESS = [4]#
- get()#
- post(**kwargs)#
- methods: ClassVar[Collection[str] | None] = {'GET', 'POST'}#
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]) asrouteandadd_url_ruleby default.
- class cornflow.endpoints.dag.DeployedDagDetailEndpoint#
Bases:
BaseMetaResource- ROLES_WITH_ACCESS = [4]#
- put(idx, **req_data)#
- methods: ClassVar[Collection[str] | None] = {'PUT'}#
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]) asrouteandadd_url_ruleby default.