apache / apache/airflow

Create an Asset Event using `asset.uri`

Open
#53,615 4 comments 0 reactions 1 assignee Claimed by @jroachgolf84 View on GitHub
area:API kind:feature needs-triage
Dominant language
Python
Stars
46.9k
Forks
17.8k
Avg merge
2d 10h
Merged PRs (30d)
483

Description

### Description

In Airflow 2.X, we were able to use the `/api/v1/datasets/events` endpoint to create a Dataset event using the `dataset.uri`. However, this is not possible today using the `/api/v2/assets/events` endpoint; only an `asset_id` can be specified. This `asset_id` is incrementally assigned when an Asset is defined. The only way to find an `asset_id` is via the metadata DB, or my navigating to a URL like this: `https://cosmicenergy.astronomer.run/.../assets/1`.

https://airflow.apache.org/docs/apache-airflow/stable/stable-rest-api-ref.html#operation/create_asset_event

### Use case/motivation

I'd like to update the `/api/v2/assets/events` endpoint to allow for an Asset's URI to be used to trigger an Asset Event.

### Related issues

_No response_

### Are you willing to submit a PR?

- [x] Yes I am willing to submit a PR!

### Code of Conduct

- [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.