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:
BaseMetaResource
Endpoint 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
ConfigSchema
andDataSchema
and an integer for HTTP status code- Return type:
Tuple(dict, integer)
- put(idx, **req_data)¶
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: t.ClassVar[t.Collection[str] | None] = {'GET', 'PUT'}¶
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]
) asroute
andadd_url_rule
by default.
- class cornflow.endpoints.dag.DAGInstanceEndpoint¶
Bases:
BaseMetaResource
Endpoint used by airflow to write instance checks
- ROLES_WITH_ACCESS = [3, 4]¶
- put(idx, **req_data)¶
- methods: t.ClassVar[t.Collection[str] | None] = {'PUT'}¶
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]
) asroute
andadd_url_rule
by default.
- class cornflow.endpoints.dag.DAGCaseEndpoint¶
Bases:
BaseMetaResource
Endpoint used by airflow to write case checks
- ROLES_WITH_ACCESS = [3, 4]¶
- put(idx, **req_data)¶
- methods: t.ClassVar[t.Collection[str] | None] = {'PUT'}¶
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]
) asroute
andadd_url_rule
by default.
- class cornflow.endpoints.dag.DAGEndpointManual¶
Bases:
BaseMetaResource
- ROLES_WITH_ACCESS = [2, 3, 4]¶
- post(**kwargs)¶
- methods: t.ClassVar[t.Collection[str] | None] = {'POST'}¶
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]
) asroute
andadd_url_rule
by default.
- class cornflow.endpoints.dag.DeployedDAGEndpoint¶
Bases:
BaseMetaResource
- ROLES_WITH_ACCESS = [4]¶
- get()¶
- post(**kwargs)¶
- methods: t.ClassVar[t.Collection[str] | None] = {'GET', 'POST'}¶
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]
) asroute
andadd_url_rule
by default.
- class cornflow.endpoints.dag.DeployedDagDetailEndpoint¶
Bases:
BaseMetaResource
- ROLES_WITH_ACCESS = [4]¶
- put(idx, **req_data)¶
- methods: t.ClassVar[t.Collection[str] | None] = {'PUT'}¶
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]
) asroute
andadd_url_rule
by default.